/* Navigation CSS - Brighton Dance Centre */

/* Main Navigation */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    z-index: var(--z-fixed);
    transition: all var(--transition-base);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

/* Logo */
.logo {
    flex-shrink: 0;
}

.logo a {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    color: var(--text-dark);
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: color var(--transition-fast);
}

.logo a:hover {
    color: var(--primary-color);
}

/* Navigation Structure */
.nav {
    flex-grow: 1;
    display: flex;
    justify-content: flex-end;
}

.nav__list {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav__item {
    position: relative;
}

.nav__link {
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-dark);
    text-decoration: none;
    padding: 0.5rem 0;
    position: relative;
    transition: color var(--transition-fast);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.nav__link:hover {
    color: var(--primary-color);
}

/* Active Link */
.nav__link.active {
    color: var(--primary-color);
}

/* Dropdown Arrow */
.nav__item--has-dropdown .nav__link::before {
    content: '▼';
    font-size: 0.6rem;
    margin-left: 0.25rem;
    transition: transform var(--transition-fast);
    order: 2;
}

.nav__item--has-dropdown:hover .nav__link::before {
    transform: rotate(180deg);
}

/* Underline Effect */
.nav__link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--primary-color);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform var(--transition-base);
}

.nav__link.active::after,
.nav__link:hover::after {
    transform: scaleX(1);
}

/* Dropdown Menus */
.nav__dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--white);
    min-width: 200px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-radius: var(--radius-md);
    padding: var(--space-sm) 0;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
    margin-top: 10px;
    max-height: 70vh;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

/* Custom scrollbar for desktop */
.nav__dropdown::-webkit-scrollbar {
    width: 6px;
}

.nav__dropdown::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
}

.nav__dropdown::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.nav__dropdown::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

.nav__dropdown--wide {
    min-width: 280px;
    column-count: 2;
    column-gap: 0;
}

@media (min-width: 1200px) {
    .nav__dropdown--wide {
        column-count: 3;
        min-width: 600px;
    }
}

.nav__item--has-dropdown:hover .nav__dropdown {
    opacity: 1;
    visibility: visible;
    margin-top: 0;
}

.nav__dropdown li {
    break-inside: avoid;
}

.nav__dropdown a {
    display: block;
    padding: 0.5rem 1.5rem;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 0.875rem;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.nav__dropdown a:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
    padding-left: 2rem;
}

.nav__dropdown span {
    display: block;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 30px;
    height: 30px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-dark);
    margin: 3px 0;
    transition: all var(--transition-base);
    border-radius: 2px;
}

/* Mobile Menu Active State */
.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

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

/* Responsive Navigation */
@media (max-width: 968px) {
    .nav-container {
        padding: 0 var(--space-sm);
        height: 70px;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: var(--white);
        transform: translateX(100%);
        transition: transform var(--transition-base);
        overflow-y: auto;
        padding: var(--space-lg);
    }
    
    .nav.active {
        transform: translateX(0);
    }
    
    .nav__list {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }
    
    .nav__item {
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }
    
    .nav__link {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: var(--space-md);
        font-size: 1rem;
        width: 100%;
    }
    
    /* Remove all underline effects on mobile */
    .nav__link::after,
    .nav__link.active::after,
    .nav__link:hover::after {
        display: none !important;
        content: none !important;
    }
    
    /* Mobile Dropdowns */
    .nav__dropdown {
        position: static;
        transform: none;
        box-shadow: none;
        background-color: rgba(0, 0, 0, 0.02);
        margin: 0;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        opacity: 1;
        visibility: visible;
        transition: max-height 0.5s ease-in-out;
        column-count: 1 !important;
    }
    
    .nav__item--has-dropdown.active .nav__dropdown {
        max-height: 400px;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
        padding: var(--space-sm) 0;
        margin-bottom: var(--space-sm);
    }
    
    /* Custom scrollbar for dropdown */
    .nav__dropdown::-webkit-scrollbar {
        width: 4px;
    }
    
    .nav__dropdown::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, 0.05);
    }
    
    .nav__dropdown::-webkit-scrollbar-thumb {
        background: var(--primary-color);
        border-radius: 2px;
    }
    
    .nav__dropdown a {
        padding-left: var(--space-xl);
        font-size: 0.875rem;
    }
    
    .nav__dropdown a:hover {
        padding-left: var(--space-xl);
        background-color: rgba(0, 206, 209, 0.1);
    }
    
    /* Hide desktop dropdown arrow on mobile */
    .nav__item--has-dropdown .nav__link::before {
        display: none !important;
        content: none !important;
    }
    
    /* Mobile dropdown toggle indicator */
    .nav__item--has-dropdown .nav__link {
        position: relative;
    }
    
    .nav__item--has-dropdown .nav__link::after {
        content: '▼' !important;
        position: absolute;
        right: var(--space-md);
        top: 50%;
        transform: translateY(-50%);
        font-size: 0.75rem;
        display: block !important;
        transition: transform var(--transition-fast);
        width: auto;
        height: auto;
        background: none;
    }
    
    .nav__item--has-dropdown.active .nav__link::after {
        transform: translateY(-50%) rotate(180deg);
    }
}

/* Scroll Effect */
.main-nav.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

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

@media (max-width: 768px) {
    body {
        padding-top: 70px;
    }
}

/* ==================== */
/* Footer Styles */
/* ==================== */

/* Footer Styles */
/* ============= */

.main-footer {
    background: #2D2D2D;
    color: #fff;
    padding: 60px 0 20px;
    position: relative;
    overflow: hidden;
}

/* Decorative element */
.main-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: #00CED1;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column h3 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #00CED1;
    letter-spacing: 0.5px;
}

.footer-column p {
    color: #ccc;
    line-height: 1.6;
    margin-bottom: 15px;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column li {
    margin-bottom: 10px;
}

.footer-column a {
    color: #ccc;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
}

.footer-column a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #00CED1;
    transition: width 0.3s ease;
}

.footer-column a:hover {
    color: #00CED1;
}

.footer-column a:hover::after {
    width: 100%;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #fff;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.social-links a:hover {
    background: #00CED1;
    border-color: #00CED1;
    transform: translateY(-3px);
}

.social-links a::after {
    display: none;
}

/* Footer Bottom */
.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-bottom p {
    color: #999;
    margin: 5px 0;
    font-size: 0.9rem;
}

.footer-bottom a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-bottom a:hover {
    color: #00CED1;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .main-footer {
        padding: 40px 0 20px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .footer-column h3 {
        font-size: 1.3rem;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .footer-bottom {
        padding-top: 20px;
    }
    
    .footer-bottom p {
        font-size: 0.85rem;
    }
}

/* Dark Theme Support */
@media (prefers-color-scheme: dark) {
    .main-footer {
        background: #1a1a1a;
    }
    
    .footer-column a:hover {
        color: #FF6B6B;
    }
    
    .footer-column a::after {
        background: #FF6B6B;
    }
    
    .social-links a:hover {
        background: #FF6B6B;
        border-color: #FF6B6B;
    }
}

/* Print Styles */
@media print {
    .main-footer {
        display: none;
    }
}