/* Custom Styles for Hair by Jillian */

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

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FDF8F0;
}
::-webkit-scrollbar-thumb {
    background: #059669;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #047857;
}

/* Navbar Transition */
#navbar {
    transition: background-color 0.5s ease, box-shadow 0.5s ease, padding 0.5s ease;
}

#navbar.scrolled {
    background-color: rgba(253, 252, 248, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(5, 150, 105, 0.08);
}

#navbar.scrolled .nav-logo-text {
    color: #064E3B;
}

#navbar.scrolled .nav-link {
    color: #065F46;
}

/* Hero Animation */
.hero-content {
    animation: heroFadeIn 1.2s ease-out forwards;
}

@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes scrollBounce {
    0%, 100% {
        transform: translateY(0);
        opacity: 1;
    }
    50% {
        transform: translateY(10px);
        opacity: 0.5;
    }
}

/* Scroll Reveal Animations */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

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

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

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

/* Service Card Hover */
.group:hover .rounded-2xl {
    transform: scale(1.05);
}

/* Image Hover Effects */
.overflow-hidden img {
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Button Focus States */
button:focus-visible,
a:focus-visible {
    outline: 2px solid #059669;
    outline-offset: 2px;
    border-radius: 9999px;
}

/* Input Focus States */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}

/* Reduced Motion */
@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;
    }
}

/* Mobile Menu Overlay */
#mobile-menu {
    pointer-events: none;
}

#mobile-menu.open {
    pointer-events: all;
}

/* Gallery Grid Responsive */
@media (max-width: 768px) {
    .grid-cols-2 img {
        height: 200px;
    }
}

/* Form Success Animation */
#form-success {
    animation: successPop 0.5s ease-out;
}

@keyframes successPop {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Floating Card Animation */
@media (min-width: 768px) {
    .scroll-reveal .relative > div:last-child {
        animation: float 4s ease-in-out infinite;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}
