/* Custom Styles for Blooming Magnolia Hair Studio */

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

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #9d174d;
}

/* Navigation transitions */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #be185d, #fbbf24);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Mobile nav links */
.mobile-nav-link {
    position: relative;
    padding-left: 0;
}

.mobile-nav-link::before {
    content: '';
    position: absolute;
    left: -16px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #fce7f3, transparent);
    transition: width 0.3s ease;
    border-radius: 4px;
}

.mobile-nav-link:hover::before {
    width: 12px;
}

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

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

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

/* Default state for scroll reveals - visible for progressive enhancement */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar scroll state */
.nav-scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(127, 21, 77, 0.1);
}

.nav-scrolled .nav-link {
    color: #374151;
}

.nav-scrolled .nav-link:hover {
    color: #9d174d;
}

.nav-scrolled .font-serif {
    color: #831443;
}

/* Hero pattern animation */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Button hover effects */
button, a {
    transition: all 0.3s ease;
}

/* Form focus states */
input:focus, select:focus, textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(190, 24, 93, 0.1);
}

/* Gallery hover effects */
.rounded-2xl.overflow-hidden {
    position: relative;
}

.rounded-2xl.overflow-hidden::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(131, 20, 67, 0.3), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: inherit;
}

.rounded-2xl.overflow-hidden:hover::after {
    opacity: 1;
}

/* Testimonial card hover */
.bg-white\/5:hover {
    transform: translateY(-4px);
}

/* CTA section decorative elements */
@keyframes pulse-slow {
    0%, 100% { opacity: 0.05; transform: scale(1); }
    50% { opacity: 0.1; transform: scale(1.1); }
}

/* Accessibility: focus visible */
*:focus-visible {
    outline: 2px solid #be185d;
    outline-offset: 2px;
}

/* Mobile menu animation */
#mobile-menu {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Back to top button */
#back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Image loading placeholder */
img {
    background: linear-gradient(90deg, #fce7f3 25%, #fbcfe8 50%, #fce7f3 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

img[src] {
    animation: none;
    background: none;
}

/* Print styles */
@media print {
    nav, #back-to-top, .animate-bounce {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    .bg-plum-900, .bg-plum-50 {
        background: #f3f4f6 !important;
        color: #000 !important;
    }
}
