/* ============================================
   LANDING HEADER - VERSION 2
   Fixed Header with Mobile Hamburger Menu
   ============================================ */

/* Header Container */
.version2-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #0a0a0a;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

/* Decorative Top Border */
.version2-header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        #f0890b 15%,
        #ff6b35 50%,
        #f0890b 85%,
        transparent 100%
    );
    opacity: 0.7;
}

/* Scrolled State */
.version2-header.scrolled {
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.5);
}

.nav-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    justify-content: center;
    align-items: center;
    align-self: stretch;
    padding: 0 16px;
}

@media (max-width: 964px) {
    .nav-buttons {
        margin-top: 20px;
    }
}

/* Container */
.version2-container {
    max-width: 1440px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 !important;
}

@media (min-width: 1460px) {
    .version2-container {
        min-width: 1440px;
    }
}

@media (max-width: 1440px) {
    .version2-container {
        width: 100%;
        padding: 16px 24px;
    }
}

/* Logo */
.version2-logo {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
    flex-shrink: 0;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #ffffff 0%, #f0890b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    cursor: pointer;
    transition: transform 0.3s ease, filter 0.3s ease;
    user-select: none;
}

.version2-logo:hover {
    transform: scale(1.05);
    filter: brightness(1.2);
}

/* Navigation */
.version2-nav {
    display: flex;
    align-items: center;
    gap: 32px;
    flex: 1;
    justify-content: center;
}

/* Ensure nav is visible on desktop */
@media (min-width: 965px) {
    .version2-nav,
    .version2-buttons {
        display: flex !important;
        position: relative !important;
        top: auto !important;
        right: auto !important;
        bottom: auto !important;
        height: auto !important;
        width: auto !important;
        max-width: none !important;
        background: transparent !important;
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
        overflow: visible !important;
    }

    .version2-nav {
        flex: 1 !important;
        flex-direction: row !important;
        justify-content: center !important;
    }

    .version2-buttons {
        flex-direction: row !important;
    }
}

/* Hide nav on screens below 964px (will show hamburger instead) */
@media (max-width: 964px) {
    .version2-nav,
    .version2-buttons {
        display: none !important;
    }
}

.version2-nav a {
    position: relative;
    color: #eaecef;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    padding: 8px 0;
    white-space: nowrap;
    transition: color 0.3s ease;
}

.version2-nav a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #f0890b, #ff6b35);
    transition: width 0.3s ease;
}

.version2-nav a:hover {
    color: #f0890b;
}

.version2-nav a:hover::after {
    width: 100%;
}

.version2-nav a:focus {
    outline: 2px solid #f0890b;
    outline-offset: 4px;
    border-radius: 4px;
}

/* Buttons Container */
.version2-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.version2-btn {
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    white-space: nowrap;
    letter-spacing: 0.3px;
    font-family: inherit;
}

.version2-register {
    background: linear-gradient(135deg, #f0890b 0%, #ff6b35 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(240, 137, 11, 0.25);
}

.version2-register:hover {
    background: linear-gradient(135deg, #ff6b35 0%, #f0890b 100%);
    box-shadow: 0 6px 20px rgba(240, 137, 11, 0.4);
    transform: translateY(-2px);
}

.version2-register:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(240, 137, 11, 0.3);
}

.version2-login {
    background: rgba(234, 236, 239, 0.05);
    color: #eaecef;
    border: 2px solid rgba(234, 236, 239, 0.2);
    backdrop-filter: blur(10px);
}

.version2-login:hover {
    background: rgba(234, 236, 239, 0.1);
    border-color: rgba(234, 236, 239, 0.4);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(234, 236, 239, 0.1);
    transform: translateY(-2px);
}

.version2-login:active {
    transform: translateY(0);
}

/* Hamburger Menu Button */
.version2-hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    flex-shrink: 0;
}

/* Ensure hamburger is hidden above 964px */
@media (min-width: 965px) {
    .version2-hamburger {
        display: none !important;
    }
}

.version2-hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background: #eaecef;
    border-radius: 3px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.version2-hamburger:hover span {
    background: #f0890b;
}

/* Hamburger Active Animation */
.version2-hamburger.active span:nth-child(1) {
    transform: translateY(10.5px) rotate(45deg);
}

.version2-hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.version2-hamburger.active span:nth-child(3) {
    transform: translateY(-10.5px) rotate(-45deg);
}

/* Body padding to compensate for fixed header */
body.version2 {
    padding-top: 72px;
}

/* ============================================
   TABLET RESPONSIVE - 1200px
   ============================================ */
@media (max-width: 1200px) {
    .version2-nav {
        gap: 24px;
    }

    .version2-nav a {
        font-size: 14px;
    }

    .version2-btn {
        padding: 9px 20px;
        font-size: 13px;
    }
}

/* ============================================
   TABLET RESPONSIVE - 1024px
   ============================================ */
@media (max-width: 1024px) {
    .version2-nav {
        gap: 20px;
    }

    .version2-nav a {
        font-size: 13px;
    }

    .version2-btn {
        padding: 8px 18px;
        font-size: 13px;
    }
}

/* ============================================
   TABLET RESPONSIVE - 992px
   ============================================ */
@media (max-width: 992px) {
    .version2-logo {
        font-size: 22px;
    }
}

/* ============================================
   MOBILE RESPONSIVE - 964px (Show Hamburger)
   ============================================ */
@media (max-width: 964px) {
    body.version2 {
        padding-top: 62px;
    }

    .version2-container {
        padding: 12px 20px !important;
        width: 100% !important;
    }

    .version2-logo {
        font-size: 20px;
        z-index: 1001;
        position: relative;
    }

    /* Show Hamburger */
    .version2-hamburger {
        display: flex !important;
    }

    /* Mobile Menu Wrapper - Combined Nav and Buttons */
    .version2-nav,
    .version2-buttons {
        display: flex !important;
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 85vw;
        max-width: 320px;
        background: #0a0a0a;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -5px 0 25px rgba(0, 0, 0, 0.8);
        z-index: 999;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Navigation Container */
    .version2-nav {
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 0;
        padding: 80px 0 120px 0;
        border-right: 1px solid rgba(240, 137, 11, 0.1);
    }

    /* Buttons Container - Fixed at Bottom */
    .version2-buttons {
        position: fixed;
        top: auto;
        bottom: -100%;
        right: 0%;
        height: auto;
        width: 85vw;
        flex-direction: column;
        gap: 12px;
        padding: 20px;
        z-index: 1000;
    }

    /* Show Navigation and Buttons when Active */
    .version2-nav.active {
        right: 0;
    }

    .version2-buttons.active {
        right: 0;
        bottom: 0;
    }

    /* Navigation Links in Mobile */
    .version2-nav a {
        width: 100%;
        padding: 18px 24px;
        font-size: 16px;
        font-weight: 500;
        border-bottom: 1px solid rgba(240, 137, 11, 0.08);
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
    }

    .version2-nav a:first-child {
        border-top: 1px solid rgba(240, 137, 11, 0.08);
    }

    .version2-nav a::after {
        display: none;
    }

    .version2-nav a:hover,
    .version2-nav a:active {
        background: rgba(240, 137, 11, 0.05);
        padding-left: 32px;
        color: #f0890b;
        border-left: 3px solid #f0890b;
    }

    /* Mobile Buttons */
    .version2-btn {
        width: 100%;
        padding: 16px 24px;
        font-size: 16px;
        font-weight: 600;
        justify-content: center;
        text-align: center;
        display: flex;
        align-items: center;
    }

    .version2-register {
        order: 1;
    }

    .version2-login {
        order: 2;
    }

    /* Mobile Overlay */
    .version2-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.75);
        z-index: 998;
        opacity: 0;
        transition: opacity 0.4s ease;
        backdrop-filter: blur(2px);
    }

    .version2-overlay.active {
        display: block;
        opacity: 1;
    }

    /* Prevent body scroll when menu is open */
    body.version2.menu-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
    }
}

/* ============================================
   SMALL MOBILE - 480px
   ============================================ */
@media (max-width: 480px) {
    body.version2 {
        padding-top: 56px;
    }

    .version2-container {
        padding: 10px 16px;
    }

    .version2-logo {
        font-size: 18px;
    }

    .version2-nav,
    .version2-buttons {
        width: 90vw;
        max-width: 300px;
    }

    .version2-nav {
        padding: 70px 0 110px 0;
    }

    .version2-nav a {
        padding: 16px 20px;
        font-size: 15px;
    }

    .version2-nav a:hover,
    .version2-nav a:active {
        padding-left: 28px;
    }

    .version2-buttons {
        padding: 16px;
    }

    .version2-btn {
        padding: 14px 20px;
        font-size: 15px;
    }

    .version2-hamburger {
        width: 28px;
        height: 22px;
    }

    .version2-hamburger span {
        height: 2.5px;
    }

    .version2-hamburger.active span:nth-child(1) {
        transform: translateY(9.75px) rotate(45deg);
    }

    .version2-hamburger.active span:nth-child(3) {
        transform: translateY(-9.75px) rotate(-45deg);
    }
}

/* ============================================
   EXTRA SMALL MOBILE - 360px
   ============================================ */
@media (max-width: 360px) {
    body.version2 {
        padding-top: 52px;
    }

    .version2-container {
        padding: 8px 12px;
    }

    .version2-logo {
        font-size: 16px;
    }

    .version2-nav,
    .version2-nav {
        padding: 65px 0 100px 0;
    }

    .version2-nav a {
        padding: 14px 16px;
        font-size: 14px;
    }

    .version2-nav a:hover,
    .version2-nav a:active {
        padding-left: 24px;
    }

    .version2-buttons {
        padding: 14px;
    }

    .version2-btn {
        padding: 12px 16px;
        font-size: 14px;
    }

    .version2-hamburger {
        width: 26px;
        height: 20px;
    }

    .version2-hamburger span {
        height: 2px;
    }

    .version2-hamburger.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .version2-hamburger.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

/* Focus Styles */
.version2-btn:focus,
.version2-hamburger:focus {
    outline: 2px solid #f0890b;
    outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .version2-header,
    .version2-logo,
    .version2-nav a,
    .version2-btn,
    .version2-hamburger,
    .version2-hamburger span,
    .version2-overlay {
        transition: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .version2-header {
        border-bottom: 2px solid #ffffff;
    }

    .version2-nav a,
    .version2-btn {
        border: 2px solid currentColor;
    }
}

/* Print Styles */
@media print {
    .version2-header {
        position: static;
        box-shadow: none;
    }

    .version2-hamburger,
    .version2-buttons {
        display: none;
    }

    body.version2 {
        padding-top: 0;
    }
}
