/* Custom styles for MG The Barber */

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

/* Custom selection color */
::selection {
    background-color: rgba(69, 201, 154, 0.3);
    color: #0A1628;
}

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

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 1rem;
    border: 1px solid transparent;
    transition: border-color 0.5s ease;
    pointer-events: none;
}

.service-card:hover::before {
    border-color: rgba(69, 201, 154, 0.3);
}

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

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10, 22, 40, 0.2) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.5s ease;
    border-radius: 0.75rem;
    pointer-events: none;
}

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

/* Navbar scroll state */
.navbar-scrolled {
    background-color: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(10, 22, 40, 0.08);
}

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

/* Hamburger animation */
.menu-btn-active #menuIcon span:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

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

.menu-btn-active #menuIcon span:nth-child(3) {
    top: 50%;
    transform: translateY(-50%) rotate(-45deg);
}

/* Subtle entrance animations for below-fold content */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    }

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

/* Focus styles */
:focus-visible {
    outline: 2px solid #45C99A;
    outline-offset: 2px;
}

/* Input autofill styling */
input:-webkit-autofill,
textarea:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #F0FBF7 inset !important;
    -webkit-text-fill-color: #0A1628 !important;
}

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

::-webkit-scrollbar-track {
    background: #F0FBF7;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #7EDDB8;
}

/* Prevent flash of unstyled content */
.no-js .reveal {
    opacity: 1;
    transform: none;
}
