/* Custom styles for Maison Mirah */

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

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

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

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

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

/* Selection color */
::selection {
    background: #781F2C;
    color: #fff;
}

/* Navbar transition */
#navbar.scrolled {
    background: rgba(10, 15, 26, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(120, 31, 44, 0.2);
}

/* Mobile menu animation */
#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

/* Menu button animation */
#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) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 1.5rem;
}

/* Mobile links animation */
.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.2s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.3s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.4s; }
#mobileMenu.open .mobile-link:nth-child(5) { transition-delay: 0.5s; }

/* 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);
}

/* Parallax-like subtle movement */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(40px);
    }
    
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero image grid hover */
@media (hover: hover) and (pointer: fine) {
    .group:hover .group-hover\\:scale-105 {
        transform: scale(1.05);
    }
    
    .group:hover .group-hover\\:scale-110 {
        transform: scale(1.1);
    }
}

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

/* Button press effect */
button, a {
    -webkit-tap-highlight-color: transparent;
}

button:active, a:active {
    transform: scale(0.98);
}

/* Image loading placeholder */
img {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
}

/* Subtle gradient border effect for cards */
.group:hover {
    box-shadow: 0 0 40px rgba(120, 31, 44, 0.15);
}

/* Custom select styling */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23781F2C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
    padding-right: 3rem;
}

/* Reduce motion preference */
@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;
    }
    
    .scroll-reveal {
        opacity: 1;
        transform: none;
    }
}
