/* Custom styles for Anita Quinta Salon */

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

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

/* Navbar scroll state */
.nav-scrolled {
    background: rgba(13, 31, 60, 0.97) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

/* Hero animations */
.hero-bg {
    will-change: transform;
}

.hero-content {
    will-change: opacity, transform;
}

.hero-badge {
    animation: fadeInDown 0.8s ease-out both;
}

.hero-content h1 {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-content p {
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.hero-content > div:last-child {
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.hero-scroll-indicator {
    animation: fadeInUp 0.8s ease-out 1s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll reveal animations — progressive enhancement */
.reveal {
    /* Default: visible (no JS) */
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        /* Start hidden for JS-driven reveal */
        opacity: 0;
        transform: translateY(30px);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

/* Gallery items */
.gallery-item {
    position: relative;
    cursor: pointer;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(13, 31, 60, 0.4), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

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

/* Review cards */
.review-card {
    position: relative;
}

/* Mobile menu */
#mobile-menu {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Back to top button */
#back-to-top.visible {
    opacity: 1;
    translate: 0 0;
    pointer-events: auto;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f5f0e6;
}

::-webkit-scrollbar-thumb {
    background: #d4a843;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #c49a38;
}

/* Input focus styles */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(212, 168, 67, 0.2);
}

/* Selection color */
::selection {
    background: #d4a843;
    color: #0d1f3c;
}
