/*
 * Archivo: styles.css
 * Descripción: Estilos CSS3 minimalistas y elegantes con paleta verde oscuro y dorado.
 * Autor: Asistente AI Full-Stack
 */

:root {
    /* Paleta de Colores MEJORADA para Accesibilidad */
    --color-primary: #1a4d2e; /* Verde Oscuro Principal */
    --color-accent: #d4af37; /* Dorado Metálico */
    --color-accent-hover: #b8941f; /* Dorado más oscuro para hover */
    --color-light: #f8f8f8; /* Blanco ligeramente grisáceo */
    --color-dark: #121212; /* Gris Oscuro/Negro Sutil */
    --color-text: #2d2d2d; /* Texto con mejor contraste */
    --color-text-light: #666; /* Texto secundario */
    --color-border: #e0e0e0; /* Bordes sutiles */
    
    /* Colores de Accesibilidad */
    --focus-color: #0066cc; /* Azul para focus */
    --error-color: #dc3545;
    --success-color: #28a745;
    --warning-color: #ffc107;
    
    /* Contraste mejorado para modo oscuro */
    --dark-text-primary: #ffffff;
    --dark-text-secondary: #e0e0e0;
    --dark-bg-primary: #0f1f0f;
    --dark-bg-secondary: #1a2d1a;
    --dark-accent: #f4e4b1; /* Dorado más suave para modo oscuro */

    /* Tipografía */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Roboto', sans-serif;
}

/* Reset Básico y Tipografía */

/* Botón de Scroll para Subir */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #1a4d2e, #165b33);
    color: #ffd700;
    border: 2px solid #ffd700;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    animation: glow 2s infinite alternate;
}

.scroll-to-top:hover {
    background: linear-gradient(135deg, #ffd700, #1a4d2e);
    color: #fff;
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.5);
}

.scroll-to-top:active {
    transform: translateY(-2px) scale(1.05);
}

@keyframes glow {
    0% {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3), 0 0 10px rgba(255, 215, 0, 0.3);
    }
    100% {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3), 0 0 20px rgba(255, 215, 0, 0.6);
    }
}

/* Responsive para móvil */
@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
}
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background-color: var(--color-light);
    line-height: 1.6;
    overflow-x: hidden; /* Previene desbordamiento horizontal por animaciones */
}

h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1.2;
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.8rem; }

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color 0.3s ease, opacity 0.3s ease;
}

a:hover {
    color: var(--color-primary);
    opacity: 0.9;
}

/* Estilos de FOCOS para accesibilidad */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 3px solid var(--focus-color);
    outline-offset: 2px;
}

/* Saltar al contenido principal */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--color-primary);
    color: var(--color-light);
    padding: 8px;
    text-decoration: none;
    z-index: 10000;
    border-radius: 0 0 4px 0;
}

.skip-link:focus {
    top: 0;
}

/* Indicadores de estado para screen readers */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* Notificaciones para accesibilidad */
.aria-live-region {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ---------------------------------- */
/* 16. DARK MODE STYLES */
/* ---------------------------------- */

/* Dark Mode Toggle */
.theme-toggle {
    position: fixed;
    top: 100px;
    right: 30px;
    background: var(--color-primary);
    color: var(--color-accent);
    border: 2px solid var(--color-accent);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    z-index: 1001;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.theme-toggle:focus {
    outline: 3px solid var(--focus-color);
    outline-offset: 2px;
}

/* Dark Mode Variables */
body.dark-mode {
    --color-primary: #0f1f0f;
    --color-accent: #f4e4b1;
    --color-accent-hover: #e6d49f;
    --color-light: #1a2d1a;
    --color-dark: #ffffff;
    --color-text: #e0e0e0;
    --color-text-light: #b0b0b0;
    --color-border: #2a3d2a;
}

/* Dark Mode Specific Styles */
body.dark-mode {
    background-color: var(--dark-bg-primary);
    color: var(--dark-text-primary);
}

body.dark-mode .header {
    background-color: var(--dark-bg-secondary);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

body.dark-mode .nav-link {
    color: var(--dark-text-primary);
}

body.dark-mode .nav-link:hover {
    color: var(--dark-accent);
}

body.dark-mode .hero {
    background-color: var(--dark-bg-primary);
}

body.dark-mode .hero::before {
    background: rgba(15, 31, 15, 0.8);
}

body.dark-mode .hero h1 {
    color: var(--dark-accent);
}

body.dark-mode .time-block {
    background: rgba(0, 0, 0, 0.3);
}

body.dark-mode .time-value {
    color: var(--dark-accent);
}

body.dark-mode .movie-card {
    background: var(--dark-bg-secondary);
    border: 1px solid var(--dark-accent);
}

body.dark-mode .movie-info h3 {
    color: var(--dark-text-primary);
}

body.dark-mode .movie-year {
    color: var(--dark-accent);
}

body.dark-mode .movie-description {
    color: var(--dark-text-secondary);
}

body.dark-mode .section {
    background-color: var(--dark-bg-primary);
}

body.dark-mode .section-title {
    color: var(--dark-text-primary);
}

body.dark-mode .section-subtitle {
    color: var(--dark-text-secondary);
}

body.dark-mode .dark-section {
    background-color: var(--dark-bg-secondary);
    color: var(--dark-text-primary);
}

body.dark-mode .recipe-card {
    background: var(--dark-bg-secondary);
    color: var(--dark-text-primary);
}

body.dark-mode .recipe-card h3 {
    color: var(--dark-text-primary);
}

body.dark-mode .tradition-item h4 {
    color: var(--dark-accent);
}

body.dark-mode .tradition-item {
    border-left: 3px solid var(--dark-accent);
}

body.dark-mode .footer-navidad {
    background-color: var(--dark-bg-secondary);
    color: var(--dark-text-primary);
}

body.dark-mode .favorite-btn {
    background: rgba(244, 228, 177, 0.9);
}

body.dark-mode .favorite-btn:hover {
    background: var(--dark-accent);
}

body.dark-mode .floating-controls {
    background: rgba(15, 31, 15, 0.9);
}

/* Dark Mode Animations */
body.dark-mode .snowflake {
    background: rgba(244, 228, 177, 0.8);
}

body.dark-mode .particle {
    background-color: var(--dark-accent);
}

/* Dark Mode Transitions */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Responsive para dark mode toggle */
@media (max-width: 768px) {
    .theme-toggle {
        top: 80px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
}

/* Dark mode para lightbox */
body.dark-mode .lightbox {
    background-color: rgba(0, 0, 0, 0.95);
}

body.dark-mode .lightbox-close,
body.dark-mode .lightbox-nav {
    color: var(--dark-text-primary);
}

/* Dark mode para música */
body.dark-mode .music-player-enhanced {
    background: var(--dark-bg-secondary);
    border: 1px solid var(--dark-accent);
}

body.dark-mode .player-header h3 {
    color: var(--dark-text-primary);
}

body.dark-mode .song-info h4 {
    color: var(--dark-text-primary);
}

body.dark-mode .playlist-item {
    border-bottom: 1px solid var(--color-border);
}

body.dark-mode .playlist-item.active {
    background: rgba(244, 228, 177, 0.1);
    border-left: 3px solid var(--dark-accent);
}

body.dark-mode .song-details h5 {
    color: var(--dark-text-primary);
}

/* Dark mode para formulario de contacto */
body.dark-mode .contact-form {
    background: var(--dark-bg-secondary);
    border: 1px solid var(--dark-accent);
}

body.dark-mode .contact-form label {
    color: var(--dark-text-primary);
}

body.dark-mode .contact-form input,
body.dark-mode .contact-form textarea {
    background: var(--dark-bg-primary);
    border: 1px solid var(--color-border);
    color: var(--dark-text-primary);
}

body.dark-mode .contact-form input:focus,
body.dark-mode .contact-form textarea:focus {
    border-color: var(--dark-accent);
    box-shadow: 0 0 5px rgba(244, 228, 177, 0.5);
}

/* ---------------------------------- */
/* 20. MUSIC PLAYER ERROR HANDLING STYLES */
/* ---------------------------------- */

/* Estados del reproductor de música */
#toggle-music {
    transition: all 0.3s ease;
    position: relative;
}

#toggle-music.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

#toggle-music.buffering {
    animation: buffering 1s ease-in-out infinite;
}

#toggle-music.error-state {
    background: var(--error-color);
    color: white;
    animation: shake 0.5s ease-in-out;
}

#toggle-music.error-state:hover {
    background: #c82333;
    transform: scale(1.1);
}

/* Notificaciones del reproductor de música */
.music-notification {
    font-family: var(--font-body);
    font-size: 0.9rem;
    border: 2px solid transparent;
}

.music-notification-success {
    background: var(--success-color);
    border-color: #1e7e34;
}

.music-notification-error {
    background: var(--error-color);
    border-color: #bd2130;
}

.music-notification-warning {
    background: var(--warning-color);
    border-color: #d39e00;
    color: #212529;
}

.music-notification-info {
    background: #17a2b8;
    border-color: #138496;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification-close {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.notification-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Animaciones para notificaciones */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translate(-50%, 20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

@keyframes slideDown {
    from {
        opacity: 1;
        transform: translate(-50%, 0);
    }
    to {
        opacity: 0;
        transform: translate(-50%, 20px);
    }
}

@keyframes buffering {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Indicador de progreso de carga */
.loading-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Estados para volumen slider mejorado */
#volume-slider {
    position: relative;
    background: linear-gradient(to right, var(--color-accent) 0%, var(--color-accent) 50%, #ddd 50%, #ddd 100%);
    height: 6px;
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

#volume-slider::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--color-primary);
    border: 2px solid var(--color-accent);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

#volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

#volume-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: var(--color-primary);
    border: 2px solid var(--color-accent);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

#volume-slider::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

/* Indicador de volumen para accesibilidad */
.volume-indicator {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-primary);
    color: var(--color-accent);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1000;
}

.volume-indicator.show {
    opacity: 1;
}

/* Dark mode para reproductor */
body.dark-mode .music-notification-error {
    background: #c82333;
    border-color: #bd2130;
}

body.dark-mode .music-notification-warning {
    background: #e0a800;
    border-color: #d39e00;
    color: #212529;
}

body.dark-mode #toggle-music.error-state {
    background: #c82333;
}

body.dark-mode #volume-slider {
    background: linear-gradient(to right, var(--dark-accent) 0%, var(--dark-accent) 50%, #444 50%, #444 100%);
}

body.dark-mode .volume-indicator {
    background: var(--dark-bg-secondary);
    color: var(--dark-text-primary);
    border: 1px solid var(--dark-accent);
}

/* ---------------------------------- */
/* 17. MICROINTERACCIONES Y ANIMACIONES MEJORADAS */
/* ---------------------------------- */

/* Botones con efectos hover mejorados */
.btn-primary, .button {
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary::before, .button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    z-index: 0;
}

.btn-primary:hover::before, .button:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary:active, .button:active {
    transform: translateY(-1px) scale(0.98);
}

/* Efectos de typing para títulos */
.typing-effect {
    overflow: hidden;
    border-right: 2px solid var(--color-accent);
    white-space: nowrap;
    animation: typing 3s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: var(--color-accent); }
}

/* Efectos de magnifying glass en imágenes */
.image-magnifier {
    position: relative;
    overflow: hidden;
    cursor: zoom-in;
}

.image-magnifier img {
    transition: transform 0.3s ease;
}

.image-magnifier:hover img {
    transform: scale(1.2);
}

.image-magnifier::after {
    content: '🔍';
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--color-accent);
    color: var(--color-primary);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.image-magnifier:hover::after {
    opacity: 1;
    transform: translateY(0);
}

/* Loading states mejorados */
.loading-skeleton {
    background: linear-gradient(90deg, 
        rgba(26, 77, 46, 0.1) 25%, 
        rgba(212, 175, 55, 0.2) 50%, 
        rgba(26, 77, 46, 0.1) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 8px;
}

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

/* Efectos de ripple en botones */
.ripple-effect {
    position: relative;
    overflow: hidden;
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    animation: ripple-animation 0.6s ease-out;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Efectos de parallax suave */
.parallax-slow {
    transform: translateZ(0);
    will-change: transform;
    transition: transform 0.3s ease-out;
}

/* Animaciones de entrada mejoradas */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-in-left.active {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-in-right.active {
    opacity: 1;
    transform: translateX(0);
}

.scale-in {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.scale-in.active {
    opacity: 1;
    transform: scale(1);
}

/* Efectos de shake para validación */
.shake-animation {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-10px); }
    20%, 40%, 60%, 80% { transform: translateX(10px); }
}

/* Efectos de heartbeat */
.heartbeat {
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.1); }
    28% { transform: scale(1); }
    42% { transform: scale(1.1); }
    70% { transform: scale(1); }
}

/* Efectos de floating */
.floating {
    animation: floating 3s ease-in-out infinite;
}

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

/* Efectos de pulse para loading */
.pulse-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-accent);
    animation: pulse 1.4s ease-in-out infinite;
}

.pulse-dot:nth-child(2) { animation-delay: 0.2s; }
.pulse-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes pulse {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Loading dots */
.loading-dots {
    display: inline-flex;
    gap: 4px;
}

.loading-dots::after {
    content: '';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}

/* Efectos de gradient animation */
.gradient-animation {
    background: linear-gradient(270deg, var(--color-primary), var(--color-accent), var(--color-primary));
    background-size: 600% 600%;
    animation: gradient-shift 3s ease infinite;
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Efectos de text shimmer */
.text-shimmer {
    background: linear-gradient(90deg, 
        var(--color-text) 25%, 
        var(--color-accent) 50%, 
        var(--color-text) 75%);
    background-size: 200% 100%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: text-shimmer 2s linear infinite;
}

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

/* Efectos de card flip */
.card-flip {
    perspective: 1000px;
}

.card-flip-inner {
    transition: transform 0.6s;
    transform-style: preserve-3d;
    position: relative;
    width: 100%;
    height: 100%;
}

.card-flip.flipped .card-flip-inner {
    transform: rotateY(180deg);
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: inherit;
}

.card-back {
    transform: rotateY(180deg);
}

/* Efectos de glitch */
.glitch {
    position: relative;
    color: var(--color-primary);
    font-size: 2rem;
    font-weight: bold;
    text-transform: uppercase;
    text-shadow: 0.05em 0 0 var(--color-accent), -0.025em -0.05em 0 rgba(255, 0, 0, 0.75), 0.025em 0.05em 0 rgba(0, 255, 0, 0.75);
    animation: glitch 2s infinite;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    animation: glitch-1 0.5s infinite;
    color: var(--color-accent);
    z-index: -1;
}

.glitch::after {
    animation: glitch-2 0.5s infinite;
    color: var(--color-primary);
    z-index: -2;
}

@keyframes glitch {
    0%, 100% { text-shadow: 0.05em 0 0 var(--color-accent), -0.025em -0.05em 0 rgba(255, 0, 0, 0.75), 0.025em 0.05em 0 rgba(0, 255, 0, 0.75); }
    25% { text-shadow: -0.05em -0.025em 0 var(--color-accent), 0.025em 0.025em 0 rgba(255, 0, 0, 0.75), -0.05em -0.05em 0 rgba(0, 255, 0, 0.75); }
    50% { text-shadow: 0.025em 0.05em 0 var(--color-accent), 0.05em 0 0 rgba(255, 0, 0, 0.75), 0 -0.05em 0 rgba(0, 255, 0, 0.75); }
    75% { text-shadow: -0.025em 0 0 var(--color-accent), -0.025em -0.025em 0 rgba(255, 0, 0, 0.75), -0.025em -0.05em 0 rgba(0, 255, 0, 0.75); }
}

@keyframes glitch-1 {
    0%, 100% { clip-path: inset(0 0 0 0); transform: translate(0); }
    20% { clip-path: inset(20% 0 30% 0); transform: translate(-2px, 2px); }
    40% { clip-path: inset(50% 0 20% 0); transform: translate(2px, -2px); }
    60% { clip-path: inset(10% 0 60% 0); transform: translate(-2px, 2px); }
    80% { clip-path: inset(80% 0 5% 0); transform: translate(2px, -2px); }
}

@keyframes glitch-2 {
    0%, 100% { clip-path: inset(0 0 0 0); transform: translate(0); }
    20% { clip-path: inset(60% 0 10% 0); transform: translate(2px, -2px); }
    40% { clip-path: inset(20% 0 50% 0); transform: translate(-2px, 2px); }
    60% { clip-path: inset(40% 0 30% 0); transform: translate(2px, -2px); }
    80% { clip-path: inset(5% 0 80% 0); transform: translate(-2px, 2px); }
}

/* Efectos de hover 3D */
.hover-3d {
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
}

.hover-3d:hover {
    transform: rotateY(10deg) rotateX(-10deg) scale(1.05);
}

/* Efectos de morphing shapes */
.morph-shape {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    background: linear-gradient(45deg, var(--color-primary), var(--color-accent));
    animation: morph 8s ease-in-out infinite;
}

@keyframes morph {
    0%, 100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
    25% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
    50% { border-radius: 70% 30% 50% 60% / 30% 70% 40% 70%; }
    75% { border-radius: 40% 70% 60% 30% / 60% 40% 70% 50%; }
}

/* Efectos de typewriter mejorados */
.typewriter {
    overflow: hidden;
    border-right: 3px solid var(--color-accent);
    white-space: nowrap;
    letter-spacing: 0.15em;
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

/* Optimizaciones para animaciones en mobile */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Animaciones suaves para dark mode */
body.dark-mode .gradient-animation {
    background: linear-gradient(270deg, var(--dark-bg-primary), var(--dark-accent), var(--dark-bg-primary));
    background-size: 600% 600%;
}

/* ---------------------------------- */
/* 1. LAYOUT Y SECCIONES */
/* ---------------------------------- */

.section {
    padding: 80px 5%;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.dark-section {
    background-color: var(--color-primary);
    color: var(--color-light);
}

.dark-section h2, .dark-section h3 {
    color: var(--color-accent);
}

.section-title {
    margin-bottom: 10px;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--color-accent);
    margin: 10px auto 0;
}

.section-subtitle {
    margin-bottom: 40px;
    font-style: italic;
    color: var(--color-text);
}

.dark-section .section-subtitle {
    color: var(--color-light);
}

/* Botones Generales */
.btn-primary {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--color-accent);
    color: var(--color-primary);
    border: 2px solid var(--color-accent);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    transition: background-color 0.3s, color 0.3s, transform 0.2s;
}

.btn-primary:hover {
    background-color: var(--color-primary);
    color: var(--color-accent);
    transform: translateY(-2px);
    border-color: var(--color-accent);
    opacity: 1; /* Sobrescribe el hover global */
}

/* ---------------------------------- */
/* 2. CABECERA Y NAVEGACIÓN (RESPONSIVE) */
/* ---------------------------------- */

.header {
    background-color: var(--color-primary);
    color: var(--color-light);
    padding: 20px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-accent);
}

.nav-list {
    list-style: none;
    display: flex;
    gap: 30px;
}

.nav-link {
    color: var(--color-light);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
}

.nav-link:hover {
    color: var(--color-accent);
    opacity: 1;
}

.nav-link::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: width 0.3s ease;
    position: absolute;
    bottom: -5px;
    left: 0;
}

.nav-link:hover::after {
    width: 100%;
}

/* Menú Hamburguesa */
.hamburger {
    display: none; /* Oculto en desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.hamburger .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--color-accent);
    transition: all 0.3s ease-in-out;
}

/* Media Query: Versión Móvil del Menú */
@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .nav-list {
        position: fixed;
        top: 0;
        right: 0;
        width: 60%; /* Ancho del menú en móvil */
        height: 100vh;
        flex-direction: column;
        background-color: var(--color-primary);
        padding-top: 100px;
        transform: translateX(100%); /* Oculto por defecto */
        transition: transform 0.4s ease-in-out;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
    }

    .nav-list.active {
        transform: translateX(0); /* Muestra el menú */
    }

    .nav-list li {
        width: 100%;
        text-align: center;
        margin: 15px 0;
    }

    .nav-link {
        font-size: 1.2rem;
        display: block;
        padding: 10px;
        color: var(--color-light);
    }

    /* Animación del icono de hamburguesa a X */
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}


/* ---------------------------------- */
/* 3. SECCIÓN HERO (INICIO) Y CONTADOR */
/* ---------------------------------- */

.hero {
    background: url('images/hero-bg.jpg') no-repeat center center/cover; /* Reemplazar con una imagen propia */
    background-color: var(--color-primary);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 77, 46, 0.7); /* Capa verde oscura semi-transparente */
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: var(--color-light);
    padding: 20px;
}

.hero h1 {
    font-size: 4.5rem;
    color: var(--color-accent);
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.subtitle {
    font-size: 1.5rem;
    font-style: italic;
    margin-bottom: 40px;
    font-weight: 300;
}

/* Contador Regresivo */
.countdown-timer {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 30px;
}

.time-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    padding: 20px 30px;
    border-radius: 8px;
    min-width: 120px;
}

.time-value {
    font-family: var(--font-heading);
    font-size: 3rem;
    color: var(--color-accent);
    font-weight: 700;
    margin-bottom: 5px;
    /* Animación del contador - se aplica con JS para mejor control */
}

.time-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 300;
}

/* Animación del contador (clase aplicada por JS) */
.time-value.bounce {
    animation: bounce 0.4s ease-out;
}

@keyframes bounce {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

/* ---------------------------------- */
/* 4. GALERÍA Y CARRUSEL */
/* ---------------------------------- */

/* Carrusel */
.carousel-container {
    max-width: 800px;
    margin: 40px auto;
    position: relative;
    overflow: hidden;
    border: 5px solid var(--color-primary);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.carousel-slide {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide img {
    width: 300px; /* Ancho fijo para cada imagen */
    height: 200px;
    flex-shrink: 0;
    display: block;
    object-fit: cover;
    border-right: 2px solid rgba(255, 255, 255, 0.1);
}

.prev-btn, .next-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(26, 77, 46, 0.6);
    color: var(--color-accent);
    border: none;
    padding: 15px;
    cursor: pointer;
    font-size: 1.5rem;
    z-index: 10;
    transition: background-color 0.3s;
}

.prev-btn:hover, .next-btn:hover {
    background: var(--color-primary);
}

.prev-btn { left: 0; }
.next-btn { right: 0; }

/* Galería */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.image-gallery img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    cursor: pointer;
    border: 3px solid var(--color-light);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.image-gallery img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    border-color: var(--color-accent);
}

/* Lightbox Modal */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: none; /* Oculto por defecto, JS lo muestra */
    justify-content: center;
    align-items: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease-in-out;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    display: block;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: var(--color-light);
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    background: none;
    border: none;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-light);
    font-size: 50px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 10px;
    transition: opacity 0.3s;
}

.lightbox-nav:hover {
    opacity: 0.7;
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }


/* ---------------------------------- */
/* 5. RECETAS Y TRADICIONES */
/* ---------------------------------- */

.recipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.recipe-card {
    background-color: var(--color-light);
    color: var(--color-text);
    padding: 30px;
    border-radius: 8px;
    text-align: left;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.recipe-card:hover {
    transform: translateY(-5px);
}

.recipe-card h3 {
    color: var(--color-primary);
    margin-bottom: 10px;
}

.traditions-list {
    text-align: left;
    padding: 0 10%;
    margin-top: 40px;
}

.tradition-item {
    margin-bottom: 30px;
    padding-left: 20px;
    border-left: 3px solid var(--color-accent);
}

.tradition-item h4 {
    color: var(--color-accent);
    margin-bottom: 5px;
    font-size: 1.4rem;
}

.content-block {
    max-width: 800px;
    margin: 20px auto;
    text-align: left;
}

/* ---------------------------------- */
/* 6. FORMULARIO DE CONTACTO */
/* ---------------------------------- */

.contact-form {
    max-width: 600px;
    margin: 40px auto;
    padding: 30px;
    background-color: var(--color-light);
    border: 1px solid var(--color-accent);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    text-align: left;
}

.form-group {
    margin-bottom: 20px;
}

.contact-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: var(--color-primary);
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 5px rgba(212, 175, 55, 0.5);
    outline: none;
}

.contact-form textarea {
    resize: vertical;
}

.error-message {
    color: #ff3860; /* Rojo para errores */
    font-size: 0.9rem;
    margin-top: 5px;
    display: block;
}

.contact-form input.invalid,
.contact-form textarea.invalid {
    border-color: #ff3860;
}

.success-message {
    margin-top: 15px;
    color: var(--color-primary);
    font-weight: 700;
    font-size: 1.1rem;
    padding: 10px;
    background-color: #e6ffe6;
    border: 1px solid var(--color-primary);
    border-radius: 4px;
}

/* ---------------------------------- */
/* 7. PIE DE PÁGINA */
/* ---------------------------------- */

.footer {
    background-color: var(--color-dark);
    color: var(--color-light);
    text-align: center;
    padding: 40px 5%;
    font-size: 0.9rem;
}

.footer p {
    margin-bottom: 10px;
}

.social-links a {
    color: var(--color-accent);
    font-size: 1.5rem;
    margin: 0 10px;
}

.social-links a:hover {
    color: var(--color-light);
}

/* ---------------------------------- */
/* 8. EFECTOS VISUALES Y ACCESORIOS */
/* ---------------------------------- */

/* Contenedor de Nieve (Canvas o Elementos DOM) */
#snow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Permite interactuar con el contenido debajo */
    z-index: 50;
    overflow: hidden;
}

/* Estilo para los copos de nieve generados por JS */
.snowflake {
    position: absolute;
    width: 5px;
    height: 5px;
    background: white;
    border-radius: 50%;
    opacity: 0.8;
    z-index: 50;
    /* La animación se aplica en JS */
}

/* Contenedor de Partículas Doradas */
#particle-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 40; /* Menor que la nieve */
    overflow: hidden;
}

/* Estilo para las partículas generadas por JS */
.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background-color: var(--color-accent);
    border-radius: 50%;
    opacity: 0.5;
    z-index: 40;
    /* La animación se aplica en JS */
}

/* Controles de Música Flotantes */
.floating-controls {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1100;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(26, 77, 46, 0.8);
    padding: 10px 15px;
    border-radius: 50px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

#toggle-music {
    background: var(--color-accent);
    color: var(--color-primary);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.3s;
}

#toggle-music:hover {
    background: var(--color-light);
}

#volume-slider {
    width: 100px;
    cursor: grab;
    /* Estilos personalizados para el slider (cross-browser) */
}


/* ---------------------------------- */
/* 9. ANIMACIONES AL SCROLL (fade-in, slide-up, slide-left, slide-right) */
/* ---------------------------------- */

.section-scroll-animate {
    opacity: 0;
    transition: opacity 1s ease-out, transform 1s ease-out;
    will-change: opacity, transform;
}

.section-scroll-animate.fade-in {
    opacity: 0;
    transform: translateY(20px);
}
.section-scroll-animate.slide-up {
    opacity: 0;
    transform: translateY(50px);
}
.section-scroll-animate.slide-left {
    opacity: 0;
    transform: translateX(-50px);
}
.section-scroll-animate.slide-right {
    opacity: 0;
    transform: translateX(50px);
}


/* Clase aplicada por JS cuando es visible */
.section-scroll-animate.active {
    opacity: 1;
    transform: translate(0, 0);
}

/* Retrasos para las tarjetas */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }


/* ---------------------------------- */
/* 11. SECCIÓN DE PELÍCULAS */
/* ---------------------------------- */

.movies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.movie-card {
    background: var(--color-light);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid var(--color-accent);
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.movie-card:focus-within {
    outline: 3px solid var(--focus-color);
    outline-offset: 2px;
}

.movie-poster {
    position: relative;
    height: 450px;
    overflow: hidden;
}

.movie-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.movie-card:hover .movie-poster img {
    transform: scale(1.05);
}

.favorite-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    color: var(--color-primary);
    z-index: 2;
}

.favorite-btn:hover {
    background: var(--color-accent);
    color: var(--color-primary);
    transform: scale(1.1);
}

.favorite-btn.active {
    background: var(--color-accent);
    color: var(--color-primary);
}

.watch-btn {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-primary);
    color: var(--color-accent);
    border: none;
    border-radius: 25px;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    opacity: 0;
    z-index: 2;
}

.movie-card:hover .watch-btn {
    opacity: 1;
    transform: translateX(-50%) translateY(-5px);
}

.watch-btn:hover {
    background: var(--color-accent);
    color: var(--color-primary);
    transform: translateX(-50%) translateY(-8px);
}

.movie-info {
    padding: 20px;
}

.movie-info h3 {
    color: var(--color-primary);
    font-size: 1.3rem;
    margin-bottom: 5px;
}

.movie-year {
    color: var(--color-accent);
    font-size: 0.9rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.movie-description {
    color: var(--color-text);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 15px;
}

.movie-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--color-accent);
    font-weight: 600;
}

.favorites-section {
    margin-top: 50px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    border: 1px solid var(--color-accent);
}

.favorites-title {
    color: var(--color-primary);
    font-size: 1.5rem;
    margin-bottom: 20px;
    text-align: center;
}

.favorites-count {
    color: var(--color-accent);
}

.favorites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    min-height: 100px;
}

.no-favorites {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--color-text);
    font-style: italic;
    padding: 40px;
}

/* ---------------------------------- */
/* 12. FILTROS DE GALERÍA */
/* ---------------------------------- */

.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    border: 2px solid var(--color-accent);
    color: var(--color-primary);
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.filter-btn:hover {
    background: var(--color-accent);
    color: var(--color-primary);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--color-accent);
    color: var(--color-primary);
}

.image-gallery img {
    transition: all 0.3s ease;
    opacity: 1;
}

.image-gallery img.hidden {
    opacity: 0;
    transform: scale(0.8);
    position: absolute;
    pointer-events: none;
}

/* ---------------------------------- */
/* 13. REPRODUCTOR DE MÚSICA MEJORADO */
/* ---------------------------------- */

.music-player-enhanced {
    max-width: 800px;
    margin: 40px auto;
    background: var(--color-light);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--color-accent);
}

.player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 20px;
}

.player-header h3 {
    color: var(--color-primary);
    font-size: 1.5rem;
}

.player-controls {
    display: flex;
    gap: 15px;
}

.control-btn {
    background: var(--color-primary);
    color: var(--color-accent);
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.control-btn:hover {
    background: var(--color-accent);
    color: var(--color-primary);
    transform: scale(1.1);
}

.control-btn.active {
    background: var(--color-accent);
    color: var(--color-primary);
}

.play-pause-btn {
    width: 55px;
    height: 55px;
    font-size: 1.3rem;
}

.now-playing {
    margin-bottom: 30px;
    text-align: center;
}

.song-info h4 {
    color: var(--color-primary);
    font-size: 1.3rem;
    margin-bottom: 5px;
}

.song-info p {
    color: var(--color-text);
    font-size: 1rem;
    margin-bottom: 15px;
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.progress-container span {
    color: var(--color-text);
    font-size: 0.9rem;
    min-width: 40px;
}

.progress-bar {
    flex: 1;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
    cursor: pointer;
}

.progress-fill {
    height: 100%;
    background: var(--color-accent);
    width: 0%;
    transition: width 0.1s linear;
}

.playlist-container {
    margin-top: 30px;
}

.playlist-container h4 {
    color: var(--color-primary);
    margin-bottom: 20px;
    text-align: center;
}

.playlist {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.playlist-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: all 0.3s ease;
    gap: 15px;
}

.playlist-item:hover {
    background: rgba(212, 175, 55, 0.1);
}

.playlist-item.active {
    background: rgba(26, 77, 46, 0.1);
    border-left: 3px solid var(--color-accent);
}

.song-number {
    color: var(--color-text);
    font-weight: 600;
    min-width: 20px;
}

.song-details {
    flex: 1;
}

.song-details h5 {
    color: var(--color-primary);
    margin-bottom: 3px;
    font-size: 1rem;
}

.song-details p {
    color: var(--color-text);
    font-size: 0.85rem;
}

.song-duration {
    color: var(--color-text);
    font-size: 0.9rem;
}

/* Scrollbar personalizada para playlist */
.playlist::-webkit-scrollbar {
    width: 6px;
}

.playlist::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.playlist::-webkit-scrollbar-thumb {
    background: var(--color-accent);
    border-radius: 3px;
}

.playlist::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

/* ---------------------------------- */
/* 14. LAZY LOADING Y OPTIMIZACIÓN */
/* ---------------------------------- */

/* Lazy loading placeholder MEJORADO */
.lazy-load {
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(10px);
}

.lazy-load.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* Placeholder para imágenes MEJORADO */
.lazy-placeholder {
    background: linear-gradient(90deg, 
        rgba(26, 77, 46, 0.1) 25%, 
        rgba(212, 175, 55, 0.1) 50%, 
        rgba(26, 77, 46, 0.1) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    min-height: 200px;
    border-radius: 12px;
    border: 1px solid rgba(212, 175, 55, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.lazy-placeholder::before {
    content: '🎄';
    font-size: 2rem;
    opacity: 0.3;
    position: absolute;
    animation: pulse 2s ease-in-out infinite;
}

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

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.1); opacity: 0.5; }
}

/* WebP optimization */
.webp-optimized {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Responsive images */
.responsive-img {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.responsive-img:hover {
    transform: scale(1.02);
}

/* Picture element styles */
picture {
    display: block;
    width: 100%;
    height: 100%;
}

/* Optimización para imágenes */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    image-rendering: pixelated;
}

@media (min-resolution: 2dppx) {
    img {
        image-rendering: auto;
    }
}

/* WebP fallback */
.webp-support .movie-poster img,
.webp-support .image-gallery img,
.webp-support .carousel-slide img {
    font-family: 'object-fit: cover';
}

.no-webp .movie-poster img,
.no-webp .image-gallery img,
.no-webp .carousel-slide img {
    font-family: 'object-fit: cover';
}

/* Performance optimizations */
.movie-card,
.image-gallery img,
.carousel-slide img {
    will-change: transform;
}

.movie-card:hover,
.image-gallery img:hover {
    will-change: auto;
}

/* Contain para mejor rendimiento */
.movies-grid,
.image-gallery,
.carousel-slide {
    contain: layout style paint;
}

/* ---------------------------------- */
/* 10. RESPONSIVE DESIGN MEJORADO (Media Queries) */
/* ---------------------------------- */

/* Extra Large Screens (1200px+) */
@media (min-width: 1200px) {
    .container {
        max-width: 1400px;
        margin: 0 auto;
        padding: 0 20px;
    }
    
    .movies-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 40px;
    }
    
    .recipe-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 40px;
    }
    
    .hero h1 {
        font-size: 5rem;
    }
    
    .section {
        padding: 100px 5%;
        max-width: 1400px;
    }
    
    .carrusel-container {
        max-width: 1200px;
    }
    
    .music-player-enhanced {
        max-width: 1000px;
        padding: 40px;
    }
}

/* Large Screens (992px - 1199px) */
@media (max-width: 1199px) and (min-width: 992px) {
    .movies-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .hero h1 {
        font-size: 4.5rem;
    }
    
    .section {
        padding: 80px 4%;
    }
}

/* Tablets (768px - 991px) - MEJORADO */
@media (max-width: 991px) and (min-width: 768px) {
    h1 { font-size: 3.5rem; }
    h2 { font-size: 2.2rem; }
    h3 { font-size: 1.6rem; }
    
    .section { 
        padding: 70px 4%; 
        max-width: 100%;
    }
    
    .countdown-timer { 
        gap: 20px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .time-block { 
        min-width: 120px; 
        padding: 20px 15px; 
        margin: 5px;
    }
    
    .time-value { font-size: 2.8rem; }
    .time-label { font-size: 0.9rem; }
    
    .movies-grid { 
        grid-template-columns: repeat(2, 1fr); 
        gap: 30px;
        padding: 0 20px;
    }
    
    .movie-card {
        max-width: none;
    }
    
    .movie-poster {
        height: 350px;
    }
    
    .recipe-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    .traditions-list { 
        padding: 0 5%;
        columns: 2;
        column-gap: 40px;
    }
    
    .tradition-item {
        break-inside: avoid;
        margin-bottom: 25px;
    }
    
    .music-player-enhanced { 
        padding: 25px;
        margin: 0 20px;
    }
    
    .player-header { 
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
    
    .carrusel-container {
        max-width: 700px;
        margin: 30px auto;
    }
    
    .gallery-filters { 
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .filter-btn { 
        padding: 12px 20px; 
        font-size: 0.9rem;
    }
    
    /* Header mejorado para tablets */
    .header {
        padding: 15px 4%;
    }
    
    .logo {
        font-size: 1.6rem;
    }
    
    .nav-list {
        gap: 20px;
    }
    
    .floating-controls {
        bottom: 30px;
        left: 30px;
    }
    
    .theme-toggle {
        top: 90px;
        right: 30px;
    }
}

/* Large Mobile (600px - 767px) - NUEVO */
@media (max-width: 767px) and (min-width: 600px) {
    h1 { font-size: 3rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.5rem; }
    
    .section { 
        padding: 60px 3%; 
    }
    
    .hero {
        padding: 120px 20px 80px;
        min-height: auto;
    }
    
    .countdown-timer { 
        gap: 15px;
    }
    
    .time-block { 
        min-width: 100px; 
        padding: 15px 10px; 
    }
    
    .time-value { font-size: 2.2rem; }
    .time-label { font-size: 0.8rem; }
    
    .movies-grid { 
        grid-template-columns: repeat(2, 1fr); 
        gap: 25px;
    }
    
    .movie-poster {
        height: 280px;
    }
    
    .recipe-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .recipe-card {
        max-width: 500px;
        margin: 0 auto;
    }
    
    .traditions-list { 
        padding: 0 3%;
        columns: 1;
    }
    
    .music-player-enhanced { 
        padding: 20px;
        margin: 0 15px;
    }
    
    .player-header { 
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .carrusel-container {
        max-width: 100%;
        margin: 20px 15px;
    }
    
    .gallery-filters { 
        gap: 10px;
    }
    
    .filter-btn { 
        padding: 10px 18px; 
        font-size: 0.85rem;
    }
    
    .favorites-section {
        padding: 25px 15px;
    }
}

/* Small Mobile (480px - 599px) */
@media (max-width: 599px) and (min-width: 480px) {
    h1 { font-size: 2.8rem; }
    h2 { font-size: 1.9rem; }
    h3 { font-size: 1.4rem; }
    
    .section { 
        padding: 50px 3%; 
    }
    
    .hero {
        padding: 100px 15px 60px;
        min-height: auto;
    }
    
    .subtitle {
        font-size: 1.1rem;
        margin: 0 0 30px 0;
    }
    
    .countdown-timer { 
        gap: 12px;
        flex-wrap: wrap;
    }
    
    .time-block { 
        min-width: calc(50% - 6px);
        padding: 12px 8px;
        margin: 3px;
    }
    
    .time-value { font-size: 2rem; }
    .time-label { font-size: 0.75rem; }
    
    .movies-grid { 
        grid-template-columns: 1fr; 
        gap: 20px;
        padding: 0;
    }
    
    .movie-card {
        max-width: 400px;
        margin: 0 auto;
    }
    
    .movie-poster {
        height: 250px;
    }
    
    .movie-info {
        padding: 18px;
    }
    
    .movie-info h3 { font-size: 1.2rem; }
    .movie-description { font-size: 0.95rem; }
    
    .recipe-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .music-player-enhanced { 
        padding: 18px;
        margin: 0 10px;
    }
    
    .player-controls { 
        gap: 12px;
        justify-content: center;
    }
    
    .control-btn { 
        width: 45px; 
        height: 45px; 
        font-size: 1.1rem;
    }
    
    .play-pause-btn { 
        width: 55px; 
        height: 55px; 
        font-size: 1.3rem;
    }
    
    .carrusel-container {
        margin: 15px 10px;
    }
    
    .gallery-filters { 
        flex-direction: column; 
        align-items: center;
        gap: 8px;
    }
    
    .filter-btn { 
        width: 200px; 
        text-align: center;
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .favorites-section {
        padding: 20px 10px;
    }
    
    .favorites-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .traditions-list {
        padding: 0 2%;
    }
    
    .footer-contenedor {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .footer-columna.footer-contacto .contacto-item {
        justify-content: center;
    }
    
    .floating-controls {
        left: 50%;
        transform: translateX(-50%);
        bottom: 20px;
        width: 90%;
        max-width: 300px;
        justify-content: center;
        gap: 15px;
        padding: 12px 20px;
    }
    
    #volume-slider { 
        width: 120px;
    }
    
    .theme-toggle {
        top: 80px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

/* Extra Small Mobile (<480px) */
@media (max-width: 479px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 1.8rem; }
    h3 { font-size: 1.3rem; }
    
    .section { 
        padding: 40px 2%; 
    }
    
    .hero {
        padding: 80px 10px 50px;
        min-height: auto;
    }
    
    .hero h1 {
        font-size: 2.2rem;
        line-height: 1.2;
        margin-bottom: 15px;
    }
    
    .subtitle {
        font-size: 1rem;
        margin-bottom: 25px;
    }
    
    .countdown-timer { 
        gap: 10px;
        flex-wrap: wrap;
    }
    
    .time-block { 
        min-width: calc(50% - 5px);
        padding: 10px 5px;
        margin: 2px;
        min-height: 80px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    
    .time-value { font-size: 1.8rem; }
    .time-label { font-size: 0.7rem; }
    
    .movies-grid { 
        grid-template-columns: 1fr; 
        gap: 15px;
        padding: 0;
    }
    
    .movie-card {
        max-width: 350px;
        margin: 0 auto;
    }
    
    .movie-poster {
        height: 220px;
    }
    
    .movie-info {
        padding: 15px;
    }
    
    .movie-info h3 { 
        font-size: 1.1rem;
        line-height: 1.3;
        margin-bottom: 8px;
    }
    
    .movie-description { 
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    .recipe-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .recipe-card {
        padding: 20px 15px;
    }
    
    .music-player-enhanced { 
        padding: 15px;
        margin: 0 8px;
    }
    
    .player-header h3 { 
        font-size: 1.1rem; 
        margin-bottom: 15px;
    }
    
    .song-info h4 { 
        font-size: 1rem; 
        margin-bottom: 8px;
    }
    
    .progress-container { 
        flex-direction: column; 
        gap: 10px;
        align-items: center;
    }
    
    .progress-bar { 
        width: 100%;
        height: 8px;
    }
    
    .player-controls { 
        gap: 10px;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .control-btn { 
        width: 40px; 
        height: 40px; 
        font-size: 1rem;
        margin: 0 2px;
    }
    
    .play-pause-btn { 
        width: 48px; 
        height: 48px; 
        font-size: 1.2rem;
    }
    
    .carrusel-container {
        margin: 10px 8px;
    }
    
    .carrusel-wrapper {
        padding: 0 40px;
    }
    
    .btn-navegacion {
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }
    
    .gallery-filters { 
        flex-direction: column; 
        align-items: center;
        gap: 6px;
    }
    
    .filter-btn { 
        width: 180px; 
        text-align: center;
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    
    .favorites-section {
        padding: 15px 8px;
    }
    
    .favorites-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .traditions-list {
        padding: 0 1%;
    }
    
    .tradition-item {
        padding-left: 15px;
        margin-bottom: 20px;
    }
    
    .tradition-item h4 {
        font-size: 1.2rem;
        margin-bottom: 8px;
    }
    
    .tradition-item p {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    .footer-contenedor {
        grid-template-columns: 1fr;
        gap: 25px;
        text-align: center;
        padding: 0 15px;
    }
    
    .footer-columna h3 {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }
    
    .footer-columna p,
    .footer-columna li {
        font-size: 0.9rem;
    }
    
    .social-links a {
        font-size: 1.3rem;
        margin: 0 8px;
    }
    
    .floating-controls {
        left: 50%;
        transform: translateX(-50%);
        bottom: 15px;
        width: 95%;
        max-width: 280px;
        justify-content: center;
        gap: 12px;
        padding: 10px 15px;
    }
    
    #volume-slider { 
        width: 100px;
        height: 4px;
    }
    
    #toggle-music {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .theme-toggle {
        top: 70px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
    
    .scroll-to-top {
        bottom: 20px;
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
    
    /* Lightbox para mobile */
    .lightbox {
        padding: 10px;
    }
    
    .lightbox-close,
    .lightbox-nav {
        padding: 8px;
        font-size: 1.5rem;
    }
    
    /* Contador de favoritos mobile */
    .favorites-count {
        font-size: 0.9rem;
    }
    
    /* Botón Cine Navideño mobile */
    .button {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}