/* Main Navigation */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.main-nav.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.main-nav.on-dark {
    background: rgba(90, 61, 107, 0.95);
    backdrop-filter: blur(10px);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo */
.nav-logo {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8rem;
    font-weight: 300;
    letter-spacing: 2px;
    text-decoration: none;
    color: white;
    transition: all 0.3s ease;
}

.main-nav.scrolled .nav-logo {
    color: #5A3D6B;
}

.nav-logo:hover {
    opacity: 0.8;
}

/* Desktop Menu */
.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    position: relative;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    padding: 0.5rem 0;
    transition: all 0.3s ease;
}

.main-nav.scrolled .nav-link {
    color: rgba(90, 61, 107, 0.8);
}

.nav-link:hover {
    color: white;
}

.main-nav.scrolled .nav-link:hover {
    color: #5A3D6B;
}

/* Active link underline */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #8B5FBF 0%, #B19CD9 100%);
    transition: width 0.3s ease;
}

.nav-link.active::after,
.nav-link:hover::after {
    width: 100%;
}

.nav-link.active {
    color: white;
    font-weight: 500;
}

.main-nav.scrolled .nav-link.active {
    color: #5A3D6B;
}

/* Hamburger Menu */
.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 28px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.nav-hamburger span {
    width: 28px;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.main-nav.scrolled .nav-hamburger span {
    background: #5A3D6B;
}

.nav-hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.nav-hamburger.active span:nth-child(2) {
    opacity: 0;
}

.nav-hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Mobile Styles */
@media (max-width: 768px) {
    .nav-container {
        padding: 1rem 1.5rem;
    }
    
    .nav-logo {
        font-size: 1.5rem;
    }
    
    .nav-hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: linear-gradient(135deg, #5A3D6B 0%, #8B5FBF 100%);
        flex-direction: column;
        padding: 5rem 2rem 2rem;
        gap: 0;
        align-items: flex-start;
        transition: right 0.3s ease;
        box-shadow: -5px 0 30px rgba(0, 0, 0, 0.3);
        overflow-y: auto;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-link {
        display: block;
        width: 100%;
        padding: 1rem 0;
        color: rgba(255, 255, 255, 0.9) !important;
        font-size: 1.1rem;
    }
    
    .main-nav.scrolled .nav-link {
        color: rgba(255, 255, 255, 0.9) !important;
    }
    
    .nav-link:hover,
    .nav-link.active {
        color: white !important;
        padding-left: 1rem;
    }
    
    .nav-link::after {
        bottom: 0.5rem;
        height: 2px;
    }
}

/* 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;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-overlay.active {
    display: block;
    opacity: 1;
}

/* Prevent body scroll when menu is open */
body.nav-open {
    overflow: hidden;
}

/* Adjust all sections padding to account for fixed nav */
section[id],
footer[id] {
    scroll-margin-top: 80px;
}
