/* Custom styles for Bishop's Barber Shop */

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

body {
    overflow-x: hidden;
}

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

::-webkit-scrollbar-track {
    background: #0D0D0D;
}

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

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

/* Selection */
::selection {
    background: rgba(212, 175, 55, 0.3);
    color: #E8D5C4;
}

/* Navbar styles */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background: rgba(13, 13, 13, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(212, 175, 55, 0.1);
}

/* Mobile menu */
#mobile-menu.open {
    opacity: 1 !important;
    pointer-events: all !important;
}

#mobile-menu.closed {
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Mobile menu links animation */
.mobile-menu-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

#mobile-menu.open .mobile-menu-link {
    opacity: 1;
    transform: translateY(0);
}

#mobile-menu.open .mobile-menu-link:nth-child(1) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-menu-link:nth-child(2) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-menu-link:nth-child(3) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-menu-link:nth-child(4) { transition-delay: 0.25s; }

/* Hamburger animation */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
}

#mobile-menu-btn.active .menu-line:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}

#mobile-menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}

#mobile-menu-btn.active .menu-line:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
    width: 1.5rem;
}

/* Reveal animations */
.reveal.active {
    opacity: 1 !important;
    transform: translate(0, 0) !important;
}

/* Hero animations - always visible, no JS needed */
.hero-anim, .hero-img-anim {
    /* Content is visible by default — animations are progressive enhancement */
}

@media (prefers-reduced-motion: no-preference) {
    .hero-anim, .hero-img-anim {
        /* Animations handled by CSS classes applied via HTML */
    }
}

/* Service card hover */
.group:hover .group-hover\:bg-bishop-gold\/20 {
    background-color: rgba(212, 175, 55, 0.2);
}

/* Image hover */
.group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
}

/* Gold gradient text effect */
.text-gold-gradient {
    background: linear-gradient(135deg, #D4AF37 0%, #E8C95A 50%, #D4AF37 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Subtle shimmer effect for gold elements */
@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

/* Button focus styles */
button:focus-visible,
a:focus-visible {
    outline: 2px solid #D4AF37;
    outline-offset: 2px;
}

/* Ensure images don't cause layout shift */
img {
    max-width: 100%;
    height: auto;
}

/* Smooth transitions for all interactive elements */
a, button {
    transition: all 0.3s ease;
}

/* Gallery image aspect ratios */
.gallery-img {
    aspect-ratio: 4/3;
    object-fit: cover;
}

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

/* Print styles */
@media print {
    nav, #mobile-menu, .reveal {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}
