/* Custom Styles for Flawless Fades Barber Studio */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f5f5f0;
}
::-webkit-scrollbar-thumb {
    background: #4a7c4a;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #3d663d;
}

/* Navbar transition states */
.nav-scrolled {
    background: rgba(250, 250, 247, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

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

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

.nav-scrolled .nav-link {
    color: #284228 !important;
}

/* Hero scroll indicator animation */
@keyframes scrollBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

.scroll-indicator {
    animation: scrollBounce 2s ease-in-out infinite;
}

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

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

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

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

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

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

/* Testimonial card hover */
.testimonial-card {
    position: relative;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 20px;
    font-family: 'Playfair Display', serif;
    font-size: 6rem;
    color: #dce8dc;
    line-height: 1;
    z-index: 0;
    pointer-events: none;
}

.testimonial-card > * {
    position: relative;
    z-index: 1;
}

/* Mobile menu animation */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
}

#mobile-menu.open {
    max-height: 500px;
    padding: 1rem 0;
}

/* Mobile nav links */
.mobile-nav-link {
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid #dce8dc;
}

.mobile-nav-link:last-child {
    border-bottom: none;
}

/* Fade-in animation for scroll reveal */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

/* Stagger children */
.reveal-stagger > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-stagger.revealed > *:nth-child(1) { transition-delay: 0.1s; }
.reveal-stagger.revealed > *:nth-child(2) { transition-delay: 0.2s; }
.reveal-stagger.revealed > *:nth-child(3) { transition-delay: 0.3s; }
.reveal-stagger.revealed > *:nth-child(4) { transition-delay: 0.4s; }
.reveal-stagger.revealed > *:nth-child(5) { transition-delay: 0.5s; }
.reveal-stagger.revealed > *:nth-child(6) { transition-delay: 0.6s; }

.reveal-stagger.revealed > * {
    opacity: 1;
    transform: translateY(0);
}

/* Back to top button */
#back-to-top.visible {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .scroll-indicator {
        animation: none;
    }
    
    .service-card,
    .gallery-item,
    .testimonial-card {
        transition: none;
    }
    
    .service-card:hover,
    .gallery-item:hover,
    .testimonial-card:hover {
        transform: none;
    }
    
    .reveal,
    .reveal-stagger > * {
        opacity: 1;
        transform: none;
    }
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #4a7c4a;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Print styles */
@media print {
    nav, #back-to-top, .scroll-indicator {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    .service-card,
    .testimonial-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}
