/* assets/css/site-header.css */
/* Reusable site header styles - Matrix Portal theme */

.site-header {
    position: relative;
    width: 100%;
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid #00ff41;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 255, 65, 0.3);
    padding: 0.75rem 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    backdrop-filter: blur(5px);
}

.site-header-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.site-header-logo a {
    font-family: 'Courier New', monospace;
    font-size: 1.3rem;
    font-weight: bold;
    color: #00ff41;
    text-decoration: none;
    text-shadow: 0 0 10px #00ff41, 0 0 20px #00ff41;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

/* Show abbreviated logo on smaller screens */
.site-header-logo a .logo-full {
    display: inline;
}

.site-header-logo a .logo-short {
    display: none;
}

/* Tablet - show short logo */
@media (max-width: 1100px) and (min-width: 769px) {
    .site-header-logo a .logo-full {
        display: none;
    }
    
    .site-header-logo a .logo-short {
        display: inline;
    }
}

.site-header-logo a:hover {
    text-shadow: 0 0 15px #00ff41, 0 0 30px #00ff41, 0 0 45px #00ff41;
    transform: scale(1.05);
}

.site-header-nav {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: nowrap;
    flex-shrink: 1;
}

.nav-link {
    font-family: 'Courier New', monospace;
    color: #00ff41;
    text-decoration: none;
    padding: 0.4rem 0.8rem;
    border: 1px solid transparent;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-link:hover {
    border-color: #00ff41;
    background: rgba(0, 255, 65, 0.1);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
    text-shadow: 0 0 5px #00ff41;
}

.nav-link.premium-nav {
    background: linear-gradient(135deg, rgba(0, 255, 65, 0.2), rgba(0, 200, 50, 0.2));
    border-color: #00ff41;
    font-weight: bold;
}

.nav-link.premium-nav:hover {
    background: linear-gradient(135deg, rgba(0, 255, 65, 0.3), rgba(0, 200, 50, 0.3));
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.5);
}

/* HAMBURGER MENU - HIDDEN ON DESKTOP */
.mobile-menu-toggle {
    display: none !important; /* Force hide on desktop */
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10;
}

.mobile-menu-toggle span {
    display: block;
    width: 30px;
    height: 3px;
    background: #00ff41;
    transition: all 0.3s ease;
    box-shadow: 0 0 5px #00ff41;
    border-radius: 2px;
}

.mobile-menu-toggle:hover span {
    box-shadow: 0 0 10px #00ff41;
    background: #00ff66;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .site-header {
        padding: 1rem;
        gap: 1rem;
    }

    .site-header-logo {
        order: 2;
        flex: 1;
        justify-content: center;
    }

    .site-header-logo a {
        font-size: 1.2rem;
    }
    
    /* Make sure only short logo shows on mobile - FORCE IT */
    .site-header .site-header-logo a .logo-full {
        display: none !important;
        visibility: hidden !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
    }
    
    .site-header .site-header-logo a .logo-short {
        display: inline !important;
        visibility: visible !important;
    }

    /* SHOW HAMBURGER ON MOBILE - ON LEFT SIDE */
    .mobile-menu-toggle {
        display: flex !important; /* Force show on mobile */
        order: 1; /* Position on left */
    }

    .site-header-nav {
        display: none;
        width: 100%;
        order: 3;
        flex-direction: column;
        gap: 0.5rem;
        padding-top: 1rem;
        border-top: 1px solid rgba(0, 255, 65, 0.3);
        margin-top: 1rem;
    }

    .site-header-nav.active {
        display: flex;
    }

    .nav-link {
        width: 100%;
        text-align: center;
        padding: 0.75rem 1rem;
    }

    /* Hamburger animation to X */
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
        transform: translateX(-20px);
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(8px, -8px);
    }
}

@media (max-width: 480px) {
    .site-header {
        padding: 0.75rem;
    }

    .site-header-logo a {
        font-size: 1.2rem;
        letter-spacing: 1px;
    }

    .nav-link {
        font-size: 0.9rem;
    }

    .mobile-menu-toggle {
        width: 28px;
        height: 22px;
    }

    .mobile-menu-toggle span {
        width: 28px;
        height: 2.5px;
    }
}

/* Glitch effect for logo on hover */
@keyframes glitch {
    0% {
        transform: translate(0);
    }
    20% {
        transform: translate(-2px, 2px);
    }
    40% {
        transform: translate(-2px, -2px);
    }
    60% {
        transform: translate(2px, 2px);
    }
    80% {
        transform: translate(2px, -2px);
    }
    100% {
        transform: translate(0);
    }
}

.site-header-logo a:active {
    animation: glitch 0.3s ease;
}
/* =========================================================================
   PUZZLES PAGE OVERRIDE
   Overrides puzzles-index.css .nav-link which has conflicting styles
   ========================================================================= */

.puzzles-container .site-header .nav-link {
    font-size: 0.85rem !important;
    padding: 0.3rem 0.5rem !important;
    white-space: nowrap;
    border: 1px solid transparent !important;
    border-radius: 4px !important;
    background: transparent !important;
    box-shadow: none !important;
    font-weight: normal !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    transform: none !important;
}

.puzzles-container .site-header .nav-link:hover {
    background: rgba(0, 255, 65, 0.1) !important;
    color: #00ff41 !important;
    border-color: #00ff41 !important;
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.3) !important;
    transform: none !important;
}

.puzzles-container .site-header {
    padding: 0.6rem 1.5rem;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 0.5rem;
}

.puzzles-container .site-header-nav {
    flex-wrap: nowrap !important;
    gap: 0.5rem;
    flex-shrink: 1;
    min-width: 0;
}

@media (max-width: 900px) {
    .puzzles-container .site-header {
        flex-wrap: wrap;
        justify-content: center;
    }
    .puzzles-container .site-header-nav {
        flex-wrap: wrap !important;
        justify-content: center;
    }
}