/* Custom styles for Sergio's Styling Salon */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: #FDF8F5;
}
::-webkit-scrollbar-thumb {
    background: #E8604C;
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: #D14A35;
}

/* Selection color */
::selection {
    background: #E8604C;
    color: white;
}

/* Navbar transition */
#navbar {
    transition: background-color 0.4s ease, padding 0.4s ease, box-shadow 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

/* Mobile menu */
#mobileMenu.active {
    opacity: 1 !important;
    pointer-events: all !important;
}

/* Reveal animations - progressive enhancement */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.revealed {
    opacity: 0;
    transform: translateY(30px);
}

@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);
    }
}

/* Nav links */
.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #F4845F;
    transition: width 0.3s ease;
}
.nav-link:hover::after {
    width: 100%;
}

/* Mobile links */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}
#mobileMenu.active .mobile-link {
    opacity: 1;
    transform: translateY(0);
}
#mobileMenu.active .mobile-link:nth-child(1) { transition-delay: 0.05s; }
#mobileMenu.active .mobile-link:nth-child(2) { transition-delay: 0.1s; }
#mobileMenu.active .mobile-link:nth-child(3) { transition-delay: 0.15s; }
#mobileMenu.active .mobile-link:nth-child(4) { transition-delay: 0.2s; }
#mobileMenu.active .mobile-link:nth-child(5) { transition-delay: 0.25s; }
#mobileMenu.active .mobile-link:nth-child(6) { transition-delay: 0.3s; }

/* Back to top button */
#backToTop.visible {
    opacity: 1 !important;
    pointer-events: all !important;
}

/* Focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #E8604C;
    outline-offset: 2px;
}

/* Image aspect ratios */
img {
    max-width: 100%;
    height: auto;
}

/* Prevent layout shift on images */
.rounded-3xl overflow-hidden {
    contain: layout style paint;
}

/* Subtle pattern overlay for cream sections */
.bg-cream-50::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(232, 96, 76, 0.03) 1px, transparent 0);
    background-size: 24px 24px;
    pointer-events: none;
}

/* Service card hover glow */
.group:hover .group-hover\:bg-coral-500 {
    box-shadow: 0 8px 25px rgba(232, 96, 76, 0.3);
}

/* Form input transitions */
input, select, textarea {
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

/* Map overlay gradient */
.map-gradient-top {
    background: linear-gradient(to bottom, #FDF8F5 0%, transparent 100%);
}
