/**
 * 🎯 LyDian Global Branding & Typography
 * Consistent logo font and mobile menu across all pages
 * Version: 1.0.0
 * Date: 2025-10-07
 */

/* ========== RIGHTEOUS FONT FOR LOGO ========== */
@font-face {
    font-family: 'Righteous';
    font-style: normal;
    font-weight: 400;
    font-display: block;
    src: url(https://fonts.gstatic.com/s/righteous/v14/1cXxaUPXBpj2rGoU7C9WhnGFucE.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ========== LOGO TYPOGRAPHY - UNIVERSAL ========== */

/* Logo Container */
.logo,
.nav-logo,
a[href="/"].logo,
a[href="index.html"].logo,
.navbar .logo,
header .logo {
    font-family: 'Righteous', cursive !important;
    font-size: 2.25rem !important;
    font-weight: 900 !important;
    color: #000000 !important;
    text-decoration: none !important;
    letter-spacing: -0.02em !important;
    line-height: 1 !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

/* Logo Icon - Round background with proper spacing */
.logo img {
    width: 40px !important;
    height: 40px !important;
    object-fit: contain !important;
    border-radius: 50% !important;
    background: rgba(16, 163, 127, 0.1) !important;
    padding: 6px !important;
    flex-shrink: 0 !important;
}

/* Logo in Footer */
footer .logo,
.footer-logo,
.footer .brand {
    font-family: 'Righteous', cursive !important;
    font-size: 1.875rem !important;
    font-weight: 900 !important;
    color: #000000 !important;
    text-decoration: none !important;
    letter-spacing: -0.02em !important;
}

/* Logo Hover State */
.logo:hover,
.nav-logo:hover,
footer .logo:hover {
    opacity: 0.8 !important;
    transform: translateY(-1px) !important;
}

/* Responsive Logo Sizes */
@media (max-width: 768px) {
    .logo,
    .nav-logo {
        font-size: 1.75rem !important;
    }

    .logo img {
        width: 36px !important;
        height: 36px !important;
    }

    footer .logo {
        font-size: 1.5rem !important;
    }
}

@media (max-width: 480px) {
    .logo,
    .nav-logo {
        font-size: 1.5rem !important;
        gap: 8px !important;
    }

    .logo img {
        width: 32px !important;
        height: 32px !important;
        padding: 4px !important;
    }

    footer .logo {
        font-size: 1.25rem !important;
    }
}

/* ========== MOBILE MENU FIX - PROFESSIONAL ========== */

/* Mobile Menu Container - ONLY affects mobile menu, not desktop nav-links */
.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 85vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Mobile Menu Open State */
.mobile-menu.active {
    transform: translateX(0) !important;
}

/* Mobile Menu Items - Large touch targets */
.mobile-menu a {
    display: block !important;
    padding: 1.25rem 1.5rem !important;
    color: #000000 !important;
    text-decoration: none !important;
    font-size: 1.125rem !important;
    font-weight: 600 !important;
    border-radius: 12px !important;
    transition: all 0.2s ease !important;
    background: rgba(16, 163, 127, 0.05) !important;
    border-left: 3px solid transparent !important;
    min-height: 56px !important;
    display: flex !important;
    align-items: center !important;
}

.mobile-menu a:hover,
.mobile-menu a:active {
    background: rgba(16, 163, 127, 0.15) !important;
    border-left-color: #10A37F !important;
    transform: translateX(4px) !important;
}

/* Mobile Menu Toggle Button */
.menu-toggle,
.mobile-menu-toggle,
.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
    transition: transform 0.3s ease;
}

.menu-toggle span,
.mobile-menu-toggle span,
.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: #000000;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hamburger Active State (X) */
.menu-toggle.active span:nth-child(1),
.mobile-menu-toggle.active span:nth-child(1),
.hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

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

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

/* Mobile Overlay */
.mobile-overlay,
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 9998;
}

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

/* ========== RESPONSIVE BREAKPOINTS ========== */

@media (max-width: 768px) {
    /* Show mobile menu toggle */
    .menu-toggle,
    .mobile-menu-toggle,
    .hamburger {
        display: flex !important;
    }

    /* Mobile menu takes full width on small screens */
    .mobile-menu {
        max-width: 100%;
    }
}

@media (min-width: 769px) {
    /* Hide mobile menu on desktop - ALWAYS */
    .mobile-menu,
    .menu-toggle,
    .mobile-menu-toggle,
    .hamburger,
    .mobile-overlay,
    .menu-overlay {
        display: none !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }
}

/* ========== SMOOTH SCROLLING FIX ========== */

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

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

/* Focus visible for keyboard navigation */
.menu-toggle:focus-visible,
.mobile-menu a:focus-visible,
.nav-links a:focus-visible {
    outline: 2px solid #000000 !important;
    outline-offset: 2px !important;
}

/* Skip to main content */
.skip-to-main {
    position: absolute;
    top: -40px;
    left: 0;
    background: #000000;
    color: #ffffff;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 10000;
}

.skip-to-main:focus {
    top: 0;
}

/* ========== DARK MODE SUPPORT ========== */

@media (prefers-color-scheme: dark) {
    .mobile-menu {
        background: rgba(17, 24, 39, 0.98);
    }

    .mobile-menu a {
        color: #ffffff !important;
    }

    .mobile-menu a:hover {
        background: rgba(255, 255, 255, 0.1) !important;
    }

    .menu-toggle span,
    .mobile-menu-toggle span,
    .hamburger span {
        background: #ffffff;
    }
}

/* ========== PRINT STYLES ========== */

@media print {
    .mobile-menu,
    .menu-toggle,
    .mobile-menu-toggle,
    .hamburger,
    .mobile-overlay,
    .menu-overlay {
        display: none !important;
    }
}

/* ========== PERFORMANCE OPTIMIZATION ========== */

/* GPU acceleration for smooth animations */
.mobile-menu,
.menu-toggle,
.mobile-overlay {
    will-change: transform, opacity;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* ========== CUSTOM SCROLLBAR FOR MOBILE MENU ========== */

.mobile-menu::-webkit-scrollbar {
    width: 6px;
}

.mobile-menu::-webkit-scrollbar-track {
    background: transparent;
}

.mobile-menu::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.mobile-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}
