/* Custom styles for Magnolia Nail Lounge */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fdf2f7;
}
::-webkit-scrollbar-thumb {
    background: #a0304e;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #7B2D5B;
}

/* Selection color */
::selection {
    background: #E8A838;
    color: #3a1028;
}

/* Service card hover effect */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #7B2D5B, #E8A838);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

/* Gallery hover overlay */
.gallery-item {
    position: relative;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(62, 16, 40, 0.4), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: 0.75rem;
}

.gallery-item:hover::after {
    opacity: 1;
}

/* Navbar scroll state */
nav.scrolled {
    background: rgba(255, 255, 255, 0.97) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(123, 45, 91, 0.08);
}

nav.scrolled .nav-logo-text {
    color: #3a1028 !important;
}

nav.scrolled .nav-logo-sub {
    color: #a0304e !important;
}

nav.scrolled .mobile-menu-line {
    background: #7B2D5B !important;
}

/* Mobile menu animation */
.mobile-menu-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

#mobileMenu.open .mobile-menu-link {
    opacity: 1;
    transform: translateY(0);
}

#mobileMenu.open .mobile-menu-link:nth-child(1) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-menu-link:nth-child(2) { transition-delay: 0.15s; }
#mobileMenu.open .mobile-menu-link:nth-child(3) { transition-delay: 0.2s; }
#mobileMenu.open .mobile-menu-link:nth-child(4) { transition-delay: 0.25s; }

/* Mobile menu button active state */
#mobileMenuBtn.active .mobile-menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
#mobileMenuBtn.active .mobile-menu-line:nth-child(2) {
    opacity: 0;
}
#mobileMenuBtn.active .mobile-menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 1.5rem;
}

/* Back to top button */
#backToTop.visible {
    opacity: 1;
    visibility: visible;
    translate: 0 0;
}

/* Scroll reveal animations (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
    .reveal-delay-5 { transition-delay: 0.5s; }
    .reveal-delay-6 { transition-delay: 0.6s; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* Form focus styles */
input:focus, select:focus, textarea:focus {
    outline: none;
}

/* Print styles */
@media print {
    nav, #backToTop, #contactForm, #formSuccess {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
