/* ==========================================
   SITE HEADER - Student Cycle
   Using global-typography.css variables
========================================== */

:root {
    --topbar-height-desktop: 42px;
    --main-header-height-desktop: 85px;
    --main-header-height-tablet: 70px;
    --main-header-height-mobile: 64px;
    --header-z-index: 1000;
}

.site-header {
    position: relative;
    width: 100%;
    z-index: var(--header-z-index);
}

/* ==========================================
   TOP BAR - Black Background
========================================== */

.topbar {
    background: var(--color-black, #111111);
    color: var(--color-white, #FFFFFF);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.topbar-inner {
    min-height: var(--topbar-height-desktop);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.topbar-left,
.topbar-right {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.topbar-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: var(--font-xs, 0.75rem);
    font-weight: var(--font-weight-regular, 400);
    line-height: var(--line-none, 1);
    color: var(--color-white, #FFFFFF);
    transition: color var(--transition-fast, 0.2s ease);
}

.topbar-link:hover,
.topbar-link:focus {
    color: var(--color-primary-light, #7B93FF);
    text-decoration: none;
}

.topbar-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary, #4D6AFF);
    font-size: var(--font-sm, 0.875rem);
}

.topbar-text {
    line-height: var(--line-none, 1);
}

.topbar-hours {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: var(--font-xs, 0.75rem);
    line-height: var(--line-none, 1);
    color: var(--color-white, #FFFFFF);
}

/* Social Links in Top Bar */
.social-link {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white, #FFFFFF);
    background: rgba(255, 255, 255, 0.1);
    transition: all var(--transition-fast, 0.2s ease);
    font-size: var(--font-sm, 0.875rem);
}

.social-link:hover,
.social-link:focus {
    background: var(--color-primary, #4D6AFF);
    color: var(--color-white, #FFFFFF);
    text-decoration: none;
    transform: translateY(-1px);
}

/* WhatsApp link special styling */
.whatsapp-link {
    background: rgba(37, 211, 102, 0.15);
    color: #25d366;
}

.whatsapp-link:hover,
.whatsapp-link:focus {
    background: #25d366;
    color: var(--color-white, #FFFFFF);
}

/* ==========================================
   MAIN HEADER - White Background
========================================== */

.main-header {
    position: relative;
    width: 100%;
    z-index: var(--header-z-index);
    background: var(--color-white, #FFFFFF);
    box-shadow: var(--shadow-sm, 0 1px 2px 0 rgba(0, 0, 0, 0.05));
    border-bottom: 1px solid var(--border-color, #E5E7EB);
    transition: box-shadow var(--transition-normal, 0.3s ease);
}

.main-header.is-fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    box-shadow: var(--shadow-md, 0 4px 6px -1px rgba(0, 0, 0, 0.1));
}

.main-header-spacer {
    height: 0;
}

.main-header-inner {
    min-height: var(--main-header-height-desktop);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

/* Logo - adjusted for 318x81px size */
.site-logo {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.site-logo-img {
    display: block;
    width: auto;
    height: 65px;
    max-width: 100%;
    object-fit: contain;
}

/* ==========================================
   NAVIGATION - Black Text
========================================== */

.site-nav {
    display: flex;
    align-items: center;
    gap: 25px;
    margin-left: auto;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 28px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-item {
    margin: 0;
}

.nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    font-size: var(--font-sm, 0.875rem);
    font-weight: var(--font-weight-semibold, 600);
    line-height: var(--line-none, 1);
    color: var(--color-text, #1A1A1A);
    padding: 8px 0;
    transition: color var(--transition-fast, 0.2s ease);
}

.nav-link:hover,
.nav-link:focus {
    color: var(--color-primary, #4D6AFF);
    text-decoration: none;
}

/* Underline effect on hover */
.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 2px;
    background: var(--color-primary, #4D6AFF);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-fast, 0.2s ease);
}

.nav-link:hover::after,
.nav-link:focus::after {
    transform: scaleX(1);
}

/* Active tab - Sky Blue */
.nav-link.active {
    color: var(--color-primary, #4D6AFF);
    font-weight: var(--font-weight-bold, 700);
}

.nav-link.active::after {
    transform: scaleX(1);
    background: var(--color-primary, #4D6AFF);
}

/* Navigation CTA Button */
.nav-cta {
    display: flex;
    align-items: center;
}

.nav-cta .btn {
    min-height: 42px;
    padding: 8px 22px;
    font-size: var(--font-sm, 0.875rem);
    font-weight: var(--font-weight-semibold, 600);
    white-space: nowrap;
}

/* ==========================================
   MOBILE TOGGLE
========================================== */

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.nav-toggle-line {
    width: 24px;
    height: 2px;
    background: var(--color-text, #1A1A1A);
    border-radius: 999px;
    transition: transform var(--transition-fast, 0.2s ease), opacity var(--transition-fast, 0.2s ease);
}

/* When menu is open, toggle icon becomes X */
.site-header.nav-open .nav-toggle-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.site-header.nav-open .nav-toggle-line:nth-child(2) {
    opacity: 0;
}

.site-header.nav-open .nav-toggle-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ==========================================
   RESPONSIVE BREAKPOINTS
========================================== */

/* Tablet (768px - 991px) */
@media (max-width: 991px) {
    .topbar {
        display: none;
    }

    .main-header-inner {
        min-height: var(--main-header-height-tablet);
        gap: 16px;
    }

    .site-logo-img {
        height: 52px;
    }

    /* Mobile Navigation */
    .nav-toggle {
        display: inline-flex;
    }

    .site-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: var(--color-white, #FFFFFF);
        box-shadow: var(--shadow-lg, 0 10px 15px -3px rgba(0, 0, 0, 0.1));
        padding: 20px 24px 24px;
        border-top: 1px solid var(--border-color, #E5E7EB);
    }

    .site-header.nav-open .site-nav {
        display: flex;
    }

    .nav-list {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        width: 100%;
    }

    .nav-item {
        width: 100%;
        border-bottom: 1px solid var(--border-color, #E5E7EB);
    }

    .nav-link {
        width: 100%;
        padding: 14px 0;
        justify-content: space-between;
        font-size: var(--font-base, 1rem);
        font-weight: var(--font-weight-semibold, 600);
    }

    /* Remove underline effect on mobile */
    .nav-link::after {
        display: none;
    }

    .nav-link.active {
        color: var(--color-primary, #4D6AFF);
        font-weight: var(--font-weight-bold, 700);
    }

    .nav-cta {
        margin-top: 20px;
        width: 100%;
    }

    .nav-cta .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Mobile (up to 767px) */
@media (max-width: 767px) {
    .topbar-text {
        display: none;
    }

    .topbar-icon {
        margin-right: 0;
    }

    .topbar-link {
        gap: 0;
    }

    .topbar-left {
        gap: 15px;
    }

    .main-header-inner {
        min-height: var(--main-header-height-mobile);
    }

    .site-logo-img {
        height: 45px;
    }

    .site-nav {
        padding: 16px 20px 20px;
    }

    .nav-link {
        padding: 12px 0;
        font-size: var(--font-sm, 0.9375rem);
    }

    .nav-cta .btn {
        min-height: 46px;
    }
}

/* Small Mobile (up to 480px) */
@media (max-width: 480px) {
    .topbar-left {
        gap: 12px;
    }

    .social-link {
        width: 28px;
        height: 28px;
        font-size: var(--font-xs, 0.75rem);
    }

    .site-logo-img {
        height: 40px;
    }

    .nav-toggle {
        width: 40px;
        height: 40px;
    }

    .nav-toggle-line {
        width: 20px;
    }
}

/* ==========================================
   UTILITY CLASSES
========================================== */

/* Hide hours on tablet/mobile */
@media (max-width: 991px) {
    .topbar-hours {
        display: none;
    }
}

/* Sticky header class (added via JS) */
.main-header.sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}