/* ===== Custom Styles for Carnicería Manuel Alonso ===== */

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

/* Base */
body {
    font-family: 'Lato', system-ui, sans-serif;
    color: #1e293b;
    background-color: #fafaf9;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f5f5f4;
}
::-webkit-scrollbar-thumb {
    background: #134e4a;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #0f766e;
}

/* Selection */
::selection {
    background: #134e4a;
    color: #ccfbf1;
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Hero animations */
.hero-fade {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

.hero-fade:nth-child(1) { animation-delay: 0.2s; }
.hero-fade:nth-child(2) { animation-delay: 0.4s; }
.hero-fade:nth-child(3) { animation-delay: 0.6s; }
.hero-fade:nth-child(4) { animation-delay: 0.8s; }
.hero-fade:nth-child(5) { animation-delay: 1.0s; }
.hero-fade:nth-child(6) { animation-delay: 1.2s; }

/* Scroll reveal */
.reveal-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-left.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-right.revealed {
    opacity: 1;
    transform: translateX(0);
}

/* ===== Navigation ===== */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(4, 47, 46, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: #5eead4;
    transition: width 0.3s ease;
}

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

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

#mobile-menu.open .mobile-link {
    animation: fadeInUp 0.5s ease-out forwards;
}

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

/* Hamburger animation */
.hamburger-line {
    transition: all 0.3s ease;
}

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

#menu-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

#menu-btn.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 1.4rem;
}

/* ===== Buttons ===== */
a, button {
    cursor: pointer;
}

/* ===== Product cards ===== */
.group:hover img {
    transform: scale(1.1);
}

/* ===== Form ===== */
input:focus, textarea:focus {
    border-color: #0d9488;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .hero-fade {
        animation-duration: 0.6s;
    }
    
    #nosotros, #productos, #horario, #contacto {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }
}

/* ===== Print ===== */
@media print {
    nav, #contacto, .hamburger {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    section {
        page-break-inside: avoid;
    }
}
