/* Primary Navigation - Completely Independent Styling */
/* Namespace: pn-* (Primary Navigation) */

/* === MAIN CONTAINER === */
.pn-navigation {
    background: linear-gradient(135deg, #b91c1c 0%, #dc2626 50%, #991b1b 100%) !important;
    display: block !important;
    width: 100% !important;
    padding: 0 !important; /* Remove padding for tighter design */
    position: relative !important;
    z-index: 10000 !important; /* MUST be higher than search (5000) due to isolation */
    margin: 0 !important;
    border: none !important;
    box-sizing: border-box !important;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    isolation: isolate; /* Create independent stacking context */
}

/* Calculate dropdown position dynamically */
.pn-navigation {
    --dropdown-top: 100%; /* Will be set by JavaScript */
}

.pn-container {
    max-width: 1500px !important;
    margin: 0 auto !important;
    padding: 0 2rem !important;
    box-sizing: border-box !important;
}

.pn-wrapper {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important; /* Remove wrapper padding */
}

/* === NAVIGATION MENU === */
.pn-menu {
    display: flex !important;
    align-items: center !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 3rem !important; /* Increased spacing between menu items */
    font-size: 0.95rem !important; /* Slightly larger text */
    font-weight: 500 !important;
    width: 100% !important;
    justify-content: center !important; /* Center the menu items */
}

.pn-item {
    position: relative !important;
    display: inline-block !important;
    margin: 0 !important;
    padding: 0 !important;
}

.pn-link {
    color: white !important;
    text-decoration: none !important;
    padding: 0.75rem 1.5rem !important; /* Increased padding for better spacing */
    border-radius: 0 !important; /* Remove rounded corners for cleaner horizontal look */
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    white-space: nowrap !important;
    font-weight: 500 !important;
    letter-spacing: 0.025em !important;
    position: relative !important;
}

.pn-link:hover {
    background-color: rgba(255, 255, 255, 0.15) !important;
    color: #fed7d7 !important;
    text-decoration: none !important;
    transform: none !important; /* Remove vertical movement for cleaner horizontal nav */
}

.pn-link:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5) !important;
    outline-offset: 2px !important;
}

/* === DROPDOWN FUNCTIONALITY === */
.pn-dropdown {
    position: relative !important;
}

.pn-dropdown-trigger {
    cursor: pointer !important;
}

.pn-dropdown-arrow {
    width: 1rem !important;
    height: 1rem !important;
    transition: transform 0.2s ease !important;
}

.pn-dropdown-menu {
    position: absolute !important;
    top: 100% !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 80vw !important; /* Reduced width for better proportions */
    max-width: 1000px !important; /* Smaller max width */
    background: white !important;
    border-radius: 0.75rem !important;
    box-shadow: 
        0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
    padding: 0 !important;
    margin-top: 0.5rem !important; /* Reduced margin */
    z-index: 1000 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateX(-50%) translateY(-10px) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
}

/* === DESKTOP HOVER BEHAVIOR === */
/* Only enable hover on desktop (769px and above) */
@media (min-width: 769px) {
    .pn-dropdown:hover .pn-dropdown-arrow {
        transform: rotate(180deg) !important;
    }
    
    .pn-dropdown:hover .pn-dropdown-menu {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateX(-50%) translateY(0) !important; /* Center and slide down */
    }
    
    /* Ensure dropdown is properly layered on desktop */
    .pn-dropdown-menu {
        z-index: 9999 !important;
        background: white !important;
    }
}

/* === MEGA MENU CONTAINER === */
.pn-mega-menu-container {
    width: 100% !important;
    max-width: 1000px !important; /* Constrain width for better readability */
    margin: 0 auto !important;
    padding: 2rem 1.5rem !important; /* More balanced padding */
    box-sizing: border-box !important;
}

/* === DROPDOWN SECTIONS === */
.pn-dropdown-section {
    margin-bottom: 1.5rem !important; /* Increased spacing for full width */
}

.pn-dropdown-section:last-child {
    margin-bottom: 0 !important;
}

.pn-dropdown-title {
    font-weight: 700 !important; /* Bolder section titles */
    color: #1f2937 !important; /* Darker color for better contrast */
    font-size: 0.875rem !important; /* Larger text */
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    margin-bottom: 0.75rem !important; /* More space below titles */
    padding-bottom: 0.75rem !important;
    border-bottom: 1px solid #e5e7eb !important;
}

.pn-dropdown-links {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important; /* 2 columns for better readability */
    gap: 0.75rem 2rem !important; /* Balanced spacing */
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* === MEGA MENU GRID LAYOUT === */
.pn-mega-menu-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important; /* Two main sections side by side */
    gap: 3rem !important; /* Better balanced gap between sections */
    align-items: start !important;
    width: 100% !important;
}

.pn-dropdown-link {
    color: #4b5563 !important; /* Darker text for better readability */
    text-decoration: none !important;
    padding: 0.75rem 1rem !important; /* More generous padding */
    border-radius: 0.5rem !important;
    font-size: 0.9rem !important; /* Slightly larger text */
    transition: all 0.2s ease !important;
    display: block !important;
    font-weight: 500 !important;
}

.pn-dropdown-link:hover {
    background-color: #fef2f2 !important; /* Lighter hover background with red tint */
    color: #dc2626 !important;
    text-decoration: none !important;
    transform: none !important; /* Remove transform for cleaner look */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important; /* Subtle shadow on hover */
}

/* === REMOVED OLD VENUES DROPDOWN STYLES === */
/* Now using consistent mega menu layout for all dropdowns */

/* === MOBILE DROPDOWN VISIBILITY === */
/* Mobile dropdowns use .show class instead of hover */
.pn-dropdown-menu.show {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(-50%) translateY(0) !important;
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 768px) {
    .pn-navigation {
        padding: 0.875rem 0 !important; /* Increased vertical padding */
    }
    
    .pn-container {
        padding: 0 1rem !important; /* Increased horizontal padding */
        overflow-x: auto !important;
        overflow-y: hidden !important;
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
    }
    
    .pn-container::-webkit-scrollbar {
        display: none !important;
    }
    
    /* Better spacing for mobile menu items */
    .pn-menu {
        gap: 1.5rem !important; /* Increased gap between items */
        padding: 0 1rem !important; /* Left and right padding for centering */
        justify-content: flex-start !important; /* Allow scrolling from start */
    }
    
    .pn-link {
        padding: 0.625rem 1rem !important; /* Better tap target size */
        font-size: 0.9375rem !important; /* Slightly larger text */
    }
    
    /* Ensure first and last items have proper spacing */
    .pn-item:first-child {
        margin-left: 0.5rem !important;
    }
    
    .pn-item:last-child {
        margin-right: 0.5rem !important;
    }
    
    /* Mobile dropdowns are full-width and positioned below nav */
    .pn-dropdown-menu {
        position: fixed !important;
        top: 60px !important;
        left: 0 !important;
        right: 0 !important;
        transform: none !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        border-radius: 0 0 0.5rem 0.5rem !important;
        max-height: 60vh !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        z-index: 9999 !important;
        background: white !important;
        border: none !important;
        border-bottom: 1px solid #e5e7eb !important;
        box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1) !important;
    }
    
    .pn-dropdown-menu.show {
        transform: none !important;
    }
    
    .pn-menu {
        gap: 0.5rem !important;
        font-size: 0.875rem !important;
        flex-wrap: nowrap !important;
        justify-content: flex-start !important;
        min-width: max-content !important;
    }
    
    /* Clean compact mobile button styling */
    .pn-link {
        padding: 0.625rem 1rem !important;
        min-height: 48px !important;
        touch-action: manipulation !important;
        border-radius: 0 !important;
        font-size: 0.875rem !important;
        font-weight: 600 !important;
        white-space: nowrap !important;
        letter-spacing: 0.015em !important;
    }
    
    /* Clean dropdown triggers */
    .pn-dropdown-trigger {
        background: transparent !important;
        border: none !important;
        min-width: auto !important;
        justify-content: center !important;
        padding: 0.625rem 0.875rem !important;
    }
    
    .pn-dropdown-trigger:active {
        opacity: 0.7 !important;
        transform: scale(0.98) !important;
    }
    
    /* Mobile dropdown arrows */
    .pn-dropdown-arrow {
        width: 1rem !important;
        height: 1rem !important;
        margin-left: 0.375rem !important;
    }
    
    .pn-mega-menu-container {
        padding: 0 !important;
        background: white !important;
        min-height: auto !important;
    }
    
    .pn-dropdown-links {
        grid-template-columns: 1fr !important;
        gap: 0 !important;
    }
    
    .pn-mega-menu-grid {
        grid-template-columns: 1fr !important;
        gap: 0 !important;
        background: white !important;
    }
    
    .pn-dropdown-section {
        background: white !important;
        padding: 0 !important;
        margin-bottom: 0 !important;
        border-bottom: 8px solid #f3f4f6 !important;
    }
    
    .pn-dropdown-section:last-child {
        border-bottom: none !important;
    }
    
    /* Mobile section titles - prominent and clear */
    .pn-dropdown-title {
        font-weight: 700 !important;
        font-size: 0.75rem !important;
        color: #6b7280 !important;
        text-transform: uppercase !important;
        letter-spacing: 0.1em !important;
        margin-bottom: 0 !important;
        padding: 1rem 1.25rem 0.75rem !important;
        border-bottom: 1px solid #e5e7eb !important;
        background: #f9fafb !important;
    }
    
    /* Mobile dropdown links - larger, clearer */
    .pn-dropdown-link {
        font-size: 0.9375rem !important;
        font-weight: 500 !important;
        color: #374151 !important;
        padding: 1rem 1.25rem !important;
        border-radius: 0 !important;
        border-bottom: 1px solid #f3f4f6 !important;
        transition: background-color 0.15s ease !important;
    }
    
    .pn-dropdown-link:hover,
    .pn-dropdown-link:active {
        background-color: #f9fafb !important;
        color: #dc2626 !important;
        transform: none !important;
        box-shadow: none !important;
    }
    
    .pn-dropdown-link:last-child {
        border-bottom: none !important;
    }
}

@media (max-width: 480px) {
    .pn-navigation {
        padding: 0.5rem 0 !important;
    }
    
    .pn-container {
        padding: 0 0.25rem !important;
    }
    
    .pn-menu {
        gap: 0.375rem !important;
    }
    
    /* Compact for small screens but still readable */
    .pn-link {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.8125rem !important;
        min-height: 48px !important;
        font-weight: 600 !important;
    }
    
    .pn-dropdown-trigger {
        padding: 0.5rem 0.625rem !important;
    }
    
    .pn-dropdown-arrow {
        width: 0.875rem !important;
        height: 0.875rem !important;
    }
    
    /* Adjusted dropdown positioning for smaller screens */
    .pn-dropdown-menu {
        top: 56px !important;
        max-height: 65vh !important;
    }
    
    /* Mobile section titles - slightly smaller but still prominent */
    .pn-dropdown-title {
        font-size: 0.6875rem !important;
        padding: 0.875rem 1rem 0.625rem !important;
    }
    
    /* Mobile dropdown links - adjusted for smaller screens */
    .pn-dropdown-link {
        font-size: 0.875rem !important;
        padding: 0.875rem 1rem !important;
    }
}

/* === ACCESSIBILITY === */
@media (prefers-reduced-motion: reduce) {
    .pn-link,
    .pn-dropdown-menu,
    .pn-dropdown-arrow,
    .pn-dropdown-link {
        transition: none !important;
    }
}

/* === HIGH CONTRAST MODE === */
@media (prefers-contrast: high) {
    .pn-navigation {
        border-bottom: 2px solid white !important;
    }
    
    .pn-dropdown-menu {
        border: 2px solid #dc2626 !important;
    }
    
    .pn-dropdown-link:hover {
        background-color: #dc2626 !important;
        color: white !important;
    }
}

/* === FOCUS VISIBLE SUPPORT === */
.pn-link:focus-visible,
.pn-dropdown-link:focus-visible {
    outline: 2px solid #fbbf24 !important;
    outline-offset: 2px !important;
}

/* === PRINT STYLES === */
@media print {
    .pn-navigation {
        display: none !important;
    }
}

/* ===================================
   MOBILE FULL-SCREEN NAVIGATION OVERLAY
   =================================== */

.mobile-nav-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background-color: rgba(0, 0, 0, 0.5) !important;
    z-index: 99999 !important;
    opacity: 0 !important;
    transition: opacity 0.3s ease !important;
}

.mobile-nav-overlay.hidden {
    display: none !important;
}

.mobile-nav-overlay.active {
    opacity: 1 !important;
}

.mobile-nav-container {
    position: absolute !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 85% !important;
    max-width: 400px !important;
    background-color: #ffffff !important;
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.2) !important;
    transform: translateX(-100%) !important;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: flex !important;
    flex-direction: column !important;
}

.mobile-nav-overlay.active .mobile-nav-container {
    transform: translateX(0) !important;
}

/* Mobile Nav Header */
.mobile-nav-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 1.25rem 1.5rem !important;
    background: linear-gradient(135deg, #b91c1c 0%, #dc2626 100%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.mobile-nav-title {
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    margin: 0 !important;
}

.mobile-nav-close {
    background: transparent !important;
    border: none !important;
    color: #ffffff !important;
    cursor: pointer !important;
    padding: 0.5rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 0.375rem !important;
    transition: background-color 0.2s ease !important;
}

.mobile-nav-close:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

.mobile-nav-close svg {
    width: 1.5rem !important;
    height: 1.5rem !important;
}

/* Mobile Nav Content */
.mobile-nav-content {
    flex: 1 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 0 !important;
}

/* Mobile Nav Section */
.mobile-nav-section {
    border-bottom: 8px solid #f3f4f6 !important;
}

.mobile-nav-section:last-of-type {
    border-bottom: none !important;
}

.mobile-section-header {
    font-size: 0.6875rem !important;
    font-weight: 700 !important;
    color: #6b7280 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
    padding: 1rem 1.5rem 0.75rem !important;
    background-color: #f9fafb !important;
    border-bottom: 1px solid #e5e7eb !important;
}

.mobile-section-links {
    background-color: #ffffff !important;
}

/* Mobile Nav Links */
.mobile-nav-link {
    display: flex !important;
    align-items: center !important;
    padding: 1rem 1.5rem !important;
    font-size: 0.9375rem !important;
    font-weight: 500 !important;
    color: #374151 !important;
    text-decoration: none !important;
    border-bottom: 1px solid #f3f4f6 !important;
    transition: background-color 0.15s ease !important;
}

.mobile-nav-link:last-child {
    border-bottom: none !important;
}

.mobile-nav-link:hover,
.mobile-nav-link:active {
    background-color: #f9fafb !important;
    color: #dc2626 !important;
}

.mobile-nav-link-featured {
    font-weight: 600 !important;
    color: #dc2626 !important;
}

.mobile-nav-icon {
    width: 1.25rem !important;
    height: 1.25rem !important;
    margin-right: 0.75rem !important;
    flex-shrink: 0 !important;
}

/* Mobile Nav Footer */
.mobile-nav-footer {
    padding: 1.5rem !important;
    background-color: #f9fafb !important;
    border-top: 1px solid #e5e7eb !important;
}

.mobile-contact-button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    width: 100% !important;
    padding: 0.875rem 1.5rem !important;
    background-color: #dc2626 !important;
    color: #ffffff !important;
    font-size: 0.9375rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    border-radius: 0.5rem !important;
    transition: background-color 0.2s ease !important;
}

.mobile-contact-button:hover {
    background-color: #b91c1c !important;
    color: #ffffff !important;
}

/* Hide mobile nav on desktop */
@media (min-width: 769px) {
    .mobile-nav-overlay {
        display: none !important;
    }
}

