/* ===== Custom Styles for Juan P Rivera Beauty & Hair Salon ===== */

/* --- Base & Typography --- */
html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background-color: #7B2D3B;
    color: #FAF6F3;
}

/* --- Navbar --- */
.nav-logo-color {
    color: #7B2D3B;
}

.nav-logo-sub {
    color: #c0274c;
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #7B2D3B;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Navbar scroll state */
.navbar-scrolled .nav-logo-color {
    color: #7B2D3B;
}

.navbar-scrolled .nav-logo-sub {
    color: #c0274c;
}

/* --- Mobile Menu --- */
#mobileMenu.menu-open {
    opacity: 1;
    pointer-events: all;
}

.mobile-nav-link {
    position: relative;
}

.mobile-nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    background-color: #7B2D3B;
    transition: width 0.3s ease;
}

.mobile-nav-link:hover::after {
    width: 100%;
}

/* Hamburger animation */
#menuToggle[aria-expanded="true"] .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

#menuToggle[aria-expanded="true"] .menu-line:nth-child(2) {
    opacity: 0;
}

#menuToggle[aria-expanded="true"] .menu-line:nth-child(3) {
    width: 6;
    transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Hero --- */
#hero {
    position: relative;
}

/* --- Service Cards --- */
.service-card {
    position: relative;
}

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

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

/* --- Gallery --- */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    aspect-ratio: auto;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(123, 45, 59, 0.3), transparent 50%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

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

/* --- Testimonials --- */
.testimonial-card {
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* --- Contact Form --- */
input:focus,
textarea:focus,
select:focus {
    border-bottom-color: #7B2D3B !important;
}

/* --- Scroll Reveal Animations (progressive enhancement) --- */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }

    .reveal-hidden {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }

    .reveal-hidden.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; }
}

/* --- Utility --- */
.divider-accent {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, #7B2D3B, #c0274c);
}

/* --- Responsive Adjustments --- */
@media (max-width: 767px) {
    .service-card img {
        height: 200px;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .service-card img {
        height: 240px;
    }
}
