/* Custom styles for MJ's Barbershop and Salon */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FAF8F5;
}
::-webkit-scrollbar-thumb {
    background: #1B4332;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #366d53;
}

/* Navigation transitions */
.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: currentColor;
    transition: width 0.3s ease;
}
.nav-link:hover::after {
    width: 100%;
}

/* Mobile menu animations */
#mobileMenu.opening {
    opacity: 1;
    pointer-events: auto;
}
#mobileMenu.closing {
    opacity: 0;
    pointer-events: none;
}

.mobile-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}
#mobileMenu.opening .mobile-link {
    opacity: 1;
    transform: translateY(0);
}
#mobileMenu.opening .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobileMenu.opening .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobileMenu.opening .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobileMenu.opening .mobile-link:nth-child(4) { transition-delay: 0.25s; }
#mobileMenu.opening .mobile-link:nth-child(5) { transition-delay: 0.3s; }
#mobileMenu.opening .mobile-link:nth-child(6) { transition-delay: 0.35s; }

/* Menu button animation */
#menuBtn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}
#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
}
#menuBtn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 5px;
}

/* Scroll reveal animations - progressive enhancement */
.scroll-reveal {
    /* Default: visible (no JS required) */
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero entrance - only decorative elements, not content */
.hero-decor {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.hero-decor.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Image hover effects */
img {
    transition: transform 0.7s ease;
}

/* Form focus styles */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(27, 67, 50, 0.1);
}

/* Subtle pattern for section backgrounds */
.section-pattern {
    background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%231B4332' fill-opacity='0.03' fill-rule='evenodd'%3E%3Ccircle cx='3' cy='3' r='1'/%3E%3Ccircle cx='13' cy='13' r='1'/%3E%3C/g%3E%3C/svg%3E");
}

/* Print styles */
@media print {
    header, #contact, footer {
        display: none;
    }
    body {
        color: #000;
        background: #fff;
    }
}
