/* =========================================================
   SIMBA SITE HEADER
   ========================================================= */

.simba-site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    width: 100%;
    background: #faf6e8;
    border-bottom: 1px solid #eadfba;
    box-shadow: 0 4px 18px rgba(23, 32, 51, 0.08);
}


/* =========================================================
   BODY OFFSET FOR FIXED HEADER
   ========================================================= */

body {
    padding-top: 82px;
}

/* Background scroll lock when menu is opened */
body.menu-open {
    overflow: hidden !important;
    touch-action: none;
}


/* =========================================================
   WORDPRESS ADMIN BAR RESPONSIVE SYNC
   ========================================================= */

/* Desktop admin bar: 32px height */
@media screen and (min-width: 783px) {
    .admin-bar .simba-site-header {
        top: 32px;
    }
    .admin-bar {
        padding-top: 82px;
    }
}

/* Tablet & Mobile admin bar: WP changes height to 46px */
@media screen and (max-width: 782px) {
    .admin-bar .simba-site-header {
        top: 46px;
    }
    .admin-bar {
        padding-top: 72px;
    }
}

/* Mobile screen (< 600px): Keeps WP Admin bar fixed instead of scrolling away */
@media screen and (max-width: 600px) {
    #wpadminbar {
        position: fixed !important;
    }
    .admin-bar .simba-site-header {
        top: 46px;
    }
    .admin-bar {
        padding-top: 68px;
    }
}


/* =========================================================
   HEADER CONTAINER
   ========================================================= */

.simba-header-container {
    width: min(100% - 40px, 1400px);
    min-height: 82px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 30px;
}


/* =========================================================
   LOGO
   ========================================================= */

.simba-header-logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.simba-header-logo a,
.simba-header-logo .custom-logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.simba-header-logo img,
.simba-header-logo .custom-logo {
    display: block;
    width: auto;
    height: auto;
    max-width: 170px;
    max-height: 58px;
    object-fit: contain;
}


/* =========================================================
   DESKTOP HEADER & NAVIGATION
   ========================================================= */

.simba-desktop-header {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 28px;
}

.simba-navigation {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
}

.simba-navigation > a {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 10px 0;
    color: #555555;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    text-decoration: none;
    white-space: nowrap;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    transition: color 0.25s ease, transform 0.25s ease;
}

.simba-navigation > a:hover {
    color: #b8941f;
    transform: translateY(-1px);
    background: transparent;
}

.simba-navigation > a.active {
    color: #d4af37;
    background: transparent;
}

.simba-navigation > a.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 1px;
    width: 100%;
    height: 2px;
    background: #d4af37;
    border-radius: 999px;
}


/* =========================================================
   DESKTOP JOIN BUTTON
   ========================================================= */

.simba-join-button {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 46px;
    padding: 0 21px;
    background: #d4af37;
    color: #ffffff;
    border: 1px solid #d4af37;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.20);
    transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.simba-join-button:hover {
    background: #b8941f;
    border-color: #b8941f;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(184, 148, 31, 0.28);
}

.simba-join-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
    transition: transform 0.25s ease;
}

.simba-join-button:hover .simba-join-arrow {
    transform: translateX(4px);
}


/* =========================================================
   MOBILE MENU TOGGLE BUTTON
   ========================================================= */

.simba-mobile-menu-button {
    display: none;
    width: 46px;
    height: 46px;
    margin-left: auto;
    padding: 0;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    background: #ffffff;
    border: 1px solid #eadfba;
    border-radius: 8px;
    cursor: pointer;
    position: relative;
    z-index: 100002;
    transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.simba-mobile-menu-button span {
    display: block;
    width: 21px;
    height: 2px;
    background: #172033;
    border-radius: 999px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.simba-mobile-menu-button:hover {
    background: #faf6e8;
    border-color: #d4af37;
    box-shadow: 0 5px 14px rgba(212, 175, 55, 0.15);
}

.simba-mobile-menu-button.is-active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.simba-mobile-menu-button.is-active span:nth-child(2) {
    opacity: 0;
}

.simba-mobile-menu-button.is-active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}


/* =========================================================
   MOBILE MENU DRAWER & OVERLAY
   ========================================================= */

.simba-mobile-menu {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: calc(100dvh - 72px);
    max-height: calc(100dvh - 72px);

    display: block;
    background-color: #ffffff !important;
    border-top: 1px solid #eadfba;
    box-shadow: 0 14px 30px rgba(23, 32, 51, 0.12);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px);

    transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;

    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;

    z-index: 100000;
}

.simba-mobile-menu.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.simba-mobile-menu::-webkit-scrollbar {
    width: 5px;
}

.simba-mobile-menu::-webkit-scrollbar-track {
    background: #faf6e8;
}

.simba-mobile-menu::-webkit-scrollbar-thumb {
    background: #d4af37;
    border-radius: 999px;
}

.simba-mobile-menu-inner {
    width: min(100% - 40px, 700px);
    margin: 0 auto;
    padding: 22px 0 36px;
    display: flex;
    flex-direction: column;
}

.simba-mobile-navigation {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
}

.simba-mobile-navigation > a {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 52px;
    padding: 12px 10px;
    color: #555555;
    background: #ffffff;
    border-bottom: 1px solid #f0ead7;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
    transition: color 0.25s ease, padding-left 0.25s ease, background 0.25s ease;
}

.simba-mobile-navigation > a:hover {
    color: #b8941f;
    padding-left: 14px;
    background: #faf6e8;
}

.simba-mobile-navigation > a.active {
    color: #d4af37;
    font-weight: 700;
    background: #ffffff;
}

.simba-mobile-navigation > a.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 3px;
    height: 24px;
    background: #d4af37;
    border-radius: 999px;
    transform: translateY(-50%);
}

.simba-mobile-menu-cta {
    padding-top: 26px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.simba-mobile-join-button {
    width: 100%;
    max-width: 280px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    padding: 0 24px;
    background: #d4af37;
    color: #ffffff !important;
    border: 1px solid #d4af37;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.20);
    transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.simba-mobile-join-button:hover,
.simba-mobile-join-button:visited,
.simba-mobile-join-button:active {
    color: #ffffff !important;
    background: #b8941f;
    border-color: #b8941f;
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(184, 148, 31, 0.25);
}

.simba-mobile-join-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff !important;
    font-size: 18px;
    line-height: 1;
    transition: transform 0.25s ease;
}

.simba-mobile-join-button:hover .simba-mobile-join-arrow {
    transform: translateX(4px);
}


/* =========================================================
   MEDIA QUERY: TABLET (1200px and below)
   ========================================================= */

@media (max-width: 1200px) {
    .simba-header-container {
        width: min(100% - 32px, 1200px);
        gap: 20px;
    }

    .simba-desktop-header {
        gap: 20px;
    }

    .simba-navigation {
        gap: 20px;
    }

    .simba-navigation > a {
        font-size: 14px;
    }

    .simba-join-button {
        min-height: 44px;
        padding: 0 17px;
        font-size: 13px;
    }

    .simba-header-logo img,
    .simba-header-logo .custom-logo {
        max-width: 155px;
        max-height: 54px;
    }
}


/* =========================================================
   MEDIA QUERY: SMALL LAPTOP (1050px and below)
   ========================================================= */

@media (max-width: 1050px) {
    body {
        padding-top: 76px;
    }

    .simba-header-container {
        min-height: 76px;
    }

    .simba-navigation {
        gap: 15px;
    }

    .simba-navigation > a {
        font-size: 13px;
    }

    .simba-join-button {
        min-height: 43px;
        padding: 0 15px;
        font-size: 13px;
    }

    .simba-header-logo img,
    .simba-header-logo .custom-logo {
        max-width: 145px;
        max-height: 50px;
    }
}


/* =========================================================
   MEDIA QUERY: MOBILE VIEWPORT (1000px and below)
   ========================================================= */

@media (max-width: 1000px) {
    body {
        padding-top: 72px;
    }

    .simba-header-container {
        width: min(100% - 30px, 700px);
        min-height: 72px;
    }

    .simba-desktop-header {
        display: none;
    }

    .simba-mobile-menu-button {
        display: flex;
    }

    .simba-header-logo img,
    .simba-header-logo .custom-logo {
        max-width: 150px;
        max-height: 52px;
    }

    /* Standard mobile menu position */
    .simba-mobile-menu {
        top: 72px;
        height: calc(100dvh - 72px);
        max-height: calc(100dvh - 72px);
    }

    /* With Desktop WP Admin Bar (1000px down to 783px) */
    .admin-bar .simba-mobile-menu {
        top: 104px; /* 72px + 32px */
        height: calc(100dvh - 104px);
        max-height: calc(100dvh - 104px);
    }
}


/* =========================================================
   MEDIA QUERY: WP MOBILE BAR RANGE (782px and below)
   ========================================================= */

@media (max-width: 782px) {
    /* With Mobile WP Admin Bar (46px) */
    .admin-bar .simba-mobile-menu {
        top: 118px; /* 72px + 46px */
        height: calc(100dvh - 118px);
        max-height: calc(100dvh - 118px);
    }
}


/* =========================================================
   MEDIA QUERY: SMALL MOBILE (600px and below)
   ========================================================= */

@media (max-width: 600px) {
    body {
        padding-top: 68px;
    }

    .simba-header-container {
        width: calc(100% - 24px);
        min-height: 68px;
    }

    .simba-header-logo img,
    .simba-header-logo .custom-logo {
        max-width: 135px;
        max-height: 48px;
    }

    .simba-mobile-menu {
        top: 68px;
        height: calc(100dvh - 68px);
        max-height: calc(100dvh - 68px);
    }

    .admin-bar .simba-mobile-menu {
        top: 114px; /* 68px header + 46px WP bar */
        height: calc(100dvh - 114px);
        max-height: calc(100dvh - 114px);
    }

    .simba-mobile-menu-inner {
        width: calc(100% - 28px);
        padding-top: 18px;
        padding-bottom: 24px;
    }

    .simba-mobile-navigation > a {
        min-height: 50px;
        font-size: 15px;
    }

    .simba-mobile-join-button {
        min-height: 50px;
        font-size: 14px;
        max-width: 100%;
    }
}


/* =========================================================
   MEDIA QUERY: EXTRA SMALL MOBILE (380px and below)
   ========================================================= */

@media (max-width: 380px) {
    .simba-header-container {
        width: calc(100% - 20px);
    }

    .simba-mobile-menu-inner {
        width: calc(100% - 20px);
    }

    .simba-mobile-menu-button {
        width: 42px;
        height: 42px;
    }

    .simba-mobile-navigation > a {
        font-size: 14px;
    }

    .simba-mobile-join-button {
        min-height: 48px;
    }
}


/* =========================================================
   ACCESSIBILITY & FOCUS STATES
   ========================================================= */

.simba-navigation > a:focus-visible,
.simba-join-button:focus-visible,
.simba-mobile-menu-button:focus-visible,
.simba-mobile-navigation > a:focus-visible,
.simba-mobile-join-button:focus-visible {
    outline: 2px solid #d4af37;
    outline-offset: 4px;
}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
    .simba-navigation > a,
    .simba-join-button,
    .simba-join-arrow,
    .simba-mobile-menu-button,
    .simba-mobile-menu-button span,
    .simba-mobile-menu,
    .simba-mobile-navigation > a,
    .simba-mobile-join-button,
    .simba-mobile-join-arrow {
        transition: none;
    }
}