/* Custom styles for Relax Hair Salon */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #02050A;
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #C9A84C, #D4AF61);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #D4AF61, #E8D5A3);
}

/* Selection color */
::selection {
    background: rgba(201, 168, 76, 0.3);
    color: #fff;
}

/* Navbar transition states */
.nav-scrolled {
    background: rgba(2, 5, 10, 0.95) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(201, 168, 76, 0.15);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

/* Service card hover effects */
.service-card {
    transform: translateY(0);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(201, 168, 76, 0.1);
}

/* Reveal animations - progressive enhancement */
/* Default state: visible (works without JS) */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Animated state - only applied when JS adds the class */
.reveal.animated {
    opacity: 0;
    transform: translateY(30px);
}
.reveal.animated.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile menu */
#mobileMenu {
    transition: opacity 0.3s ease;
}
#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

/* Mobile menu animations */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}
#mobileMenu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}
#mobileMenu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }

/* Menu button animation */
.menu-line {
    transition: all 0.3s ease;
}
.menu-open .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.menu-open .menu-line:nth-child(2) {
    opacity: 0;
}
.menu-open .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 1.5rem;
}

/* Gold shimmer effect on buttons */
.bg-gold-500 {
    position: relative;
    overflow: hidden;
}
.bg-gold-500::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}
.bg-gold-500:hover::after {
    left: 100%;
}

/* Prevent layout shift on images */
img {
    max-width: 100%;
    height: auto;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .reveal,
    .reveal.animated,
    .reveal.animated.revealed {
        opacity: 1;
        transform: translateY(0);
        transition: none;
    }
    .service-card:hover {
        transform: none;
    }
    .bg-gold-500::after {
        display: none;
    }
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Form select arrow */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239CA3AF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
}

/* Focus visible for accessibility */
*:focus-visible {
    outline: 2px solid #C9A84C;
    outline-offset: 2px;
}

/* Gallery hover overlay */
.group:hover .absolute.inset-0 {
    opacity: 1 !important;
}

/* Map filter for dark mode */
iframe {
    border-radius: 0 0 1rem 1rem;
}
