/* Custom styles for Sarah Alex Hair */

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

/* Selection color */
::selection {
    background-color: rgba(212, 160, 23, 0.3);
    color: #ffffff;
}

/* Navbar scroll state */
.navbar-scrolled {
    background-color: rgba(10, 26, 46, 0.95) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(212, 160, 23, 0.1);
}

/* Service card hover */
.service-card {
    transform: translateY(0);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover {
    transform: translateY(-4px);
}

/* Gallery item */
.gallery-item {
    height: 300px;
    cursor: pointer;
}

@media (min-width: 768px) {
    .gallery-item {
        height: 400px;
    }
}

/* Mobile menu */
#mobileMenu {
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                visibility 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#mobileMenu.active {
    opacity: 1 !important;
    pointer-events: all !important;
}

/* Menu lines animation */
.menu-line {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#menuBtn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

#menuBtn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 1.5rem;
}

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

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

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

/* Scroll reveal animations */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .gallery-item img {
        transition: none;
    }
    
    .gallery-item:hover img {
        transform: none;
    }
}

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

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

::-webkit-scrollbar-thumb {
    background: rgba(212, 160, 23, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 160, 23, 0.5);
}

/* Select dropdown styling */
select option {
    background-color: #0a1a2e;
    color: #ffffff;
}

/* Form focus states */
input:focus,
textarea:focus,
select:focus {
    box-shadow: 0 0 0 1px rgba(212, 160, 23, 0.2);
}

/* Back to top button */
#backToTop.visible {
    opacity: 1 !important;
    pointer-events: all !important;
}

/* Hero text animation on load */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#hero .max-w-2xl > * {
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

#hero .max-w-2xl > *:nth-child(1) { animation-delay: 0.1s; }
#hero .max-w-2xl > *:nth-child(2) { animation-delay: 0.2s; }
#hero .max-w-2xl > *:nth-child(3) { animation-delay: 0.3s; }
#hero .max-w-2xl > *:nth-child(4) { animation-delay: 0.4s; }
#hero .max-w-2xl > *:nth-child(5) { animation-delay: 0.5s; }
#hero .max-w-2xl > *:nth-child(6) { animation-delay: 0.6s; }
