/* ===== Custom Styles for Rouge Hair Studio ===== */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0a1628;
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #2dd4a0, #ec4899);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #4ade80, #f472b6);
}

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

/* ===== Navbar ===== */
#navbar {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

#navbar.scrolled {
    background: rgba(10, 22, 40, 0.95) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

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

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

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

/* Menu button animation */
.menu-line {
    transition: all 0.3s ease;
}

#menuBtn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
}
#menuBtn.active .menu-line:nth-child(3) {
    width: 24px;
    transform: rotate(-45deg) translate(5px, -5px);
    margin-left: 0;
}

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

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(45, 212, 160, 0.1);
}

/* ===== Gallery ===== */
.gallery-item {
    cursor: pointer;
}

.gallery-item img {
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Testimonial Cards ===== */
.testimonial-card {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.testimonial-card:hover {
    transform: translateY(-4px);
    border-color: rgba(45, 212, 160, 0.2);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* ===== Scroll Animations ===== */
.fade-in {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ===== Geometric floating shapes ===== */
@keyframes float {
    0%, 100% { transform: translateY(0) rotate(45deg); }
    50% { transform: translateY(-20px) rotate(45deg); }
}

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

.float-slow {
    animation: float 8s ease-in-out infinite;
}

.float-medium {
    animation: float 6s ease-in-out infinite;
}

.float-circle {
    animation: floatCircle 5s ease-in-out infinite;
}

/* ===== Gradient text utility ===== */
.text-gradient {
    background: linear-gradient(135deg, #2dd4a0, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== Button hover glow ===== */
.btn-glow:hover {
    box-shadow: 0 0 40px rgba(45, 212, 160, 0.3) !important;
}

/* ===== Input focus animation ===== */
input:focus,
textarea:focus,
select:focus {
    box-shadow: 0 0 0 4px rgba(45, 212, 160, 0.1);
}

/* ===== Responsive adjustments ===== */
@media (max-width: 768px) {
    .font-display {
        font-size: clamp(1.5rem, 5vw, 2.5rem);
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .service-card {
        padding: 2rem;
    }
}

/* ===== Print styles ===== */
@media print {
    #navbar,
    #contactForm,
    .gallery-item {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}

/* ===== 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;
    }
    
    .fade-in,
    .fade-in-left,
    .fade-in-right {
        opacity: 1;
        transform: none;
    }
}
