/* Tier expiry banner */
.tier-expiry-banner {
    position: fixed;
    top: 56px;
    left: 0; right: 0;
    z-index: 999;
    padding: 10px 20px;
    text-align: center;
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.tier-expiry-banner a { color: inherit; font-weight: 600; text-decoration: underline; margin-left: 6px; }
.tier-expiry-banner.tier-warning { background: #fff3cd; color: #856404; border-bottom: 1px solid #ffc107; }
.tier-expiry-banner.tier-expired { background: #f8d7da; color: #721c24; border-bottom: 1px solid #f5c6cb; }
.tier-banner-close { background: none; border: none; font-size: 18px; cursor: pointer; margin-left: 12px; color: inherit; vertical-align: middle; }

/* Navigation Bar */
.nav-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #1a0a0f;
    padding: 0;
    transition: background 0.3s, box-shadow 0.3s;
}

.nav-bar.nav-transparent {
    background: transparent;
}

.nav-bar.nav-scrolled {
    background: #1a0a0f;
    box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo */
.nav-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: white;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.4em;
    font-weight: 600;
}

.nav-logo-icon {
    font-size: 1.2em;
}

/* Desktop Navigation */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-link {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    padding: 8px 12px;
    font-size: 0.9em;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
}

.nav-link:hover {
    color: white;
    background: rgba(255,255,255,0.1);
}

.nav-link.active {
    color: white;
    background: rgba(139, 0, 0, 0.6);
}

.nav-login {
    background: rgba(139, 0, 0, 0.8);
    color: white !important;
}

.nav-login:hover {
    background: #8B0000;
}

.nav-admin {
    color: #c9a87c !important;
}

.nav-admin:hover {
    background: rgba(201, 168, 124, 0.2);
}

.nav-admin.active {
    background: rgba(201, 168, 124, 0.3);
    color: white !important;
}

.nav-events {
    color: #e8d4b8 !important;
}

.nav-events:hover {
    background: rgba(232, 212, 184, 0.15);
}

.nav-events.active {
    background: rgba(232, 212, 184, 0.25);
    color: white !important;
}

.nav-dd {
    position: relative;
}

.nav-dd-panel {
    position: absolute;
    top: 100%;
    left: 0;
    background: #2d1018;
    border-radius: 0 0 8px 8px;
    min-width: 160px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s, visibility 0.15s;
    z-index: 1000;
    padding: 4px 0;
}

.nav-dd:hover .nav-dd-panel {
    opacity: 1;
    visibility: visible;
}

.nav-dd-item {
    display: block;
    padding: 8px 16px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 0.88em;
    font-weight: 400;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

.nav-dd-item:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.nav-dd-item.active {
    color: #e8d4b8;
    font-weight: 500;
}

/* Help Button */
.nav-help-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.85);
    padding: 6px 12px;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.85em;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.nav-help-btn:hover {
    background: rgba(255,255,255,0.2);
    color: white;
    border-color: rgba(255,255,255,0.3);
}

.help-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: rgba(139, 0, 0, 0.8);
    border-radius: 50%;
    font-weight: 600;
    font-size: 0.9em;
    color: white;
}

.help-text {
    font-weight: 500;
}

/* User Dropdown */
.nav-user {
    position: relative;
}

.user-dropdown {
    position: relative;
}

.user-button {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.1);
    border: none;
    padding: 6px 12px 6px 6px;
    border-radius: 20px;
    color: white;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9em;
    transition: background 0.2s;
}

.user-button:hover {
    background: rgba(255,255,255,0.2);
}

.user-avatar {
    width: 28px;
    height: 28px;
    background: #8B0000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85em;
}

.user-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-arrow {
    transition: transform 0.2s;
}

.user-button[aria-expanded="true"] .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    min-width: 200px;
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}

.dropdown-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: #333;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9em;
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: #f5f5f5;
}

.dropdown-item svg {
    opacity: 0.6;
}

.dropdown-item-danger {
    color: #c00;
}

.dropdown-item-danger:hover {
    background: #fee;
}

.dropdown-divider {
    height: 1px;
    background: #eee;
    margin: 8px 0;
}

/* Hamburger Menu Toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    padding: 10px;
    cursor: pointer;
    z-index: 1001;
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background: white;
    position: relative;
    transition: background 0.2s;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
    width: 24px;
    height: 2px;
    background: white;
    transition: transform 0.3s, top 0.3s;
}

.hamburger::before { top: -7px; }
.hamburger::after { top: 7px; }

.nav-toggle[aria-expanded="true"] .hamburger {
    background: transparent;
}

.nav-toggle[aria-expanded="true"] .hamburger::before {
    top: 0;
    transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .hamburger::after {
    top: 0;
    transform: rotate(-45deg);
}

/* Mobile Styles */
@media (max-width: 900px) {
    .nav-toggle {
        display: block;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: #1a0a0f;
        flex-direction: column;
        align-items: stretch;
        padding: 60px 20px 20px;
        gap: 0;
        transition: right 0.3s ease;
        box-shadow: -5px 0 30px rgba(0,0,0,0.3);
        overflow-y: auto;
    }
    
    .nav-menu.open {
        right: 0;
    }
    
    .nav-links {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }
    
    .nav-link {
        padding: 12px 16px;
        font-size: 0.95em;
        border-radius: 8px;
    }
    
    .nav-dd-panel {
        position: static;
        opacity: 1;
        visibility: visible;
        background: transparent;
        box-shadow: none;
        padding: 0 0 0 16px;
    }
    
    .nav-dd-item {
        padding: 8px 16px;
        font-size: 0.9em;
        border-radius: 6px;
    }

    .nav-help-btn {
        width: 100%;
        justify-content: center;
        padding: 12px 16px;
        border-radius: 8px;
        margin-top: 10px;
    }
    
    .nav-user {
        margin-top: 15px;
        padding-top: 15px;
        border-top: 1px solid rgba(255,255,255,0.1);
    }
    
    .user-button {
        width: 100%;
        justify-content: flex-start;
        padding: 12px 16px;
        border-radius: 8px;
    }
    
    .dropdown-menu {
        position: static;
        background: rgba(255,255,255,0.05);
        box-shadow: none;
        margin-top: 10px;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
    }
    
    .dropdown-menu.open {
        display: block;
    }
    
    .dropdown-item {
        color: rgba(255,255,255,0.85);
    }
    
    .dropdown-item:hover {
        background: rgba(255,255,255,0.1);
    }
    
    .dropdown-item-danger {
        color: #ff6b6b;
    }
    
    .dropdown-divider {
        background: rgba(255,255,255,0.1);
    }
    
    .nav-login {
        display: block;
        text-align: center;
        padding: 14px 16px;
    }
}

/* Small mobile screens (iPhone SE, small Android) */
@media (max-width: 900px) and (max-height: 700px) {
    .nav-menu {
        padding: 50px 12px 10px;
    }
    
    .nav-link {
        padding: 8px 12px;
        font-size: 0.85em;
    }
    
    .nav-user {
        margin-top: 8px;
        padding-top: 8px;
    }
    
    .nav-login {
        padding: 8px 12px !important;
    }
    
    /* Accordion: collapse nav links when user menu is open */
    .nav-links {
        max-height: 500px;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .nav-links.collapsed {
        max-height: 0;
        padding: 0;
        margin: 0;
    }
    
    .dropdown-item {
        padding: 10px 12px;
        font-size: 0.9em;
    }
}

/* Overlay for mobile menu */
.nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

.nav-overlay.open {
    display: block;
}

/* Body padding to account for fixed nav */
body {
    padding-top: 60px;
}

body.nav-transparent-page {
    padding-top: 0;
}
