/* YVR PAH Custom Styles - Simplified */

/* Prevent navigation glitches and ensure proper positioning */
html {
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden;
}

body {
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden;
    position: relative;
}

/* Ensure sticky navigation doesn't cause visual glitches */
nav.sticky,
nav[class*="sticky"] {
    position: sticky !important;
    top: 0 !important;
    z-index: 50 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    width: 100% !important;
    left: 0 !important;
    right: 0 !important;
}

/* Prevent content from appearing above navigation */
.min-h-screen.flex.flex-col {
    margin: 0 !important;
    padding: 0 !important;
    position: relative;
}

/* Gallery links in dropdowns should be visible */
.nav-dropdown-menu a[href="/gallery/"],
.nav-dropdown-menu a[href="/gallery"] {
    display: block !important;
}

/* ===== SCREEN READER ONLY ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===== SKIP LINK (Accessibility) ===== */
.skip-link {
    position: absolute;
    top: -100px;
    left: 1rem;
    padding: 0.75rem 1.25rem;
    background: #3c77e0;
    color: white;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0.5rem;
    z-index: 10000;
    transition: top 0.2s ease;
}
.skip-link:focus {
    top: 1rem;
    outline: 2px solid white;
    outline-offset: 2px;
}

/* ===== LANGUAGE TOGGLE ===== */
[data-language-toggle="true"],
#lang-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    font-weight: 600;
}

/* ===== ANIMATIONS ===== */
@keyframes slideDown {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* ===== FORM STYLES ===== */
.form-message {
    margin-top: 1rem;
    animation: slideDown 0.3s ease-out;
}

#join-calendar-modal .glass-card {
    animation: fadeInScale 0.2s ease-out;
}

/* ===== NAVIGATION DROPDOWNS ===== */
.nav-dropdown-wrapper {
    position: relative;
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    min-width: 180px;
    background: rgba(17, 24, 39, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    padding: 0.5rem;
    z-index: 100;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

/* ===== MOBILE MENU ===== */
#mobile-menu-directory {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 100;
    display: none;
    flex-direction: column;
}

#mobile-menu-directory.open {
    display: flex;
}

.mobile-menu-header {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-menu-list {
    padding: 1rem 0;
    list-style: none;
    margin: 0;
}

.mobile-menu-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    color: #e5e7eb;
    text-decoration: none;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-menu-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #3c77e0;
}

.mobile-submenu {
    display: none;
    background: rgba(0, 0, 0, 0.3);
}

.mobile-submenu.open {
    display: block;
}

.mobile-submenu-link {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem 1rem 3rem;
    color: #b0b0b0;
    text-decoration: none;
    transition: all 0.2s ease;
}

.mobile-submenu-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #3c77e0;
}

/* ===== RESPONSIVE: MOBILE ===== */
@media (max-width: 1023px) {
    /* Show hamburger button on mobile */
    #mobile-menu-button {
        display: flex !important;
    }
    
    /* Hide desktop nav on mobile */
    nav .hidden.lg\:flex {
        display: none !important;
    }
}

/* ===== RESPONSIVE: DESKTOP ===== */
@media (min-width: 1024px) {
    /* Hide hamburger on desktop */
    #mobile-menu-button,
    .mobile-menu-toggle,
    button.lg\:hidden {
        display: none !important;
    }
    
    /* Show desktop nav */
    nav .hidden.lg\:flex {
        display: flex !important;
    }
}

/* ===== HIDE THEME TOGGLE ===== */
button[aria-label="Toggle theme"] {
    display: none !important;
}
