/* JobAlert India — Design System & Main Stylesheet */
/* Inspired by DESIGN.md design tokens & Public Sans / Inter typography */

:root {
    --primary: #001428;
    --primary-container: #0f2942;
    --on-primary: #ffffff;
    --on-primary-container: #7991af;
    --secondary: #a83900;
    --secondary-container: #fe6a2a;
    --on-secondary: #ffffff;
    --tertiary: #005323;
    --tertiary-container: #002f11;
    --tertiary-fixed: #95f8a7;
    --surface: #f8f9ff;
    --surface-low: #eff4ff;
    --surface-container: #e5eeff;
    --surface-high: #dce9ff;
    --surface-highest: #d3e4fe;
    --surface-card: #ffffff;
    --on-surface: #0b1c30;
    --on-surface-variant: #43474d;
    --outline: #74777e;
    --outline-variant: #c3c6ce;
    --error: #ba1a1a;
    --border-radius-sm: 6px;
    --border-radius: 10px;
    --border-radius-lg: 16px;
    --font-heading: 'Public Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --shadow-sm: 0 1px 3px rgba(0, 20, 40, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 20, 40, 0.08);
    --shadow-lg: 0 10px 25px rgba(0, 20, 40, 0.12);
}

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

html {
    scroll-behavior: smooth;
    overflow-y: auto;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.6;
    background-color: var(--surface);
    color: var(--on-surface);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--primary);
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1.25;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: var(--secondary);
}

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

/* ================= Top Flash Notice Ribbon ================= */
.flash-ribbon {
    background: var(--secondary-container);
    color: var(--on-secondary);
    padding: 6px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 500;
    overflow: hidden;
}

.flash-badge {
    background: #5b1b00;
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.flash-marquee-container {
    flex: 1;
    overflow: hidden;
    position: relative;
    margin: 0 16px;
    white-space: nowrap;
}

.flash-marquee {
    display: inline-flex;
    white-space: nowrap;
    animation: marqueeScroll 40s linear infinite;
}

.flash-marquee:hover {
    animation-play-state: paused;
}

@keyframes marqueeScroll {
    0% { transform: translateX(0%); }
    100% { transform: translateX(-50%); }
}

.flash-live-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
}

/* ================= Header & Navbar ================= */
.main-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--surface-highest);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    gap: 20px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-badge {
    background: var(--primary);
    color: var(--secondary-container);
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.brand-title span {
    color: var(--secondary-container);
}

.brand-sub {
    font-size: 11px;
    font-family: var(--font-mono);
    color: var(--outline);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.header-search {
    flex: 1;
    max-width: 480px;
    position: relative;
}

.header-search input {
    width: 100%;
    padding: 10px 16px 10px 42px;
    background: var(--surface-low);
    border: 1px solid var(--surface-highest);
    border-radius: var(--border-radius);
    font-size: 14px;
    font-family: var(--font-body);
    color: var(--on-surface);
    transition: all 0.2s;
}

.header-search input:focus {
    outline: none;
    background: #fff;
    border-color: var(--secondary-container);
    box-shadow: 0 0 0 3px rgba(254, 106, 42, 0.15);
}

.header-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--outline);
    pointer-events: none;
    font-size: 18px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-post-job {
    background: var(--primary);
    color: var(--on-primary);
    padding: 8px 16px;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.15s;
}

.btn-post-job:hover {
    background: var(--primary-container);
    color: #fff;
}

.btn-account {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--surface-container);
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    font-size: 13px;
    color: var(--primary);
}

.btn-account:hover {
    background: var(--surface-high);
}

/* Category Navigation Ribbon */
.cat-nav-bar {
    border-top: 1px solid var(--surface-container);
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.cat-nav-bar::-webkit-scrollbar {
    display: none;
}

.cat-nav-list {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 0;
    list-style: none;
}

.cat-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    border-radius: var(--border-radius-sm);
    font-size: 13px;
    font-weight: 600;
    color: var(--on-surface-variant);
    text-decoration: none;
    transition: all 0.15s;
}

.cat-nav-link:hover, .cat-nav-link.active {
    background: var(--primary-container);
    color: #fff;
}

/* ================= Hero Search Section ================= */
.hero-section {
    position: relative;
    background: radial-gradient(120% 120% at 50% 0%, #0d253f 0%, #041427 50%, #000c1a 100%);
    color: #ffffff;
    padding: 60px 0 68px;
    overflow: hidden;
}

/* Subtle architectural mesh grid background overlay */
.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 36px 36px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 40%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 40%, transparent 100%);
    pointer-events: none;
}

/* Ambient glow blobs */
.hero-section::after {
    content: '';
    position: absolute;
    top: -100px;
    right: -80px;
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, rgba(254, 106, 42, 0.16) 0%, rgba(254, 106, 42, 0) 70%);
    border-radius: 50%;
    filter: blur(40px);
    pointer-events: none;
}

.hero-content {
    max-width: 920px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(254, 106, 42, 0.12);
    border: 1px solid rgba(254, 106, 42, 0.35);
    color: #ff9153;
    font-size: 11.5px;
    font-weight: 700;
    font-family: var(--font-mono);
    letter-spacing: 0.06em;
    padding: 5px 14px;
    border-radius: 30px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.hero-tag:hover {
    border-color: rgba(254, 106, 42, 0.6);
    background: rgba(254, 106, 42, 0.18);
    transform: translateY(-1px);
}

.hero-title {
    font-size: 44px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.16;
    margin-bottom: 14px;
    letter-spacing: -0.025em;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-title span {
    background: linear-gradient(135deg, #ff8c53 0%, #ff521a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.hero-subtitle {
    font-size: 16.5px;
    color: #cbd5e1;
    max-width: 700px;
    margin: 0 auto 34px;
    line-height: 1.6;
    font-weight: 400;
}

.hero-search-box {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 10px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 
        0 24px 50px -12px rgba(0, 15, 30, 0.45),
        0 8px 20px -4px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.25);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.search-field {
    flex: 1;
    min-width: 190px;
    position: relative;
}

.search-field input, .search-field select {
    width: 100%;
    height: 52px;
    padding: 0 16px 0 44px;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    font-size: 14px;
    font-family: var(--font-body);
    color: var(--on-surface);
    background: #f8fafc;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.search-field select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 38px;
}

.search-field input::placeholder {
    color: #94a3b8;
}

.search-field input:focus, .search-field select:focus {
    outline: none;
    border-color: var(--secondary-container);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(254, 106, 42, 0.16);
}

.search-field-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 20px;
    pointer-events: none;
    transition: color 0.2s ease;
}

.search-field:focus-within .search-field-icon {
    color: var(--secondary-container);
}

.btn-search {
    background: linear-gradient(135deg, #fe6a2a 0%, #ea580c 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    height: 52px;
    padding: 0 32px;
    font-size: 15px;
    font-weight: 700;
    font-family: var(--font-body);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 16px rgba(254, 106, 42, 0.35);
    white-space: nowrap;
}

.btn-search:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(254, 106, 42, 0.45);
    filter: brightness(1.05);
}

.btn-search:active {
    transform: translateY(0);
}

.quick-pills {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.quick-pill-label {
    font-size: 12px;
    color: #94a3b8;
    font-weight: 600;
    margin-right: 4px;
}

.pill-item {
    background: rgba(255, 255, 255, 0.08);
    color: #f1f5f9;
    font-size: 12.5px;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.pill-item:hover {
    background: rgba(254, 106, 42, 0.25);
    border-color: rgba(254, 106, 42, 0.6);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(254, 106, 42, 0.25);
}

/* ================= Live Metrics Ribbon ================= */
.live-metrics-ribbon {
    background: #ffffff;
    border-bottom: 1px solid var(--surface-highest);
    padding: 22px 0;
    box-shadow: 0 2px 10px rgba(0, 20, 40, 0.02);
    position: relative;
    z-index: 2;
}

.metrics-flex {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-around;
    gap: 24px;
    text-align: center;
}

.metric-item {
    padding: 6px 14px;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.metric-item:hover {
    transform: translateY(-2px);
}

.metric-value {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}

.metric-label {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--outline);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.metric-divider {
    width: 1px;
    height: 38px;
    background: var(--surface-highest);
    align-self: center;
}

/* ================= Cards & Grid Layouts ================= */
.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 16px;
}

.section-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.section-sub {
    font-size: 14.5px;
    color: var(--on-surface-variant);
    margin-top: 6px;
    line-height: 1.5;
}

.view-all-link {
    font-size: 14px;
    font-weight: 700;
    color: var(--secondary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--border-radius-sm);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.view-all-link:hover {
    color: var(--secondary-container);
    background: rgba(254, 106, 42, 0.08);
    transform: translateX(3px);
}

.jobs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 22px;
}

.job-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 4px 14px -2px rgba(0, 20, 40, 0.04);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.job-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 36px -6px rgba(0, 20, 40, 0.1);
    border-color: #cbd5e1;
}

.job-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.job-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 700;
    font-family: var(--font-mono);
    padding: 3.5px 9px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    transition: transform 0.15s ease;
}

.badge:hover {
    transform: scale(1.02);
}

.badge-govt {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid rgba(3, 105, 161, 0.15);
}

.badge-private {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid rgba(180, 83, 9, 0.15);
}

.badge-international {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid rgba(4, 120, 87, 0.22);
}

.badge-verified {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid rgba(21, 128, 61, 0.15);
}

.badge-closing {
    background: #ffedd5;
    color: #c2410c;
    border: 1px solid rgba(194, 65, 12, 0.15);
}

.badge-admit {
    background: #f3e8ff;
    color: #7e22ce;
    border: 1px solid rgba(126, 34, 206, 0.15);
}

.badge-result {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid rgba(4, 120, 87, 0.15);
}

.job-org {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 8px;
    display: block;
}

.job-title {
    font-size: 17.5px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.35;
    margin-bottom: 14px;
}

.job-title a {
    color: var(--primary);
    transition: color 0.15s ease;
    text-decoration: none;
}

.job-title a:hover {
    color: var(--secondary-container);
}

.job-meta-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 13.5px;
    color: var(--on-surface-variant);
    margin-bottom: 20px;
}

.job-meta-item {
    display: flex;
    align-items: center;
    gap: 9px;
    line-height: 1.4;
}

.meta-icon {
    color: #94a3b8;
    font-size: 17px;
    width: 18px;
    flex-shrink: 0;
}

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

.deadline-text {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--on-surface-variant);
    line-height: 1.35;
}

.deadline-text.urgent {
    color: #dc2626;
    font-weight: 700;
}

.btn-apply-card {
    background: var(--primary);
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(0, 20, 40, 0.1);
    white-space: nowrap;
}

.btn-apply-card:hover {
    background: var(--secondary-container);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(254, 106, 42, 0.3);
}

/* ================= Job Detail Page ================= */
.job-page { padding: 32px 20px; }
.job-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-bottom: 20px; color: var(--outline); font-size: 13px; }
.job-breadcrumb a { color: var(--on-surface-variant); text-decoration: none; }
.job-breadcrumb a:hover { color: var(--primary); text-decoration: underline; }
.job-breadcrumb span:last-child { color: var(--primary); font-weight: 600; }
.job-detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: start; }
.job-hero, .job-content { background: #fff; border: 1px solid var(--surface-highest); border-radius: 14px; box-shadow: var(--shadow-sm); }
.job-hero { padding: 28px; margin-bottom: 24px; }
.job-hero__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.job-hero__top .badge { display: inline-flex; align-items: center; }
.job-hero__top .material-symbols-outlined { font-size: 18px; }
.icon-filled { font-variation-settings: 'FILL' 1; }
.job-hero__organization { margin: 0 0 6px; color: var(--secondary); font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.job-hero h1 { margin: 0; color: var(--primary); font-size: clamp(24px, 3vw, 32px); font-weight: 800; line-height: 1.22; }
.job-reference { display: inline-block; margin: 16px 0 0; padding: 5px 9px; border-radius: 5px; background: var(--surface-low); color: var(--on-surface-variant); font-family: var(--font-mono); font-size: 12px; }
.job-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1px; margin: 22px 0 0; overflow: hidden; border: 1px solid var(--surface-highest); border-radius: 10px; background: var(--surface-highest); }
.job-summary div { min-width: 0; padding: 14px; background: var(--surface); }
.job-summary dt, .job-facts dt { color: var(--outline); font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.job-summary dd, .job-facts dd { margin: 5px 0 0; color: var(--primary); font-size: 14px; font-weight: 700; overflow-wrap: anywhere; }
.job-provenance { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 14px; color: var(--outline); font-size: 12px; }
.job-content { padding: 4px 28px; }
.job-section { padding: 24px 0; border-bottom: 1px solid var(--surface-highest); }
.job-section:last-child { border-bottom: 0; }
.job-section h2 { display: flex; align-items: center; margin: 0 0 13px; color: var(--primary); font-size: 18px; line-height: 1.3; }
.job-copy { color: var(--on-surface); font-size: 14px; line-height: 1.7; }
.job-copy p { margin: 0 0 10px; }
.job-copy p:last-child { margin-bottom: 0; }
.job-facts { margin: 0; border-top: 1px solid var(--surface-highest); }
.job-facts div { display: grid; grid-template-columns: minmax(150px, 35%) 1fr; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--surface-highest); }
.job-facts dd { margin-top: 0; }
.job-facts__deadline dd { color: #c2410c; }
.job-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.job-link { display: inline-flex; align-items: center; gap: 7px; padding: 9px 13px; border: 1px solid #cbd5e1; border-radius: 7px; color: var(--primary); font-size: 13px; font-weight: 700; text-decoration: none; }
.job-link:hover { border-color: var(--primary); background: var(--surface-low); }
.job-link .material-symbols-outlined { font-size: 18px; }
.job-link--primary { border-color: #cbdbf5; background: #eff4ff; }

@media (max-width: 900px) {
    .job-detail-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
}

@media (max-width: 560px) {
    .job-page { padding: 20px 14px; }
    .job-hero { padding: 20px; }
    .job-content { padding: 2px 20px; }
    .job-hero__top { align-items: flex-start; }
    .job-facts div { grid-template-columns: 1fr; gap: 4px; }
}

/* ================= Recent Jobs Section & Tabs ================= */
.recent-jobs-section {
    position: relative;
}

.recent-jobs-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
}

.recent-tabs-wrapper {
    margin-bottom: 24px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
    scrollbar-width: none;
}

.recent-tabs-wrapper::-webkit-scrollbar {
    display: none;
}

.recent-jobs-tabs {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #edf2f7;
    padding: 6px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.recent-tab-item {
    border: none;
    background: transparent;
    color: var(--on-surface-variant);
    font-family: var(--font-body);
    font-size: 13.5px;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

.recent-tab-item:hover {
    color: var(--primary);
    background: rgba(255, 255, 255, 0.85);
}

.recent-tab-item.active {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 3px 10px rgba(0, 20, 40, 0.18);
}

.recent-tab-item[data-type="govt"].active {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    box-shadow: 0 3px 12px rgba(2, 132, 199, 0.28);
}

.recent-tab-item[data-type="private"].active {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    box-shadow: 0 3px 12px rgba(217, 119, 6, 0.28);
}

.recent-tab-item[data-type="international"].active {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 3px 12px rgba(5, 150, 105, 0.28);
}

.recent-tab-item .tab-count {
    background: rgba(0, 20, 40, 0.08);
    color: var(--on-surface-variant);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 12px;
}

.recent-tab-item.active .tab-count {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

/* ================= Mini Bookmark Button ================= */
.btn-bookmark-mini {
    background: #ffffff;
    border: 1px solid var(--surface-highest);
    border-radius: var(--border-radius-sm);
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--outline);
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-bookmark-mini:hover,
.btn-bookmark-mini.bookmarked {
    border-color: var(--secondary-container);
    color: var(--secondary-container);
    background: #fff8f5;
}

/* ================= Recent Jobs Pagination Controls ================= */
.recent-pagination-wrapper {
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid var(--surface-highest);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.recent-pagination-info {
    font-size: 13px;
    color: var(--on-surface-variant);
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.recent-pagination-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-page-nav {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: var(--border-radius-sm);
    font-size: 13px;
    font-weight: 700;
    font-family: var(--font-body);
    text-decoration: none;
    border: 1px solid var(--surface-highest);
    background: #ffffff;
    color: var(--primary);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-sm);
}

.btn-page-nav:hover:not(.is-disabled) {
    border-color: var(--primary);
    background: var(--surface-low);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-page-nav.is-disabled {
    opacity: 0.45;
    cursor: not-allowed;
    background: var(--surface);
    border-color: var(--surface-highest);
    color: var(--outline);
    pointer-events: none;
    box-shadow: none;
}

/* Standout NEXT Button */
.btn-primary-next {
    background: linear-gradient(135deg, #001428 0%, #0f2942 100%) !important;
    color: #ffffff !important;
    border-color: #001428 !important;
    padding: 10px 22px !important;
    font-weight: 700 !important;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 14px rgba(0, 20, 40, 0.22) !important;
}

.btn-primary-next:hover:not(.is-disabled) {
    background: linear-gradient(135deg, #fe6a2a 0%, #ea580c 100%) !important;
    border-color: #ea580c !important;
    color: #ffffff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(254, 106, 42, 0.38) !important;
}

.btn-primary-next .material-symbols-outlined {
    font-size: 18px;
    transition: transform 0.2s ease;
}

.btn-primary-next:hover:not(.is-disabled) .material-symbols-outlined {
    transform: translateX(4px);
}

.page-numbers-group {
    display: flex;
    align-items: center;
    gap: 4px;
}

.page-number-pill {
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-sm);
    font-size: 13px;
    font-weight: 700;
    font-family: var(--font-mono);
    border: 1px solid var(--surface-highest);
    background: #ffffff;
    color: var(--primary);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s ease;
}

.page-number-pill:hover {
    border-color: var(--primary);
    background: var(--surface-low);
    color: var(--primary);
}

.page-number-pill.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(0, 20, 40, 0.18);
}

.page-number-ellipsis {
    padding: 0 4px;
    color: var(--outline);
    font-weight: 700;
    font-size: 14px;
}

/* Grid Loading & Animations */
.jobs-grid.is-loading {
    opacity: 0.45;
    pointer-events: none;
    filter: blur(1px);
    transition: opacity 0.2s ease, filter 0.2s ease;
}

.job-cards-fade-in {
    animation: cardsFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cardsFadeIn {
    from {
        opacity: 0.2;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================= Category & State Bento Grids ================= */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 18px;
}

.category-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 20, 40, 0.03);
}

.category-card:hover {
    background: #ffffff;
    border-color: var(--secondary-container);
    transform: translateY(-3px);
    box-shadow: 0 12px 28px -4px rgba(0, 20, 40, 0.08);
}

.cat-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--surface-low);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
}

.category-card:hover .cat-icon-box {
    background: linear-gradient(135deg, #fe6a2a 0%, #ea580c 100%);
    color: #ffffff;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(254, 106, 42, 0.3);
}

.cat-name {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.25;
}

.cat-count {
    font-size: 12px;
    color: var(--outline);
    font-family: var(--font-mono);
    margin-top: 3px;
    font-weight: 500;
}

/* ================= Home: Closing Soon Section ================= */
.closing-soon-section {
    background: linear-gradient(180deg, #fffbf9 0%, #fff7ed 100%);
    border-top: 1px solid #ffedd5;
    border-bottom: 1px solid #ffedd5;
    padding: 48px 0;
}

.closing-soon-card {
    border-color: #fed7aa !important;
    border-left: 4px solid #ea580c !important;
    background: #ffffff;
}

.closing-soon-card:hover {
    border-color: #f97316 !important;
    box-shadow: 0 14px 32px -4px rgba(234, 88, 12, 0.15) !important;
}

/* ================= Home: Quick Updates (Admit Cards & Results) ================= */
.updates-columns-section {
    background: #ffffff;
    padding: 56px 0;
    border-top: 1px solid var(--surface-highest);
    border-bottom: 1px solid var(--surface-highest);
}

.updates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 32px;
}

.update-item-card {
    padding: 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 6px rgba(0, 20, 40, 0.02);
}

.update-item-card:hover {
    transform: translateY(-2px);
    border-color: #cbd5e1;
    box-shadow: 0 8px 20px -2px rgba(0, 20, 40, 0.06);
}

/* ================= Home: Resume Builder Callout Banner ================= */
.resume-banner-section {
    padding: 56px 0;
}

.resume-banner-box {
    background: radial-gradient(120% 120% at 80% 20%, #153a5b 0%, #06192e 50%, #000f21 100%);
    border-radius: 20px;
    padding: 44px;
    color: #ffffff;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 16px 36px rgba(0, 15, 30, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.resume-banner-box::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -40px;
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, rgba(254, 106, 42, 0.22) 0%, rgba(254, 106, 42, 0) 70%);
    border-radius: 50%;
    filter: blur(30px);
    pointer-events: none;
}

.btn-resume-cta {
    background: linear-gradient(135deg, #fe6a2a 0%, #ea580c 100%);
    color: #ffffff;
    padding: 16px 32px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(254, 106, 42, 0.4);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    z-index: 1;
    white-space: nowrap;
}

.btn-resume-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(254, 106, 42, 0.55);
    color: #ffffff;
    filter: brightness(1.05);
}

/* ================= Footer ================= */
.main-footer {
    background: #001428;
    color: #cbd5e1;
    padding: 60px 0 30px;
    margin-top: 60px;
    border-top: 3px solid var(--secondary-container);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-title {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.01em;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-links a {
    color: #94a3b8;
    font-size: 13px;
    transition: color 0.15s;
}

.footer-links a:hover {
    color: #fff;
}

.disclaimer-box {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 16px;
    border-radius: var(--border-radius-sm);
    font-size: 12px;
    line-height: 1.6;
    color: #94a3b8;
    margin-bottom: 24px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: #64748b;
}

/* ================= Modal & Dialogs ================= */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 20, 40, 0.7);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-box {
    background: #fff;
    border-radius: var(--border-radius-lg);
    max-width: 540px;
    width: 100%;
    padding: 30px;
    box-shadow: var(--shadow-lg);
    animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
    0% { transform: scale(0.95); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* ================= Comprehensive Responsive Design ================= */
@media (max-width: 992px) {
    .header-top { flex-wrap: wrap; }
    .header-search { order: 3; max-width: 100%; width: 100%; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
    .hero-title { font-size: 36px; }
    .hero-subtitle { font-size: 15.5px; }
    .hero-search-box { flex-wrap: wrap; }
    .search-field { min-width: 200px; }
    .updates-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 50px 0 56px;
    }

    .hero-title {
        font-size: 32px;
        line-height: 1.2;
    }

    .hero-subtitle {
        font-size: 15px;
        margin-bottom: 26px;
    }

    /* Transform Live Metrics into a responsive 2x2 grid */
    .metrics-flex {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    .metric-divider {
        display: none;
    }

    .metric-item {
        background: var(--surface-low);
        border: 1px solid var(--surface-highest);
        border-radius: 12px;
        padding: 14px 10px;
    }

    .metric-value {
        font-size: 22px;
    }

    .metric-label {
        font-size: 11px;
    }

    .recent-jobs-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .recent-jobs-header .view-all-link {
        align-self: flex-start;
    }

    .resume-banner-box {
        padding: 32px 24px;
        flex-direction: column;
        align-items: flex-start;
    }

    .btn-resume-cta {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 640px) {
    .hero-section {
        padding: 42px 0 48px;
    }

    .hero-tag {
        font-size: 10.5px;
        padding: 4px 12px;
    }

    .hero-title {
        font-size: 26px;
        letter-spacing: -0.015em;
    }

    .hero-subtitle {
        font-size: 14px;
        margin-bottom: 22px;
    }

    .hero-search-box {
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        border-radius: 16px;
        gap: 10px;
    }

    .search-field {
        width: 100%;
        min-width: 100%;
    }

    .search-field input, .search-field select {
        height: 50px;
        font-size: 14px;
    }

    .btn-search {
        width: 100%;
        height: 50px;
        font-size: 15px;
        justify-content: center;
    }

    .quick-pills {
        justify-content: flex-start;
        gap: 6px;
        margin-top: 18px;
    }

    .pill-item {
        font-size: 11.5px;
        padding: 5px 12px;
    }

    .jobs-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .job-card {
        padding: 18px;
    }

    .job-title {
        font-size: 16px;
    }

    .categories-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .category-card {
        padding: 14px;
        gap: 12px;
    }

    .cat-icon-box {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 23px;
    }

    .metrics-flex {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .categories-grid {
        grid-template-columns: 1fr;
    }

    .job-card-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .job-card-bottom > div:last-child {
        width: 100%;
        justify-content: space-between;
    }

    .btn-apply-card {
        flex: 1;
        justify-content: center;
    }
}

/* ================= Other Country & Overseas Jobs Section ================= */
.other-country-section {
    padding: 56px 0;
    background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 100%);
    border-top: 1px solid #dcfce7;
    border-bottom: 1px solid #e2e8f0;
    position: relative;
    overflow: hidden;
}

.other-country-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #059669, #0284c7, #6366f1, #059669);
    background-size: 300% 100%;
    animation: gradientShift 8s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.intl-header-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #dcfce7;
    color: #065f46;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
    border: 1px solid rgba(5, 150, 105, 0.2);
}

.intl-country-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0 28px;
}

.intl-country-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    color: var(--primary);
    border: 1px solid #cbd5e1;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.intl-country-pill:hover {
    background: #065f46;
    color: #ffffff;
    border-color: #065f46;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(6, 95, 70, 0.2);
}

.intl-job-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--border-radius-lg);
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    position: relative;
}

.intl-job-card:hover {
    transform: translateY(-4px);
    border-color: #10b981;
    box-shadow: 0 12px 28px rgba(6, 95, 70, 0.08);
}

.intl-location-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #f1f5f9;
    color: #334155;
    padding: 3px 9px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.btn-view-all-intl {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #065f46;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 3px 10px rgba(6, 95, 70, 0.25);
}

.btn-view-all-intl:hover {
    background: #047857;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(6, 95, 70, 0.35);
}

