/* ===== Custom Styles for La Cevichería ===== */

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

/* Custom selection color */
::selection {
    background-color: rgba(123, 74, 142, 0.2);
    color: #3D264A;
}

/* Navbar scroll state */
#navbar.scrolled {
    background-color: rgba(253, 248, 244, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(123, 74, 142, 0.08);
}

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

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

/* Mobile link hover */
.mobile-link {
    position: relative;
    padding-left: 0;
    transition: padding-left 0.2s ease;
}

.mobile-link:hover {
    padding-left: 12px;
    color: #7B4A8E;
}

.mobile-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 2px;
    background-color: #F5C77E;
    transition: width 0.2s ease;
}

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

/* Fade-in animation for scroll reveal */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* Stagger children */
.fade-in-stagger > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in-stagger.visible > *:nth-child(1) { transition-delay: 0.05s; }
.fade-in-stagger.visible > *:nth-child(2) { transition-delay: 0.1s; }
.fade-in-stagger.visible > *:nth-child(3) { transition-delay: 0.15s; }
.fade-in-stagger.visible > *:nth-child(4) { transition-delay: 0.2s; }
.fade-in-stagger.visible > *:nth-child(5) { transition-delay: 0.25s; }
.fade-in-stagger.visible > *:nth-child(6) { transition-delay: 0.3s; }

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

/* Image aspect ratio helpers */
.aspect-card {
    aspect-ratio: 4/3;
}

/* Focus visible for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #7B4A8E;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Subtle hover lift for cards */
.group:hover .group-hover\:lift {
    transform: translateY(-4px);
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #BA8DCB;
}

/* Date input styling */
input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(36%) sepia(18%) saturate(463%) hue-rotate(238deg) brightness(90%) contrast(85%);
    cursor: pointer;
}

/* Select arrow */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237B4A8E' 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 12px center;
    padding-right: 36px;
}

/* Hero image parallax-like effect */
@media (prefers-reduced-motion: no-preference) {
    .hero-img {
        will-change: transform;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .fade-in,
    .fade-in-stagger > * {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .group:hover .group-hover\:scale-105 {
        transform: none;
    }
}
