:root {
    --primary: #4c1d95; /* Deep Purple */
    --primary-light: #6d28d9;
    --secondary: #64748b;
    --accent: #f59e0b;
    --bg-main: #f8fafc; /* Very Light Grey */
    --bg-card: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --glass: rgba(255, 255, 255, 0.95);
    --radius-lg: 24px;
    --radius-md: 16px;
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header Redesign */
header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary);
    letter-spacing: -1px;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.95rem;
    position: relative;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary);
    border-radius: 99px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.search-mini {
    background: #f1f5f9;
    padding: 8px 16px;
    border-radius: 99px;
    display: flex;
    align-items: center;
    width: 250px;
}

.search-mini input {
    background: transparent;
    border: none;
    padding: 4px 8px;
    width: 100%;
    font-size: 0.9rem;
    outline: none;
}

.btn-alerts {
    background: var(--primary);
    color: white;
    padding: 10px 24px;
    border-radius: 99px;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(76, 29, 149, 0.2);
}

/* Main Layout Grid (Left Sidebar) */
.main-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
    padding: 40px 0;
}

/* Left Sidebar Styling */
.sidebar-box {
    background: #f1f5f9;
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 24px;
}

.sidebar-box h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 20px;
}

.side-links a {
    display: block;
    background: white;
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.side-links a:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateX(4px);
}

.side-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.side-tags a {
    padding: 6px 12px;
    background: #e2e8f0;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #475569;
}

.side-tags a.active {
    background: var(--primary);
    color: white;
}

/* 2-Column Job Card Grid */
.job-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.job-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 24px;
    border: 1px solid var(--border);
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.job-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.job-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.job-badge {
    padding: 4px 10px;
    background: #e0e7ff;
    color: #4338ca;
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
}

.job-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}

.job-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.3;
    margin-bottom: 8px;
}

.job-org {
    color: var(--primary-light);
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 16px;
    display: block;
}

.job-info-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: #475569;
}

.job-card-footer {
    padding-top: 16px;
    margin-top: 16px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.job-posts-count {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
}

.view-details {
    color: var(--primary);
    font-weight: 800;
    font-size: 0.9rem;
}

/* Newsletter Section */
.newsletter-box {
    background: white;
    border-radius: var(--radius-lg);
    padding: 60px;
    margin: 60px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border);
}

.newsletter-text h3 {
    font-size: 2.2rem;
    font-weight: 900;
    margin-bottom: 8px;
}

.newsletter-form {
    display: flex;
    gap: 12px;
}

.newsletter-form input {
    width: 320px;
    padding: 16px 24px;
    border-radius: 99px;
    background: #f1f5f9;
    border: none;
}

.btn-subscribe {
    background: var(--primary);
    color: white;
    padding: 16px 40px;
    border-radius: 99px;
    font-weight: 800;
    border: none;
    cursor: pointer;
}

/* Universal Page Header */
.page-title-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.live-updates {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: #f8fafc;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 800;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Load More Button */
.load-more-btn {
    display: block;
    margin: 40px auto;
    background: #e2e8f0;
    padding: 12px 32px;
    border-radius: 99px;
    font-weight: 800;
    color: var(--text-main);
    text-align: center;
    width: fit-content;
}

/* Global Footer Alignment */
.site-footer {
    background: white;
    border-top: 1px solid var(--border);
    padding: 80px 0 40px;
    margin-top: 80px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 350px 1fr 150px;
    gap: 60px;
}

.footer-col h4 {
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 24px;
    color: var(--text-main);
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 12px;
}

.footer-col a {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
}

/* Animations Fallback (Always visible initially) */
[class*="animate-"], .job-card, .sidebar-box, .logo, .nav-links {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
}

/* Mobile Responsiveness */
@media (max-width: 1024px) {
    .main-grid { grid-template-columns: 1fr; }
    .job-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 40px; }
    .newsletter-box { flex-direction: column; text-align: center; gap: 40px; padding: 40px; }
    .newsletter-form input { width: 100%; }
}

/* AI Chat Widget */
#ai-chat-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
}

#ai-chat-btn {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 99px;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(76, 29, 149, 0.4);
    transition: all 0.3s ease;
    font-family: inherit;
}

#ai-chat-btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 14px 30px rgba(76, 29, 149, 0.5);
}

#ai-chat-box {
    display: none;
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 480px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border);
    flex-direction: column;
    overflow: hidden;
    animation: chatPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes chatPop {
    0% { opacity: 0; transform: translateY(20px) scale(0.95); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.ai-chat-header {
    background: var(--primary);
    color: white;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ai-chat-header h4 {
    font-size: 1.1rem;
    font-weight: 800;
    margin: 0;
}

#ai-chat-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
}

.ai-chat-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-msg {
    padding: 12px 16px;
    border-radius: 12px;
    max-width: 85%;
    font-size: 0.9rem;
    line-height: 1.5;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    0% { opacity: 0; transform: translateY(5px); }
    100% { opacity: 1; transform: translateY(0); }
}

.chat-msg.bot {
    background: white;
    border: 1px solid var(--border);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.chat-msg.user {
    background: var(--primary);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chat-msg a {
    color: var(--primary);
    font-weight: 700;
    text-decoration: underline;
}

.ai-chat-footer {
    padding: 16px;
    background: white;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 10px;
}

.ai-chat-footer input {
    flex: 1;
    padding: 12px 16px;
    border-radius: 99px;
    border: 1px solid var(--border);
    background: #f1f5f9;
    font-family: inherit;
    outline: none;
    font-size: 0.9rem;
}

.ai-chat-footer input:focus {
    border-color: var(--primary-light);
    background: white;
}

.ai-chat-footer button {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: bold;
    transition: background 0.2s;
}

.ai-chat-footer button:hover {
    background: var(--primary-light);
}

/* Eligibility Checker Form */
.eligibility-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.eligibility-form select, 
.eligibility-form input {
    width: 100%;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background: white;
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
}

.eligibility-form select:focus, 
.eligibility-form input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(76,29,149,0.1);
}

.btn-check-eligibility {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-weight: 800;
    font-size: 0.95rem;
    cursor: pointer;
    font-family: inherit;
    margin-top: 4px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-check-eligibility:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76,29,149,0.3);
}

.eligibility-box {
    background: #eef2ff !important;
    border: 1px solid #c7d2fe !important;
}

.eligibility-box h4 {
    color: var(--primary);
}
