/* Custom styles for Cutmaster's Barbershop */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: #f5f3ee;
}
::-webkit-scrollbar-thumb {
    background: #3d6029;
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: #314d22;
}

/* Selection color */
::selection {
    background: #507d35;
    color: #faf9f6;
}

/* Navbar scroll effect */
.navbar-scrolled {
    background: rgba(250, 249, 246, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

/* Service card hover effect */
.service-card {
    position: relative;
    overflow: hidden;
}
.service-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #507d35, #72a34f);
    transform: scaleX(0);
    transition: transform 0.5s ease;
    transform-origin: left;
}
.service-card:hover::after {
    transform: scaleX(1);
}

/* Gallery hover effect */
.gallery-item {
    position: relative;
    cursor: pointer;
}
.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(35, 52, 25, 0.4), transparent);
    opacity: 0;
    transition: opacity 0.5s ease;
}
.gallery-item:hover::after {
    opacity: 1;
}

/* Floating animation for stat cards */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}
.floating-card-1 { animation: float 4s ease-in-out infinite; }
.floating-card-2 { animation: float 5s ease-in-out infinite 0.5s; }
.floating-card-3 { animation: float 4.5s ease-in-out infinite 1s; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Fade-in animations (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }
    .reveal.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; }
}

/* Mobile menu transition */
#mobileMenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
}
#mobileMenu.open {
    max-height: 400px;
    padding-top: 0;
}

/* Focus visible for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #507d35;
    outline-offset: 2px;
    border-radius: 4px;
}
