/*
Theme Name: ZIMNGOs Child
Description: Child theme for ZIMNGOs Jobs Portal
Template: storefront
Version: 1.0.0
*/

/* ============================================================
   1. GLOBAL UI TOKENS
   ============================================================ */
:root {
    --zn-blue:       #1b4f72;
    --zn-blue-dk:    #154360;
    --zn-green:      #1a7a4a;
    --zn-green-dk:   #145c38;
    --zn-green-lt:   #e8fff5;
    --zn-bg:         #f0f4f8;
    --zn-surface:    #ffffff;
    --zn-border:     #d1d9e0;
    --zn-text:       #24292e;
    --zn-text-muted: #57606a;
    --zn-shadow-sm:  0 1px 3px rgba(0,0,0,0.12);
    --zn-shadow-lg:  0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --zn-radius:     12px;
}

/* ============================================================
   2. RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

body {
    background-color: var(--zn-bg) !important;
    color: var(--zn-text);
    font-family: 'Instrument Sans', 'Inter', -apple-system, system-ui, sans-serif;
    line-height: 1.6;
    margin: 0;
}

.zn-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================================
   3. HEADER
   ============================================================ */
.zn-header {
    background: var(--zn-surface);
    border-bottom: 1px solid var(--zn-border);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--zn-shadow-sm);
}

.zn-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.zn-logo {
    font-size: 24px;
    font-weight: 900;
    text-decoration: none;
    color: var(--zn-blue);
    letter-spacing: -1px;
}

.zn-logo span { color: var(--zn-green); }

.zn-nav-desktop ul {
    display: flex;
    list-style: none;
    gap: 28px;
    margin: 0;
    padding: 0;
}

.zn-nav-desktop a {
    text-decoration: none;
    color: var(--zn-text);
    font-weight: 600;
    font-size: 15px;
    transition: color 0.2s;
}

.zn-nav-desktop a:hover { color: var(--zn-green); }

.zn-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.zn-btn-cta {
    background: var(--zn-green);
    color: white !important;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s;
}

.zn-btn-cta:hover { background: var(--zn-green-dk); }

.zn-mobile-toggle {
    display: none;
    background: none;
    border: 1px solid var(--zn-border);
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 18px;
    cursor: pointer;
}

/* ============================
   FIX DESKTOP VS MOBILE NAV
   ============================ */

@media (max-width: 900px) {

    /* Hide desktop nav on mobile */
    .zn-nav-desktop {
        display: none !important;
    }

    /* Show hamburger button */
    .zn-mobile-toggle {
        display: block !important;
    }
}


/* ============================================================
   5. HERO
   ============================================================ */
.zn-portal-hero {
    background: linear-gradient(135deg, var(--zn-blue), var(--zn-blue-dk));
    color: white;
    padding: 60px 0 50px;
    text-align: center;
}

.zn-portal-hero h1 {
    font-size: 2.4rem;
    font-weight: 900;
    margin: 0 0 12px;
    color: white;
}

.zn-subtitle {
    font-size: 1.05rem;
    opacity: 0.9;
    margin: 0;
}

/* ============================================================
   6. FILTER BAR
   ============================================================ */
.zn-filter-portal {
    background: var(--zn-surface);
    border: 1px solid var(--zn-border);
    border-radius: var(--zn-radius);
    padding: 24px 28px;
    margin: 30px 0 0;
    box-shadow: var(--zn-shadow-sm);
}

.zn-filter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr auto;
    gap: 16px;
    align-items: end;
}

.zn-field label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 6px;
    color: var(--zn-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.zn-field input,
.zn-field select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--zn-border);
    border-radius: 8px;
    font-size: 14px;
    background: var(--zn-bg);
    color: var(--zn-text);
    outline: none;
    transition: border-color 0.2s;
}

.zn-field input:focus,
.zn-field select:focus { border-color: var(--zn-green); }

.zn-btn-search {
    background: var(--zn-blue);
    color: white;
    border: none;
    padding: 11px 24px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.zn-btn-search:hover { background: var(--zn-blue-dk); }

/* ============================================================
   7. PORTAL LAYOUT (70/30 GRID)
   ============================================================ */
.zn-portal-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 40px;
    margin-top: 30px;
    align-items: start;
}

/* ============================================================
   8. LISTING HEADER
   ============================================================ */
.zn-listing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.zn-listing-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--zn-blue);
}

/* ============================================================
   9. JOB CARDS
   ============================================================ */
.job_listings {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.job_listing {
    background: var(--zn-surface) !important;
    border: 1px solid var(--zn-border) !important;
    border-radius: var(--zn-radius) !important;
    margin-bottom: 16px !important;
    padding: 22px 26px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.job_listing:hover {
    border-color: var(--zn-green) !important;
    transform: translateY(-2px);
    box-shadow: var(--zn-shadow-lg) !important;
}

.job_listing .position h3 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    color: var(--zn-blue);
}

.job_listing .location {
    color: var(--zn-text-muted);
    font-size: 0.88rem;
}

/* ============================================================
   10. SIDEBAR
   ============================================================ */
.zn-sidebar {
    position: sticky;
    top: 90px;
}

.zn-sidebar-card {
    background: var(--zn-surface);
    border: 1px solid var(--zn-border);
    border-radius: var(--zn-radius);
    padding: 26px;
    margin-bottom: 22px;
    box-shadow: var(--zn-shadow-sm);
}

.zn-sidebar-card h4,
.zn-sidebar-card h5 {
    margin-top: 0;
    color: var(--zn-blue);
}

.zn-premium-card {
    background: linear-gradient(135deg, var(--zn-blue), var(--zn-blue-dk)) !important;
    color: white;
    border: none !important;
}

.zn-premium-card h4 { color: white !important; }
.zn-premium-card p  { opacity: 0.9; font-size: 0.9rem; }

.zn-card-badge {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.zn-check-list {
    list-style: none;
    padding: 0;
    margin: 12px 0 0;
}

.zn-check-list li {
    padding: 6px 0;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--zn-border);
}

.zn-check-list li:last-child { border-bottom: none; }

.zn-resource-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.zn-resource-links li { padding: 8px 0; border-bottom: 1px solid var(--zn-border); }
.zn-resource-links li:last-child { border-bottom: none; }
.zn-resource-links a { color: var(--zn-blue); text-decoration: none; font-size: 0.9rem; font-weight: 600; }
.zn-resource-links a:hover { color: var(--zn-green); }

/* ============================================================
   11. BUTTONS
   ============================================================ */
.zn-btn-sidebar,
.application_button,
.zn-btn-submit {
    display: block;
    width: 100%;
    background: var(--zn-green) !important;
    color: white !important;
    text-align: center;
    padding: 14px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 15px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    box-shadow: 0 4px 6px rgba(26,122,74,0.2);
    margin-top: 12px;
}

.zn-btn-sidebar:hover,
.application_button:hover,
.zn-btn-submit:hover { background: var(--zn-green-dk) !important; }

/* ============================================================
   12. BADGES
   ============================================================ */
.zn-integrity-badge,
.zn-no-ad-message {
    display: inline-block;
    background: var(--zn-green-lt);
    color: var(--zn-green);
    border: 1px solid #b2dfcc;
    padding: 7px 14px;
    border-radius: 30px;
    font-size: 0.82rem;
    font-weight: 700;
}

/* ============================================================
   13. SINGLE JOB PAGE
   ============================================================ */
.zn-single-wrapper { padding: 40px 0; }

.zn-job-header-main {
    margin-bottom: 30px;
}

.zn-single-title {
    font-size: 2rem;
    color: var(--zn-blue);
    margin: 0 0 14px;
}

.zn-meta-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.zn-badge {
    background: var(--zn-green-lt);
    color: var(--zn-green);
    border: 1px solid #b2dfcc;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
}

.zn-single-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    align-items: start;
}

.zn-action-sidebar {
    position: sticky;
    top: 90px;
}

.zn-sidebar-box {
    background: var(--zn-surface);
    border: 1px solid var(--zn-border);
    border-radius: var(--zn-radius);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--zn-shadow-sm);
}

.zn-brand-box img { max-width: 100px; margin-bottom: 12px; }
.zn-funding-tag { color: var(--zn-text-muted); font-size: 0.85rem; margin: 0; }

.zn-wa-link {
    display: block;
    background: #25d366;
    color: white !important;
    text-align: center;
    padding: 12px;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    margin-top: 8px;
    transition: opacity 0.2s;
}

.zn-wa-link:hover { opacity: 0.88; }

.zn-job-body { line-height: 1.8; }
.zn-job-body h3 { color: var(--zn-blue); }

/* ============================================================
   14. FOOTER
   ============================================================ */
.zn-footer {
    background: var(--zn-blue);
    color: rgba(255,255,255,0.85);
    padding: 60px 0 0;
    margin-top: 80px;
}

.zn-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
}

.zn-foot-title {
    color: white;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0;
    margin-bottom: 16px;
}

.zn-foot-col .zn-logo { color: white; font-size: 20px; }
.zn-foot-col .zn-logo span { color: #4dd68c; }
.zn-foot-col p { font-size: 0.88rem; margin-top: 10px; }

.zn-foot-menu { list-style: none; padding: 0; margin: 0; }
.zn-foot-menu li { margin-bottom: 10px; }
.zn-foot-menu a { color: rgba(255,255,255,0.8); text-decoration: none; font-size: 0.9rem; }
.zn-foot-menu a:hover { color: white; }

.zn-linkedin-btn {
    display: inline-block;
    background: #0a66c2;
    color: white !important;
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    text-decoration: none;
    margin-top: 12px;
    transition: opacity 0.2s;
}

.zn-linkedin-btn:hover { opacity: 0.88; }

.zn-footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 20px 0;
}

.zn-bottom-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    opacity: 0.7;
}

.zn-bottom-inner p { margin: 0; }

/* ============================================================
   15. ALERT FORM IN FOOTER
   ============================================================ */
.zn-alert-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.zn-alert-email,
.zn-alert-sector {
    width: 100%;
    padding: 11px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.1);
    color: white;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.zn-alert-email::placeholder { color: rgba(255,255,255,0.5); }

.zn-alert-email:focus,
.zn-alert-sector:focus { border-color: #4dd68c; }

.zn-alert-sector option { background: var(--zn-blue-dk); color: white; }

.zn-alert-btn {
    background: #4dd68c;
    color: var(--zn-blue-dk);
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.zn-alert-btn:hover { opacity: 0.88; }
.zn-alert-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ============================================================
   16. MOBILE
   ============================================================ */
@media (max-width: 991px) {
    .zn-portal-layout,
    .zn-single-grid { grid-template-columns: 1fr !important; }

    .zn-filter-grid { grid-template-columns: 1fr 1fr; }

    .zn-footer-grid { grid-template-columns: 1fr; gap: 30px; }

    .zn-job-listing { flex-direction: column; align-items: flex-start; gap: 15px; }

    .zn-mobile-toggle { display: block; }

    .zn-nav-desktop { display: none; }

    .zn-portal-hero h1 { font-size: 1.7rem; }

    .zn-listing-header { flex-direction: column; align-items: flex-start; gap: 10px; }

    .zn-bottom-inner { flex-direction: column; gap: 6px; text-align: center; }
}

@media (max-width: 600px) {
    .zn-filter-grid { grid-template-columns: 1fr; }
    .zn-btn-search { width: 100%; }
}

/* Fix for Footer Select Dropdown */
.zn-alert-sector {
    appearance: none; /* Removes default styling */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px !important;
}

.zn-alert-sector option {
    background-color: var(--zn-blue-dk) !important;
    color: white !important;
    padding: 10px;
}

/* ============================================================
   FIX: SELECT BOX HEIGHT & SCROLLBAR ISSUE
   ============================================================ */

/* 1. Reset the Select Box Height */
.zn-field select, 
.job_filters select, 
select.zn-alert-sector {
    height: 45px !important; /* Forces a single-line height */
    min-height: 45px !important;
    padding: 0 15px !important;
    display: block !important;
    overflow: hidden !important; /* Kills the internal scrollbar */
    appearance: none !important; /* Removes the browser's ugly default styling */
    -webkit-appearance: none !important;
    background-color: #fff !important;
    border: 1px solid #d1d9e0 !important;
    cursor: pointer !important;
}

/* 2. Restore the Dropdown Arrow (Since appearance:none hides it) */
.zn-field select, 
.job_filters select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%231b4f72' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 14px !important;
    padding-right: 40px !important;
}

/* 3. Fix the Layout Alignment (Ensure they stay in the grid) */
.zn-filter-grid {
    align-items: flex-end !important; /* Keeps the button and inputs on the same baseline */
}

/* ============================
   MOBILE MENU OVERLAY (NEW SYSTEM)
   ============================ */

#zn-mobile-overlay {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s ease;
}

#zn-mobile-overlay.active {
    transform: translateX(0);
}

/* TOP BAR */
.zn-mob-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px;
    background: var(--zn-green);
    color: #fff;
    font-size: 18px;
    font-weight: 700;
}

#zn-mob-close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
}

/* MENU BODY */
.zn-mob-body {
    background: #fff;
    flex: 1;
    padding: 28px 22px;
    overflow-y: auto;
}

/* MENU ITEMS */
.zn-mob-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.zn-mob-menu li {
    margin-bottom: 18px;
}

.zn-mob-menu li a {
    display: block;
    font-size: 18px;
    color: #0b2f3a;
    text-decoration: none;
    font-weight: 600;
    padding: 8px 0;
}

.zn-mob-menu li a:hover {
    color: var(--zn-green);
}

/* HAMBURGER BUTTON */
.zn-mobile-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.zn-menu-bar {
    display: block;
    width: 24px;
    height: 3px;
    background: #0b2f3a;
    margin: 4px 0;
    border-radius: 3px;
}

/* ============================================================
   RESTORE ZIMNGOs TOP GREEN ACCENT LINE
   ============================================================ */
/* Green accent line under the header */
.zn-header::after {
    content: "";
    display: block;
    width: 100%;
    height: 4px;
    background: #1a7a4a; /* ZIMNGOs green */
    position: absolute;
    bottom: -4px;
    left: 0;
}

/* Base menu layout */
.zn-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 24px;
    align-items: center;
}

/* Each top-level item must be relative for submenu positioning */
.zn-menu > li {
    position: relative;
}

/* Submenu container */
.zn-menu li ul {
    display: none;
    position: absolute;
    top: 100%; /* directly under parent */
    left: 0;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    padding: 10px 0;
    min-width: 200px;
    z-index: 9999;
}

/* Show submenu on hover */
.zn-menu li:hover > ul {
    display: block;
}

/* Submenu items */
.zn-menu li ul li {
    width: 100%;
}

.zn-menu li ul a {
    padding: 10px 16px;
    display: block;
    color: #0d1117;
    font-size: 14px;
}

.zn-menu li ul a:hover {
    background: #f4f6f9;
    color: #1a7a4a;
}
