/* AlamoCareers Master Style 2026 */
:root {
    /* --- GREEN PALETTE (color theory, single source of truth) --- */
    --green-50: #f0fdf4;
    --green-100: #dcfce7;
    --green-200: #bbf7d0;
    --green-300: #86efac;
    --green-400: #4ade80;
    --green-500: #22c55e;
    --green-600: #16a34a;
    --green-700: #15803d;
    --green-800: #166534;
    --green-900: #14532d;
    --green-950: #052e16;

    /* --- LIGHT MODE --- */
    --bg-main: #ffffff;
    --bg-card: #f8fafc;
    --bg-inner-card: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #f1f5f9;
    /* THE BANNER (Header/Footer) */
    --banner-bg: #1e293b;
    --banner-accent: var(--green-800);
    /* BRAND ACCENTS */
    --brand-green: var(--green-800);
    --brand-hover: var(--green-700);
    --logo-green: var(--green-400);
    --brand-green-soft: var(--green-50);
    --brand-green-subtle: rgba(22, 101, 52, 0.05);
    --brand-green-glow: rgba(22, 101, 52, 0.2);
    --brand-green-shadow: rgba(22, 101, 52, 0.5);
    --hero-grid: rgba(22, 101, 52, 0.04);
    --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.03);
    /* --- GLASSMOPRHISM ADDITION --- */
    --glass-bg: rgba(248, 250, 252, 0.8);
    --glass-border: rgba(255, 255, 255, 0.6);
}

[data-theme="dark"] {
    /* --- DARK MODE --- */
    --bg-main: #020617;
    --bg-card: #0f172a;
    --bg-inner-card: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: #1e293b;
    /* THE BANNER (Header/Footer) */
    --banner-bg: #0c0a09;
    --banner-accent: var(--green-500);
    /* BRAND ACCENTS */
    --brand-green: var(--green-500);
    --brand-hover: var(--green-400);
    --logo-green: var(--green-400);
    --brand-green-soft: rgba(34, 197, 94, 0.1);
    --brand-green-subtle: rgba(34, 197, 94, 0.05);
    --brand-green-glow: rgba(34, 197, 94, 0.25);
    --brand-green-shadow: rgba(34, 197, 94, 0.5);
    --hero-grid: rgba(34, 197, 94, 0.08);
    /* --- GLASSMOPRHISM ADDITION --- */
    --glass-bg: rgba(15, 23, 42, 0.7);
    --glass-border: rgba(255, 255, 255, 0.05);
}

html, body {
    max-width: 100vw;
    overflow-x: hidden;
    background-color: var(--bg-main);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    transition: background-color 0.3s, color 0.3s;
}

.site-header {
    background: var(--banner-bg);
    padding: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-bottom: 2px solid var(--banner-accent);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 28px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 28px;
    height: 70px;
}

.site-brand {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    margin-right: 16px;
    padding: 0 24px 0 0;
    border-right: 1px solid rgba(255,255,255,0.18);
    text-decoration: none;
    height: 40px;
}

.site-brand h1 {
    color: #fff;
    margin: 0;
    font-weight: 900;
    font-size: 1.45rem;
    letter-spacing: -0.5px;
    line-height: 1;
    white-space: nowrap;
}

.site-brand .text-brand {
    color: var(--banner-accent);
}

.main-nav {
    flex: 1;
    min-width: 0;
    display: flex;
    justify-content: flex-end;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 14px;
    margin: 0 0 0 16px;
    align-items: center;
    padding: 0;
    flex-wrap: nowrap;
    justify-content: flex-end;
}

.nav-list li {
    flex-shrink: 0;
}

.nav-link {
    color: rgba(255,255,255,0.92);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.82rem;
    white-space: nowrap;
    transition: 0.2s;
    background: none;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    border-radius: 8px;
}

.nav-link:hover {
    color: #fff;
    background: rgba(255,255,255,0.08);
}

.nav-link-portal {
    color: var(--banner-accent) !important;
    font-weight: 800;
}

.nav-link-portal:hover {
    color: #fff !important;
}

.nav-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--banner-accent);
    color: var(--banner-bg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 900;
    margin-right: 4px;
}

.nav-avatar-badge {
    position: absolute;
    top: -2px;
    left: 16px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 50%;
    background: #ef4444;
    color: white;
    font-size: 0.6rem;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--banner-bg);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    animation: pulse-red 2s infinite;
}

.nav-msg-badge {
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 50%;
    background: #ef4444;
    color: white;
    font-size: 0.65rem;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    border: 2px solid var(--banner-bg);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); }
    70% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* --- USER DROPDOWN MENU --- */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    min-width: 260px;
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    overflow-x: hidden;
    background: var(--banner-bg);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 14px;
    padding: 10px 0;
    box-shadow: 0 20px 40px rgba(0,0,0,0.35);
    list-style: none;
    margin: 0;
    z-index: 1000;
}

.nav-dropdown.open .nav-dropdown-menu {
    display: block;
}

.nav-dropdown-menu li {
    margin: 0;
}

.nav-dropdown-menu a,
.nav-dropdown-logout {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    transition: 0.15s;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-dropdown-menu a:hover,
.nav-dropdown-logout:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.nav-dropdown-divider {
    height: 1px;
    background: rgba(255,255,255,0.12);
    margin: 8px 14px;
}

.nav-dropdown-header {
    padding: 10px 18px 4px 18px;
    font-size: 0.65rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--banner-accent);
    pointer-events: none;
}

@media (max-width: 1100px) {
    .header-container { gap: 20px; padding: 0 20px; height: 64px; }
    .site-brand { margin-right: 8px; padding: 0 16px 0 0; height: 36px; }
    .site-brand h1 { font-size: 1.35rem; }
    .nav-list { gap: 6px; }
    .nav-link { font-size: 0.78rem; padding: 5px 8px; }
}

.btn-dark-toggle {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.85);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: color 0.2s, background 0.2s, transform 0.2s;
}
.btn-dark-toggle:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
    transform: rotate(12deg) scale(1.05);
}

/* --- MOBILE NAVIGATION --- */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 10px;
    cursor: pointer;
    padding: 8px;
}

.hamburger-bar {
    display: block;
    width: 100%;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: 0.3s;
}

.mobile-menu-toggle.open .hamburger-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-menu-toggle.open .hamburger-bar:nth-child(2) { opacity: 0; }
.mobile-menu-toggle.open .hamburger-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- THE FOOTER FIX --- */
.site-footer {
    background: var(--banner-bg);
    color: #fff;
    padding: 4rem 0 2rem 0;
    margin-top: 5rem;
    border-top: 1px solid var(--border-color);
}

.footer-grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    text-align: left;
}

.footer-brand p {
    opacity: 0.8;
}

.footer-links h4 {
    font-size: 0.85rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 1rem 0;
    color: var(--banner-accent);
}

.footer-links ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: 0.2s;
}

.footer-links a:hover {
    color: var(--banner-accent);
}

.footer-bottom {
    max-width: 1200px;
    margin: 3rem auto 0 auto;
    padding: 1.5rem 20px 0 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    opacity: 0.6;
    text-align: left;
}

.footer-bottom p {
    margin: 0;
}

/* --- COOKIE CONSENT BANNER --- */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 1rem 20px;
    z-index: 10000;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.05);
}

.cookie-banner-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.cookie-banner p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
}

.cookie-banner a {
    color: var(--brand-green);
    font-weight: 800;
    text-decoration: underline;
}

@media (max-width: 600px) {
    .cookie-banner-inner { flex-direction: column; align-items: flex-start; }
    .cookie-banner .btn { width: 100%; }
}

.verification-banner-pending {
    background: rgba(245, 158, 11, 0.1);
    color: #b45309;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.verification-banner-failed {
    background: rgba(239, 68, 68, 0.1);
    color: #991b1b;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.verification-banner-pending .btn,
.verification-banner-failed .btn {
    border-color: currentColor;
    color: currentColor;
}

.verification-banner-pending .btn:hover,
.verification-banner-failed .btn:hover {
    background: rgba(255,255,255,0.15);
}

@media (max-width: 1000px) {
    .mobile-menu-toggle { display: flex; }
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--banner-bg);
        border-bottom: 2px solid var(--banner-accent);
        padding: 1rem 20px;
        box-shadow: 0 20px 40px rgba(0,0,0,0.35);
        max-height: calc(100vh - 80px);
        overflow-y: auto;
        z-index: 999;
    }
    .main-nav.open { display: block; }
    .header-container { position: relative; }
    .nav-list {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }
    .nav-list li {
        width: 100%;
        margin: 0;
    }
    .nav-list li:first-child { margin-left: 0; }
    .nav-link {
        display: flex;
        justify-content: space-between;
        padding: 12px 10px;
        font-size: 1rem;
        border-radius: 10px;
    }
    .nav-link-portal {
        color: var(--banner-accent) !important;
    }
    .nav-link-portal:hover {
        background: rgba(255,255,255,0.08);
        color: var(--banner-accent) !important;
    }
    .nav-link:hover { background: rgba(255,255,255,0.08); }
    .nav-list .btn {
        width: 100%;
        margin-top: 4px;
        justify-content: center;
    }
    .nav-avatar {
        width: 22px;
        height: 22px;
        font-size: 0.65rem;
    }
    .nav-avatar-badge {
        top: -1px;
        left: 14px;
        min-width: 14px;
        height: 14px;
        font-size: 0.55rem;
    }
    .nav-dropdown {
        position: static;
        width: 100%;
    }
    .nav-dropdown-menu {
        position: static;
        display: none;
        width: 100%;
        background: rgba(0,0,0,0.2);
        border: none;
        box-shadow: none;
        padding: 4px 0;
        margin-top: 4px;
        border-radius: 10px;
    }
    .nav-dropdown.open .nav-dropdown-menu {
        display: block;
    }
    .nav-dropdown-menu a,
    .nav-dropdown-logout {
        padding: 10px 16px;
        font-size: 0.95rem;
    }
    .nav-dropdown-divider {
        background: rgba(255,255,255,0.1);
        margin: 4px 12px;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}

@media (max-width: 600px) {
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-links h4 { margin-top: 1rem; }
}

/* --- THE GLASS CARD UPGRADE --- */
.stat-card, .plan-card-inner, .create-form-panel {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border) !important;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

    .stat-card:hover, .plan-card-inner:hover {
        transform: translateY(-5px);
        border-color: var(--brand-green) !important;
    }

/* --- COMPONENTS: RECOMMENDED RIBBON FIX --- */
/* Ensure the parent card has position: relative and overflow: hidden */
.plan-card-inner, .growth-card {
    position: relative;
    overflow: hidden;
}

.ribbon-recommended {
    position: absolute;
    top: 25px;
    right: -95px; /* Shifted right to prevent text cutoff */
    width: 300px; /* Wider to keep edges hidden under the corner */
    background: var(--brand-green);
    color: white;
    text-align: center;
    padding: 8px 0;
    transform: rotate(45deg);
    font-weight: 900;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    z-index: 10;
    pointer-events: none;
}

/* =========================================================
   ALAMO DESIGN SYSTEM — Component Utilities
   ========================================================= */

/* --- Text & Surface Tokens --- */
.text-brand { color: var(--brand-green) !important; }
.text-brand-light { color: var(--logo-green) !important; }
.bg-brand { background-color: var(--brand-green) !important; }
.bg-brand-soft { background-color: var(--brand-green-soft) !important; }
.border-brand { border-color: var(--brand-green) !important; }

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 50px;
    border: none;
    font-weight: 800;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    line-height: 1;
    box-sizing: border-box;
    max-width: 100%;
}

.btn:hover { transform: scale(1.03); }

.btn-primary {
    background: var(--brand-green);
    color: white;
}

.btn-primary:hover {
    background: var(--brand-hover);
    box-shadow: 0 4px 14px var(--brand-green-glow);
}

.btn-secondary {
    background: transparent;
    color: var(--brand-green);
    border: 1px solid var(--brand-green);
}

.btn-secondary:hover {
    background: var(--brand-green-soft);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

.btn-ghost:hover {
    color: var(--brand-green);
    border-color: var(--brand-green);
}

/* --- Icon Buttons (bookmark, share) --- */
.btn-bookmark {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    padding: 5px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-bookmark svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    transition: 0.2s;
}

.btn-bookmark:hover,
.btn-bookmark:focus {
    color: #ef4444;
    transform: scale(1.15);
}

.btn-bookmark:hover svg,
.btn-bookmark:focus svg {
    fill: #ef4444;
}

.btn-bookmark.saved {
    color: #ef4444;
}

.btn-bookmark.saved svg {
    fill: #ef4444;
}

.btn-share {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    padding: 5px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-share svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    transition: 0.2s;
}

.btn-share:hover,
.btn-share:focus {
    color: #3b82f6;
    transform: scale(1.15);
}

/* --- COMPANY TRUST SCORE BADGE --- */
.trust-badge-wrapper { display: inline-flex; flex-direction: column; gap: 4px; max-width: 160px; }
.trust-badge { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 50px; border: 1px solid; font-weight: 900; white-space: nowrap; }
.trust-score { font-size: 1rem; letter-spacing: -0.5px; }
.trust-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.5px; }
.trust-meter { width: 100%; height: 4px; background: rgba(255,255,255,0.1); border-radius: 100px; overflow: hidden; }
.trust-meter-fill { height: 100%; border-radius: 100px; transition: width 0.4s ease; }
.trust-signals { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.trust-signal { font-size: 0.72rem; font-weight: 700; padding: 3px 8px; border-radius: 6px; }
.trust-signal-positive { background: rgba(16, 185, 129, 0.08); color: #10b981; }
.trust-signal-negative { background: rgba(239, 68, 68, 0.08); color: #f87171; }

/* --- Badges --- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.badge-green {
    background: var(--brand-green);
    color: white;
}

.badge-green-soft {
    background: var(--brand-green-soft);
    color: var(--brand-green);
    border: 1px solid var(--brand-green);
}

.badge-live::before {
    content: "";
    width: 6px;
    height: 6px;
    background: currentColor;
    border-radius: 50%;
    box-shadow: 0 0 0 2px var(--bg-main);
}

/* --- Cards --- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.card-hover:hover {
    transform: translateY(-4px);
    border-color: var(--brand-green);
}

.card-featured {
    border-left: 4px solid #b45309;
}

.card-featured:hover {
    border-left-color: var(--brand-green);
}

/* --- Inputs --- */
/* --- Inputs --- */
.input-brand:focus,
.input-brand-focus:focus {
    outline: none;
    border-color: var(--brand-green);
    box-shadow: 0 0 0 4px var(--brand-green-glow);
}

/* --- DROPDOWN OPTION READABILITY FIX --- */
/* Ensures every <select> dropdown option is readable in both light and dark mode.
   Some selects sit on dark containers (search pills) even in light mode, so options
   must explicitly set their own background/text instead of inheriting the select. */
select option,
select optgroup {
    background: #ffffff;
    color: #1e293b;
}

[data-theme="dark"] select option,
[data-theme="dark"] select optgroup {
    background: #1e293b;
    color: #f8fafc;
}

/* --- Page Structure --- */
.page-header {
    padding: 3rem 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--border-color);
}

.container-narrow {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-wide {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =========================================================
   MOBILE RESPONSIVENESS — Home + Jobs search
   ========================================================= */

/* Stack the homepage hero search pill on small screens */
@@media (max-width: 768px) {
    .hero-grid { padding: 5rem 0 7rem 0; }
    .hero-grid h2 { font-size: 2.4rem !important; letter-spacing: -1px !important; }
    .hero-grid p { font-size: 1rem !important; margin-bottom: 2rem !important; }

    .unified-search-pill {
        flex-direction: column !important;
        align-items: stretch !important;
        border-radius: 24px !important;
        padding: 12px !important;
        gap: 8px !important;
    }
    .unified-search-pill .divider { display: none !important; }
    .unified-search-pill input[type="text"],
    .unified-search-pill select {
        width: 100% !important;
        padding: 14px 16px !important;
        border-radius: 12px !important;
        background: var(--bg-main) !important;
        border: 1px solid var(--border-color) !important;
    }
    .unified-search-pill .filter-pill,
    .unified-search-pill .search-button-brand {
        width: 100% !important;
        justify-content: center !important;
    }
    .unified-search-pill > div[style*="position: relative"] {
        width: 100% !important;
    }
    .advanced-filters-row {
        gap: 8px !important;
    }
    .advanced-filters-row .filter-pill {
        flex: 1 1 45% !important;
        justify-content: center !important;
    }
    .filter-dropdown {
        left: 0 !important;
        right: 0 !important;
        width: auto !important;
        max-width: 100% !important;
    }

    /* Recent listings on homepage become stacked cards */
    .site-footer .footer-grid { grid-template-columns: 1fr; text-align: center; }
}

/* Stack job result cards on /Jobs */
@@media (max-width: 768px) {
    .search-header { padding: 2.5rem 0; }
    .search-header .unified-search-pill {
        flex-direction: column !important;
        align-items: stretch !important;
        border-radius: 20px !important;
        padding: 10px !important;
        gap: 8px !important;
    }
    .search-header .unified-search-pill input,
    .search-header .unified-search-pill select,
    .search-header .unified-search-pill .btn-search-brand {
        width: 100% !important;
        border-radius: 12px !important;
    }
    .search-header .unified-search-pill > div[style*="width: 1px"] { display: none !important; }

    .filter-row-results { gap: 10px !important; }
    .filter-group-inline {
        flex: 1 1 45% !important;
        min-width: 140px !important;
    }

    .job-result-card {
        flex-direction: column !important;
        align-items: flex-start !important;
        padding: 1.25rem !important;
        gap: 14px !important;
    }
    .job-result-card > a {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
        width: 100% !important;
    }
    .job-result-card .company-avatar {
        width: 48px !important;
        height: 48px !important;
    }
    .job-result-card > form {
        margin-left: 0 !important;
        align-self: flex-end !important;
    }

    /* Trending + recently viewed grids */
    #recently-viewed-grid,
    .premium-pinned-container > div[style*="display: grid"],
    div[style*="display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr))"] {
        grid-template-columns: 1fr !important;
    }

    /* Homepage recent listing rows */
    .home-listing-row {
        flex-direction: column !important;
        align-items: flex-start !important;
        padding: 1.25rem !important;
        gap: 14px !important;
    }
    .home-listing-row > div[style*="flex: 1"] {
        width: 100% !important;
    }
    .home-listing-row > div[style*="text-align: right"] {
        width: 100% !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        text-align: left !important;
        min-width: auto !important;
    }
}
