/* ============================================================================
   PAWN ISLAND ACADEMY - CHESS THEMED NAVBAR WITH GLASSMORPHISM 2025
   Dark Chess Theme with Advanced Animations & Cutting-Edge UX
   ============================================================================ */

/* CSS Custom Properties - Dark Chess Theme */
:root {
    /* Dark Chess Color Palette */
    --chess-black: #1a1a1a;
    --chess-dark-gray: #2d2d2d;
    --chess-medium-gray: #404040;
    
    --chess-gold: #ffd700;
    --chess-amber: #ffed4a;
    --chess-blue: #2c5aa0;
    --chess-white: #ffffff;
    --chess-shadow: rgba(0, 0, 0, 0.8);
    
    /* Glassmorphism Variables */
    --glass-bg: rgba(26, 26, 26, 0.85);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-blur: blur(20px);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    
    /* Typography System */
    --font-primary: 'Raleway', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-brand: 'Cinzel', 'Times New Roman', serif;
    
    /* Animation System */
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --duration-fast: 200ms;
    --duration-medium: 400ms;
    --duration-slow: 600ms;
    
    /* Navbar Dimensions */
    --navbar-height-mobile: 70px;
    --navbar-height-tablet: 80px;
    --navbar-height-desktop: 90px;
}

/* ============================================================================
   MAIN NAVBAR STYLES
   ============================================================================ */

.chess-navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--navbar-height-mobile);
    z-index: 1000;
    font-family: var(--font-primary);
    transition: all var(--duration-medium) var(--ease-smooth);
}

/* Glassmorphism Background */
.navbar-glass-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

/* Animated Chess Pattern */
.navbar-chess-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.05;
    background-image: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 20px,
            var(--chess-medium-gray) 20px,
            var(--chess-medium-gray) 21px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 20px,
            var(--chess-medium-gray) 20px,
            var(--chess-medium-gray) 21px
        );
    animation: chessPatternMove 30s linear infinite;
}

@keyframes chessPatternMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(20px, 20px); }
}

/* Main Container */
.navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 1rem;
    position: relative;
    z-index: 10;
    max-width: 1400px;
    margin: 0 auto;
}

/* ============================================================================
   BRAND SECTION
   ============================================================================ */

.brand-section {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.brand-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--chess-white);
    transition: all var(--duration-medium) var(--ease-smooth);
    position: relative;
    padding: 0.5rem;
    border-radius: 12px;
}

.brand-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(255, 215, 0, 0.1) 0%, 
        rgba(255, 237, 74, 0.1) 100%);
    border-radius: 12px;
    opacity: 0;
    transition: opacity var(--duration-medium) var(--ease-smooth);
}

.brand-link:hover::before,
.brand-link:focus::before {
    opacity: 1;
}

.brand-logo {
    width: 35px;
    height: 35px;
    margin-right: 0.75rem;
    filter: drop-shadow(0 0 10px var(--chess-gold));
}

.brand-svg {
    width: 100%;
    height: 100%;
    filter: invert(1) sepia(1) saturate(5) hue-rotate(45deg);
}

/* Spinning Logo Animation */
.spinning-logo {
    animation: spinClockwise 8s linear infinite;
}

@keyframes spinClockwise {
    from { transform: rotateY(0deg); }
    to { transform: rotateY(360deg); }
}

/* Brand Text Responsive */
.brand-text-full {
    display: none;
    flex-direction: column;
    line-height: 1.1;
}

.brand-text-compact {
    display: flex;
    align-items: center;
}

.brand-line-1,
.brand-line-2 {
    font-family: var(--font-brand);
    font-weight: 600;
    font-size: 0.9rem;
    background: linear-gradient(135deg, 
        var(--chess-white) 0%, 
        var(--chess-gold) 50%, 
        var(--chess-amber) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-compact {
    font-family: var(--font-brand);
    font-weight: 700;
    font-size: 1.1rem;
    background: linear-gradient(135deg, 
        var(--chess-white) 0%, 
        var(--chess-gold) 50%, 
        var(--chess-amber) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================================================
   NAVIGATION LINKS
   ============================================================================ */

.nav-links {
    display: none;
    align-items: center;
    gap: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--chess-white);
    border-radius: 12px;
    transition: all var(--duration-medium) var(--ease-smooth);
    position: relative;
    font-weight: 500;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
    border: 1px solid transparent;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(255, 215, 0, 0.1) 0%, 
        rgba(255, 237, 74, 0.1) 100%);
    border-radius: 12px;
    opacity: 0;
    transition: opacity var(--duration-medium) var(--ease-smooth);
}

.nav-link:hover::before,
.nav-link:focus::before {
    opacity: 1;
}

.nav-link:hover,
.nav-link:focus {
    transform: translateY(-2px);
    border-color: var(--chess-gold);
    color: var(--chess-gold);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.2);
}

.nav-link i {
    font-size: 1rem;
    transition: transform var(--duration-medium) var(--ease-smooth);
}

.nav-link:hover i {
    transform: scale(1.1);
}

/* ============================================================================
   MOBILE MENU
   ============================================================================ */

.mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    cursor: pointer;
    border-radius: 12px;
    transition: all var(--duration-medium) var(--ease-smooth);
    position: relative;
}

.mobile-menu-toggle::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(255, 215, 0, 0.1) 0%, 
        rgba(255, 237, 74, 0.1) 100%);
    border-radius: 12px;
    opacity: 0;
    transition: opacity var(--duration-medium) var(--ease-smooth);
}

.mobile-menu-toggle:hover::before {
    opacity: 1;
}

.hamburger {
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
    z-index: 10;
}

.hamburger span {
    width: 24px;
    height: 3px;
    background: var(--chess-white);
    border-radius: 2px;
    transition: all var(--duration-medium) var(--ease-smooth);
}

.mobile-menu-toggle:hover .hamburger span {
    background: var(--chess-gold);
}

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

.mobile-menu-toggle.active .hamburger span:nth-child(2) {
    opacity: 0;
}

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

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(20px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all var(--duration-slow) var(--ease-smooth);
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 2rem;
    animation: slideInFromTop var(--duration-slow) var(--ease-bounce);
}

@keyframes slideInFromTop {
    from {
        transform: translateY(-100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 3rem;
    padding-top: 2rem;
}

.mobile-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.mobile-logo {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    filter: invert(1) sepia(1) saturate(5) hue-rotate(45deg);
    animation: spinClockwise 8s linear infinite;
}

.mobile-brand-text {
    font-family: var(--font-brand);
    font-size: 1.5rem;
    font-weight: 600;
    background: linear-gradient(135deg, 
        var(--chess-white) 0%, 
        var(--chess-gold) 50%, 
        var(--chess-amber) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 1;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    text-decoration: none;
    color: var(--chess-white);
    background: rgba(45, 45, 45, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    transition: all var(--duration-medium) var(--ease-smooth);
    font-weight: 500;
    font-size: 1.1rem;
    backdrop-filter: blur(10px);
}

.mobile-nav-link:hover,
.mobile-nav-link:focus {
    background: rgba(255, 215, 0, 0.1);
    border-color: var(--chess-gold);
    color: var(--chess-gold);
    transform: translateX(10px);
}

.mobile-nav-link i {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

/* ============================================================================
   SCROLL BEHAVIOR
   ============================================================================ */

.chess-navbar.scrolled {
    height: calc(var(--navbar-height-mobile) - 10px);
}

.chess-navbar.scrolled .navbar-glass-bg {
    background: rgba(26, 26, 26, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */

/* Tablet */
@media (min-width: 768px) {
    .chess-navbar {
        height: var(--navbar-height-tablet);
    }
    
    .navbar-container {
        padding: 0 2rem;
    }
    
    .brand-logo {
        width: 42px;
        height: 42px;
        margin-right: 1rem;
    }
    
    .brand-text-compact {
        display: none;
    }
    
    .brand-text-full {
        display: flex;
    }
    
    .brand-line-1,
    .brand-line-2 {
        font-size: 1rem;
    }
    
    .mobile-menu-toggle {
        display: none;
    }
    
    .nav-links {
        display: flex;
    }
    
    .chess-navbar.scrolled {
        height: calc(var(--navbar-height-tablet) - 10px);
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .chess-navbar {
        height: var(--navbar-height-desktop);
    }
    
    .navbar-container {
        padding: 0 3rem;
    }
    
    .brand-logo {
        width: 48px;
        height: 48px;
    }
    
    .brand-line-1,
    .brand-line-2 {
        font-size: 1.1rem;
    }
    
    .nav-links {
        gap: 1rem;
    }
    
    .nav-link {
        padding: 0.875rem 1.25rem;
        font-size: 1rem;
    }
    
    .chess-navbar.scrolled {
        height: calc(var(--navbar-height-desktop) - 15px);
    }
}

/* Large Desktop */
@media (min-width: 1440px) {
    .navbar-container {
        padding: 0 4rem;
    }
    
    .nav-links {
        gap: 1.25rem;
    }
}

/* ============================================================================
   ACCESSIBILITY & MOTION
   ============================================================================ */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.brand-link:focus,
.nav-link:focus,
.mobile-nav-link:focus {
    outline: 2px solid var(--chess-gold);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .chess-navbar {
        display: none;
    }
}
