/* ============================================================
   D.R.I.V.E. Out Hunger – Child Theme Styles
   Colors are injected as CSS variables from the Customizer
   ============================================================ */

/* ── Reset / Base ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

/* ── Admin Bar Compatibility ────────────────────────────── */
.admin-bar .drive-header {
    top: 32px;
}
@media screen and (max-width: 782px) {
    .admin-bar .drive-header {
        top: 46px;
    }
}

/* ── Header Shell ───────────────────────────────────────── */
.drive-header {
    background-color: var(--drive-nav-bg, #1a3a5c);
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.drive-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 72px;
}

/* ── Logo ───────────────────────────────────────────────── */
.drive-header__logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    max-height: 52px;
    overflow: hidden;
}

/* Target the actual img WordPress outputs — beat the HTML width/height attrs */
img.custom-logo {
    width: auto !important;
    height: 52px !important;
    max-height: 52px !important;
    max-width: none !important;
    display: block !important;
}

.drive-header__site-name {
    color: var(--drive-nav-link, #ffffff);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

/* ── Nav List ───────────────────────────────────────────── */
.drive-header__nav {
    display: flex;
    align-items: center;
}

.drive-nav__list {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.drive-nav__list li a {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--drive-nav-link, #ffffff);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    border-radius: 4px;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.drive-nav__list li a:hover,
.drive-nav__list li a:focus,
.drive-nav__list li.current-menu-item > a {
    color: var(--drive-nav-hover, #f5a623);
    background-color: rgba(255, 255, 255, 0.08);
    outline: none;
}

/* ── Hamburger Button ───────────────────────────────────── */
.drive-header__hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    background: transparent !important;
    border: 2px solid var(--drive-nav-link, #ffffff) !important;
    border-radius: 6px;
    cursor: pointer;
    padding: 6px;
    transition: border-color 0.2s ease;
}

.drive-header__hamburger:hover {
    border-color: var(--drive-nav-hover, #f5a623) !important;
}

.drive-header__hamburger-bar {
    display: block;
    width: 22px;
    height: 2px;
    background-color: var(--drive-nav-link, #ffffff);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.2s ease;
    transform-origin: center;
}

.drive-header__hamburger:hover .drive-header__hamburger-bar {
    background-color: var(--drive-nav-hover, #f5a623);
}

/* ── Hello Elementor Reset Override ─────────────────────── */
.drive-header button,
.drive-header button:hover,
.drive-header button:focus {
    background-color: transparent !important;
    border-color: inherit;
    color: inherit;
}

/* ── Close button — hidden on desktop, shown on mobile ───── */
.drive-nav-close {
    display: none;
}

/* ── Mobile panel logo — hidden on desktop ──────────────── */
.drive-nav__mobile-logo {
    display: none;
}

/* ── Button Color Override ───────────────────────────────── */
a.elementor-button,
.elementor-button,
button.elementor-button,
input[type="submit"],
button[type="submit"] {
    background-color: var(--drive-button-color, #1a3a5c);
    border-color: var(--drive-button-color, #1a3a5c);
    color: var(--drive-button-text, #ffffff);
}

a.elementor-button:hover,
.elementor-button:hover,
button.elementor-button:hover,
input[type="submit"]:hover,
button[type="submit"]:hover {
    background-color: var(--drive-button-hover, #f5a623);
    border-color: var(--drive-button-hover, #f5a623);
    color: var(--drive-button-text, #ffffff);
}

/* ── Footer ─────────────────────────────────────────────── */
.drive-footer {
    background-color: var(--drive-nav-bg, #1a3a5c);
    color: var(--drive-nav-link, #ffffff);
    padding: 1.5rem;
    text-align: center;
    margin-top: auto;
}

.drive-footer__inner {
    max-width: 1200px;
    margin: 0 auto;
}

.drive-footer__copy {
    margin: 0;
    font-size: 0.875rem;
    opacity: 0.8;
}

/* ── Mobile ─────────────────────────────────────────────── */
@media (max-width: 768px) {

    .drive-header__hamburger {
        display: flex;
    }

    /* Full-screen slide-out panel from the right */
    .drive-header__nav {
        position: fixed;
        top: 0;
        right: 0;
        width: min(320px, 85vw);
        height: 100vh;
        background-color: var(--drive-nav-bg, #1a3a5c);
        box-shadow: -4px 0 24px rgba(0, 0, 0, 0.4);
        z-index: 99999;
        overflow-y: auto;
        padding: 5rem 0 2rem;
        transform: translateX(100%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    .drive-header__nav.is-open {
        transform: translateX(0);
    }

    /* Dim overlay — full screen behind nav panel */
    .drive-nav-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 100;
        opacity: 0;
        transition: opacity 0.35s ease;
    }

    .drive-nav-overlay.is-visible {
        display: block;
        opacity: 1;
    }

    /* Close button — visible on mobile only */
    .drive-nav-close {
        display: flex;
        position: absolute;
        top: 1rem;
        right: 1rem;
        background-color: transparent !important;
        background: transparent !important;
        border: 2px solid var(--drive-nav-link, #ffffff) !important;
        border-radius: 6px;
        color: var(--drive-nav-link, #ffffff) !important;
        font-size: 1.25rem;
        line-height: 1;
        width: 38px;
        height: 38px;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: border-color 0.2s, color 0.2s;
    }

    .drive-nav-close:hover,
    .drive-nav-close:focus {
        background-color: transparent !important;
        border-color: var(--drive-nav-hover, #f5a623) !important;
        color: var(--drive-nav-hover, #f5a623) !important;
        outline: none;
    }

    /* Mobile panel logo */
    .drive-nav__mobile-logo {
        display: flex;
        justify-content: center;
        width: 100%;
        padding: 0 1.5rem 1.5rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.15);
        margin-bottom: 0.5rem;
        /* margin-left: -1rem; */
    }

    .drive-nav__mobile-logo a {
        display: flex;
        align-items: center;
        text-decoration: none;
    }

    /* Override the HTML width/height attrs on the mobile panel logo */
    .drive-nav__mobile-logo img.custom-logo {
        width: auto !important;
        height: 80px !important;
        max-height: 80px !important;
        max-width: 100% !important;
        display: block !important;
    }

    /* Nav list layout */
    .drive-nav__list {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        width: 100%;
    }

    .drive-nav__list > li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .drive-nav__list > li:last-child {
        border-bottom: none;
    }

    .drive-nav__list > li > a {
        display: block;
        padding: 0.9rem 1.5rem;
        width: 100%;
        border-radius: 0;
        font-size: 1rem;
    }
}
