/* 🔧 VARIABLES CSS MÓVIL-FIRST - SINCRONIZADAS CON HEADER */
:root {
--primary-color: #f25c5c; 
--secondary-color: #8ec67d; 
--text-color: #333;
--background-color: #fff; 
/* ⚡ MÓVIL PRIMERO - prevenir flash */
--top-bar-height: 25px; 
--header-height: 70px;
--header-height-scroll: 55px; 
--font-family: 'Nunito', sans-serif;
}

/* Anti-FOUC: mantener oculto hasta que el script crítico marque listo */
html.no-fouc { visibility: hidden; }
html.fouc-ready { visibility: visible; }

/* Eliminar cualquier fondo amarillo del body */
html, body {
    background: #f8f9fa !important; /* Forzar fondo gris claro */
    margin: 0 !important;
    padding: 0 !important;
}

/* Viewport classes - Header móvil ahora manejado por CSS inline crítico en header.php */
/* Las reglas críticas de header fueron movidas a CSS inline para mejor rendimiento */

/* 📱 DESKTOP - sobrescribir solo cuando necesario */
@media (min-width: 769px) {
:root {
--top-bar-height: 30px; 
--header-height: 75px;
--header-height-scroll: 65px;
}
}

/* 📱 BODY PADDING MÓVIL-FIRST - EVITAR FOUC */
body {
margin: 0 !important; 
padding: 0 !important; 
padding-top: calc(var(--header-height) + var(--top-bar-height)) !important;
/* SIN transición inicial para prevenir FOUC */
font-family: var(--font-family);
line-height: 1.6;
position: relative;
}

/* 🖥️ DESKTOP - añadir transición solo cuando sea estable */
@media (min-width: 769px) {
body {
transition: padding-top 0.4s ease;
}
}

/* Optimización crítica para LCP */
.hero-section {
    contain: layout style paint;
    transform: translateX(-50%) translateZ(0);
    /* Placeholder mientras carga la imagen */
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 200px;
    /* Altura mínima para móvil */
    position: relative;
    left: 50%;
    width: 100vw;
    max-width: none;
}

/* Hero Section Optimizado - Ajustado para 1920x600 */
.hero-section {
    width: 100vw;
    height: auto;
    aspect-ratio: 16/5; /* Cambiado de 16/4 a 16/5 para mostrar más altura (1920x600 = 3.2 ≈ 16/5) */
    overflow: hidden;
    background: #f8f9fa;
    border-radius: 0;
    margin: 0 !important; /* Eliminar cualquier margen */
    padding: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    max-width: none;
    /* Eliminar margin-top para pegarlo al header */
}

.hero-section img {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    object-position: center;
    display: block;
    /* Optimizaciones para LCP */
    content-visibility: auto;
    contain: layout style paint;
    will-change: transform;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

@media (max-width: 768px) {
    .hero-section {
        aspect-ratio: 1400/850; /* Usar las dimensiones reales de la imagen para móvil */
        margin-top: 5px; /* Menos margen en móvil */
    }
    
    /* Asegurar que la imagen se muestre completa en móvil */
    .hero-section img {
        object-fit: contain !important; /* Mostrar imagen completa sin cortar */
        background: #f8f9fa; /* Fondo para espacios vacíos si los hay */
    }
}

/* Ajustes específicos para tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero-section {
        aspect-ratio: 16/5; /* Mantener proporción correcta en tablet también */
        margin-top: 8px; /* Margen intermedio para tablet */
    }
}

/* Ajustes específicos para desktop */
@media (min-width: 1025px) {
    .hero-section {
        aspect-ratio: 16/5; /* Mantener proporción correcta */
        max-width: none;
        /* Remover ancho máximo para mantener full width */
        margin-top: 15px; /* Más margen en desktop */
    }
}

/* Estilos específicos para manejar zoom */
@media screen and (min-resolution: 1.5dppx) {
    .hero-section {
        width: 100vw;
        max-width: none;
        left: 50%;
        transform: translateX(-50%) translateZ(0);
    }
}

/* Asegurar centrado perfecto en todos los navegadores */
.hero-section {
    margin-left: 0;
    margin-right: 0;
}

/* Fallback para navegadores que no soportan transform */
@supports not (transform: translateX(-50%)) {
    .hero-section {
        width: 100vw;
        margin-left: -50vw;
        left: 50%;
    }
}

/* Location Form - Optimizado para nueva altura de imagen 16/5 */
.location-form-section {
    position: relative;
    margin-top: -120px; /* Aumentado para mejor superposición con imagen más alta */
    background: none;
    padding: 20px 0;
    z-index: 10;
    overflow: visible !important;
}

/* Ajuste responsivo del formulario */
@media (max-width: 768px) {
    .location-form-section {
        margin-top: -120px; /* Subir más el formulario en móvil */
        padding: 16px;
    }
}

/* Desktop: subir un poco el formulario solo en pantallas grandes */
@media (min-width: 1025px) {
    .location-form-section {
        margin-top: -170px; /* Subir 20px respecto al valor base */
    }
}

.location-form-wrapper {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 
        0 8px 32px rgba(31, 38, 135, 0.37),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    transition: all 0.3s ease;
}

/* Animación de entrada del formulario */
@keyframes slideInForm {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Estilos de partículas eliminados para optimizar rendimiento */

/* Efecto sutil para el formulario glassmorphism */
.location-form-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 30%, rgba(242, 92, 92, 0.03) 0%, transparent 60%),
                radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
                radial-gradient(circle at 60% 20%, rgba(242, 92, 92, 0.02) 0%, transparent 70%);
    border-radius: 20px;
    z-index: -1;
    pointer-events: none;
}

/* Asegurar que el contenido esté por encima de las partículas */
.location-form-wrapper>*:not(.form-particles) {
    position: relative;
    z-index: 10000;
}

/* Efecto hover sutil para el formulario glassmorphism */
.location-form-wrapper:hover {
    box-shadow: 
        0 12px 40px rgba(31, 38, 135, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.35);
}

/* Formulario más compacto en móvil */
@media (max-width: 768px) {
    .location-form-wrapper {
        padding: 16px;
        border-radius: 16px;
    }
    
    /* Efecto hover más sutil en móvil */
    .location-form-wrapper:hover {
        transform: translateY(-1px);
        box-shadow: 
            0 8px 25px rgba(31, 38, 135, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.4);
        background: rgba(255, 255, 255, 0.3);
    }

    /* Reducir intensidad de partículas en móvil */
    .form-particles {
        opacity: 0.6;
    }

    .form-particle {
        animation-duration: 8s !important;
    }

    .form-particle:nth-child(1),
    .form-particle:nth-child(4) {
        width: 6px !important;
        height: 6px !important;
    }

    .form-particle:nth-child(2),
    .form-particle:nth-child(5) {
        width: 4px !important;
        height: 4px !important;
    }

    .form-particle:nth-child(3),
    .form-particle:nth-child(6) {
        width: 3px !important;
        height: 3px !important;
    }
}

/* Optimización para dispositivos con movimiento reducido */
@media (prefers-reduced-motion: reduce) {

    .form-particles,
    .form-particle {
        display: none !important;
    }
    
    .location-form-wrapper:hover {
        transform: none !important;
    }

    * {
        animation: none !important;
        transition: none !important;
    }
}

/* Optimized Lazy Loading for LCP and CLS */
.lazy-load {
    opacity: 0;
    transition: opacity 0.2s ease; /* Faster transition for better LCP */
    background: #f8f9fa;
    /* CLS Prevention */
    width: 100%;
    height: auto;
    contain: layout style; /* Performance optimization */
}

.lazy-load.loaded {
    opacity: 1;
    background: none;
}

/* Immediate visibility for above-the-fold images */
.lazy-load.loading {
    opacity: 0.8; /* Show loading state faster */
}

.lazy-video {
    background: #f8f9fa;
    border-radius: 16px;
    /* CLS Prevention: Ensure space is reserved */
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Performance optimization */
    content-visibility: auto;
    contain: layout style;
}

.lazy-video.loaded {
    background: none;
}

/* Mobile optimizations for vertical video */
@media (max-width: 768px) {
    .video-container {
        /* Adjust aspect ratio for mobile if needed */
        aspect-ratio: 9/16;
        max-width: 100%;
        margin: 0 auto 20px auto;
        contain-intrinsic-size: 100vw calc(100vw * 16/9); /* Dynamic based on viewport */
    }
}

@media (max-width: 480px) {
    .video-container {
        border-radius: 12px; /* Smaller radius on small screens */
        contain-intrinsic-size: 100vw calc(100vw * 16/9);
        margin: 0 auto 15px auto; /* Reduced margin for mobile */
    }
}

/* Additional CLS prevention for video loading states */
.video-container:not(.loaded) {
    background: #f8f9fa url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="500" height="889"%3E%3Crect width="100%25" height="100%25" fill="%23f8f9fa"/%3E%3Ccircle cx="250" cy="444.5" r="40" fill="%23dee2e6"/%3E%3Cpolygon points="235,424.5 235,464.5 270,444.5" fill="%23495057"/%3E%3C/svg%3E') no-repeat center center;
    background-size: contain;
}

/* Ensure video maintains aspect ratio during load */
.lazy-video[data-src] {
    min-height: 200px; /* Fallback minimum height */
    background: #f8f9fa;
}

/* Performance optimization for video interactions */
.video-container video:hover,
.video-container video:focus {
    will-change: transform, opacity;
}

.video-container video:not(:hover):not(:focus):not(:active) {
    will-change: auto;
}

/* Prevent video from causing horizontal scroll on very small screens */
@media (max-width: 320px) {
    .video-container {
        max-width: calc(100vw - 20px);
        margin: 0 10px 15px 10px;
    }
}

.form-title {
    text-align: center;
    margin-bottom: 12px;
    /* Reducido de 14px */
}



.form-title h2 {
    color: #2c2c2c;
    font-size: 20px;
    /* Reducido de 22px */
    font-weight: 700;
    margin: 0;
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.9), 
                 0 0 10px rgba(242, 92, 92, 0.1);
}

/* H1 responsivo que se ajusta al ancho de pantalla */
.form-title h1 {
    font-size: clamp(8px, 3.5vw, 14px);
    line-height: 1.1;
    white-space: nowrap;
    width: 100%;
    text-align: center;
}

/* Títulos más pequeños en móvil */
@media (max-width: 768px) {
    .form-title h1 {
        font-size: clamp(4px, 3vw, 11px);
    }

    .form-title h2 {
        font-size: 18px;
    }

    .form-title {
        margin-bottom: 10px;
    }
}

/* Para pantallas muy pequeñas */
@media (max-width: 480px) {
    .form-title h1 {
        font-size: clamp(6px, 2.8vw, 10px);
    }
}

/* Para pantallas muy anchas, usar tamaño específico */
@media (max-width: 360px) {
    .form-title h1 {
        font-size: clamp(7px, 2.5vw, 10px);
    }
}

/* Para pantallas extremadamente pequeñas */
@media (max-width: 320px) {
    .form-title h1 {
        font-size: clamp(8px, 2.2vw, 10px);
    }
}

/* Form Grid Moderno */
.modern-form-grid {
    display: grid;
    grid-template-columns: 130px 1fr 1fr 110px 70px;
    gap: 14px;
    align-items: center;
    position: relative;
    z-index: 10001;
}

.modern-form-grid .form-group,
.modern-form-grid .btn-modern,
.modern-form-grid a.btn-modern {
    height: 44px;
    display: flex;
    align-items: center;
    margin: 0;
}

.modern-form-grid .form-group:first-child {
    min-width: 120px;
    max-width: 160px;
    width: 100%;
}

#pais-dropdown {
    min-width: 0;
    max-width: 130px;
    width: 130px;
}

.btn-modern {
    height: 44px;
    padding-top: 0;
    padding-bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    box-sizing: border-box;
    line-height: normal;
}

/* Grid responsivo para móvil */
@media (max-width: 768px) {
    .modern-form-grid {
        grid-template-columns: 1fr;
    }

    #pais-dropdown {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }

    .modern-form-grid .form-group:first-child {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }

    .btn-secondary-modern {
        width: 54px;
        height: 32px;
        font-size: 12px;
        padding: 0 6px;
        margin-left: 0;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .modern-form-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
}

/* Dropdown improvements */
.dropdown-search {
    position: relative;
    width: 100%;
    font-family: 'Raleway', sans-serif;
    z-index: 10000;
}

.dd-selected {
    padding: 10px 14px;
    /* Reducido de 12px 16px */
    border: 2px solid rgba(242, 92, 92, 0.15);
    border-radius: 12px;
    cursor: pointer;
    background: linear-gradient(135deg, 
        rgba(255, 250, 252, 0.9) 0%, 
        rgba(254, 245, 248, 0.95) 100%);
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 44px;
    /* Reducido de 48px */
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(242, 92, 92, 0.08);
}

.dd-selected::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(242, 92, 92, 0.1), transparent);
    transition: left 0.5s ease;
}

.dd-selected:hover::before {
    left: 100%;
}

.dd-selected.placeholder {
    color: #999;
    font-weight: 400;
    font-style: italic;
}

.dd-selected:not(.placeholder) {
    color: #333;
    font-weight: 500;
}

.dd-selected:hover {
    border-color: rgba(242, 92, 92, 0.4);
    box-shadow: 0 4px 15px rgba(242, 92, 92, 0.2), 
                0 0 0 3px rgba(242, 92, 92, 0.1);
    background: linear-gradient(135deg, 
        rgba(255, 245, 250, 0.95) 0%, 
        rgba(254, 240, 245, 1) 100%);
    transform: translateY(-1px);
}

.dd-arrow {
    transition: transform 0.3s ease;
    color: #888;
    font-size: 14px;
}

.dropdown-search.active .dd-selected {
    border-color: #f25c5c;
    box-shadow: 0 0 0 3px rgba(242, 92, 92, 0.1);
}

.dropdown-search.active .dd-arrow {
    transform: rotate(180deg);
}

.dropdown-search.active {
    z-index: 99999 !important;
}

.dropdown-search.active .dd-list {
    z-index: 99999 !important;
}

/* Modern Buttons */
.btn-modern {
    padding: 10px 20px;
    /* Reducido de 12px 24px */
    border-radius: 12px;
    font-weight: 600;
    text-transform: none;
    border: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 44px;
    /* Reducido de 48px */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    user-select: none;
}

.btn-primary-modern {
    background: linear-gradient(135deg, #f25c5c 0%, #e04848 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(242, 92, 92, 0.3), 
                0 2px 8px rgba(242, 92, 92, 0.2);
    animation: pulseButton 2s infinite;
    border: 1px solid rgba(224, 72, 72, 0.3);
}

.btn-primary-modern:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 8px 25px rgba(242, 92, 92, 0.4),
                0 4px 15px rgba(242, 92, 92, 0.3);
    animation: none;
    background: linear-gradient(135deg, #e04848 0%, #d43e3e 100%);
}

.btn-primary-modern:active {
    transform: translateY(-1px) scale(0.99);
    transition: all 0.1s ease;
}

/* Animación de pulso sutil para el botón principal (optimizada) */
@keyframes pulseButton {

    0%,
    100% {
        box-shadow: 0 4px 16px rgba(242, 92, 92, 0.3), 0 0 0 0 rgba(242, 92, 92, 0.7);
    }

    50% {
        box-shadow: 0 4px 16px rgba(242, 92, 92, 0.3), 0 0 0 6px rgba(242, 92, 92, 0);
    }
}

/* Efecto de onda al hacer clic */
.btn-modern::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
    pointer-events: none;
}

.btn-modern.clicked::before {
    width: 300px;
    height: 300px;
}

/* Animación de carga */
.btn-modern.loading {
    pointer-events: none;
    position: relative;
}

/* Regla de loading movida a la sección de efectos mejorados (línea 2134) para evitar duplicación */

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

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

.btn-modern.loading span {
    opacity: 0;
}

.btn-secondary-modern {
    padding: 0 10px;
    min-width: 0;
    width: 70px;
    height: 36px;
    border-radius: 12px;
    border: 2px solid #f25c5c;
    background: #fff;
    color: #f25c5c;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    transition: background 0.2s, color 0.2s;
    margin-left: 6px;
}

.btn-secondary-modern:hover {
    background: #f25c5c;
    color: #fff;
}

/* Todas las Ciudades Section - Diseño Ultra Compacto */
.todas-ciudades-section {
    padding: 24px 16px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
    border-top: 1px solid #e9ecef;
}

.todas-ciudades-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%23f25c5c" fill-opacity="0.02"><circle cx="30" cy="30" r="2"/></g></svg>') repeat;
    pointer-events: none;
}

.ciudades-compact-header {
    text-align: center;
    margin-bottom: 16px;
    position: relative;
    z-index: 2;
}

.ciudades-compact-header h2 {
    color: #333;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
    position: relative;
}

.ciudades-compact-header h2::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: linear-gradient(135deg, #f25c5c 0%, #e04848 100%);
    border-radius: 1px;
}

.ciudades-compact-header p {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    max-width: 500px;
    margin: 0 auto;
}

.ciudades-por-estado-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.estado-grupo {
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    padding: 12px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.estado-grupo:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.estado-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}

.estado-icono {
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #f25c5c 0%, #e04848 100%);
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(242, 92, 92, 0.2);
}

.estado-nombre {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0;
    flex: 1;
}

.estado-contador {
    background: #f8f9fa;
    color: #666;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid #e9ecef;
}

.ciudades-grupo {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ciudad-compact-link {
    background: white;
    padding: 4px 12px;
    border-radius: 16px;
    text-decoration: none;
    color: #555;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid #e0e0e0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    display: inline-block;
}

.ciudad-compact-link:hover {
    background: linear-gradient(135deg, #f25c5c 0%, #e04848 100%);
    color: white;
    border-color: #f25c5c;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(242, 92, 92, 0.25);
    text-decoration: none;
}

.ciudades-compact-footer {
    text-align: center;
    margin-top: 16px;
    position: relative;
    z-index: 2;
}

.ciudades-compact-footer p {
    color: #666;
    font-size: 12px;
    max-width: 400px;
    margin: 0 auto;
    padding: 10px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

/* Responsive Design para Ciudades por Estado */
@media (max-width: 768px) {
    .todas-ciudades-section {
        padding: 16px 16px;
    }

    .ciudades-compact-header h2 {
        font-size: 20px;
    }

    .ciudades-compact-header p {
        font-size: 13px;
    }

    .estado-grupo {
        margin-bottom: 10px;
        padding: 10px;
    }

    .estado-header {
        gap: 6px;
        margin-bottom: 8px;
    }

    .estado-icono {
        width: 28px;
        height: 28px;
        font-size: 16px;
    }

    .estado-nombre {
        font-size: 15px;
    }

    .estado-contador {
        padding: 2px 6px;
        font-size: 10px;
    }

    .ciudades-grupo {
        gap: 4px;
    }

    .ciudad-compact-link {
        padding: 3px 8px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .estado-grupo {
        margin-bottom: 8px;
        padding: 8px;
    }

    .estado-header {
        gap: 6px;
        margin-bottom: 6px;
        flex-wrap: wrap;
    }

    .estado-icono {
        width: 24px;
        height: 24px;
        font-size: 14px;
    }

    .estado-nombre {
        font-size: 14px;
        flex: none;
        width: 100%;
        order: 2;
    }

    .estado-contador {
        order: 1;
        margin-left: auto;
        padding: 1px 4px;
        font-size: 9px;
    }

    .ciudades-grupo {
        gap: 3px;
    }

    .ciudad-compact-link {
        padding: 2px 6px;
        font-size: 11px;
    }

    .ciudades-compact-footer p {
        font-size: 11px;
        padding: 8px;
    }
}

/* Categories Section Optimizada */
.categories-section {
    padding: 40px 16px;
    /* Aumentado para dar espacio al título */
    background: linear-gradient(135deg, #fafafa 0%, #f5f7fa 100%);
    position: relative;
}

.categories-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%23f25c5c" fill-opacity="0.03"><circle cx="30" cy="30" r="1.5"/></g></svg>') repeat;
    pointer-events: none;
}

.categories-header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    z-index: 2;
}

.categories-header h2 {
    color: #333;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
    position: relative;
}

.categories-header h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(135deg, #f25c5c 0%, #e04848 100%);
    border-radius: 2px;
}

.categories-header p {
    color: #666;
    font-size: 16px;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto 16px;
}

.categories-cta {
    text-align: center;
    margin-top: 20px;
}

.categories-cta .btn-modern {
    background: linear-gradient(135deg, #f25c5c 0%, #e04848 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(242, 92, 92, 0.4);
    border: none;
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.categories-cta .btn-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.categories-cta .btn-modern:hover::before {
    left: 100%;
}

.categories-cta .btn-modern:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(242, 92, 92, 0.5);
}

@media (max-width: 768px) {
    .categories-section {
        padding: 30px 16px;
    }

    .categories-header h2 {
        font-size: 26px;
    }

    .categories-header p {
        font-size: 14px;
    }

    .categories-header {
        margin-bottom: 30px;
    }
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.category-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    background: white;
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.category-card:hover {
    transform: translateY(-12px) scale(1.03);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(242, 92, 92, 0.05) 0%, rgba(242, 92, 92, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.category-card:hover::before {
    opacity: 1;
}

.category-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.5s ease;
    position: relative;
    z-index: 1;
    /* CLS Prevention */
    background-color: #f8f9fa; /* Placeholder while loading */
    min-height: 220px; /* Ensure space is reserved */
    max-height: 220px; /* Prevent size changes */
}

.category-card:hover img {
    transform: scale(1.15);
}

.category-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.2) 50%, rgba(242, 92, 92, 0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.5s ease;
    z-index: 2;
}

.category-card:hover .category-overlay {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.1) 50%, rgba(242, 92, 92, 0.2) 100%);
}

.category-title {
    color: white;
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    text-shadow: 2px 2px 12px rgba(0, 0, 0, 0.6);
    transition: all 0.5s ease;
    position: relative;
    z-index: 3;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.category-card:hover .category-title {
    transform: scale(1.1) translateY(-4px);
    text-shadow: 2px 2px 16px rgba(0, 0, 0, 0.8);
    background: rgba(242, 92, 92, 0.8);
    box-shadow: 0 8px 24px rgba(242, 92, 92, 0.4);
}

/* Info Section Modernizada */
.info-section {
    padding: 60px 16px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    position: relative;
    text-align: center;
}

.info-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%23f25c5c" fill-opacity="0.02"><path d="M50 50l25-25v50z"/></g></svg>') repeat;
    pointer-events: none;
}

.info-content {
    max-width: 800px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.info-text {
    background: rgba(255, 255, 255, 0.9);
    padding: 40px;
    border-radius: 24px;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.info-text h2 {
    color: #333;
    font-size: 32px;
    margin-bottom: 28px;
    font-weight: 700;
    position: relative;
}

.info-text h2::before {
    content: '✨';
    margin-right: 8px;
}

.info-text h2::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(135deg, #f25c5c 0%, #e04848 100%);
    border-radius: 2px;
}

.info-text p {
    color: #666;
    line-height: 1.8;
    margin-bottom: 20px;
    font-size: 17px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 768px) {
    .info-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .info-text {
        padding: 25px;
    }

    .info-text h2 {
        font-size: 26px;
    }
}

.video-container {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    position: relative;
    /* CLS Optimization: Reserve space for vertical video */
    aspect-ratio: 9/16; /* Standard vertical video ratio */
    max-width: 500px;
    margin: 0 auto;
    /* Performance optimizations */
    contain: layout style paint;
    content-visibility: auto;
    contain-intrinsic-size: 500px 889px; /* 500px * 16/9 = 889px aprox */
}

.video-container video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover; /* Ensures video covers the container properly */
    object-position: center;
    /* Performance optimizations for video */
    will-change: auto; /* Only use will-change when playing */
    background-color: #f8f9fa; /* Fallback background */
}

/* Overlay rosa eliminado para mejor experiencia de video */
.video-container::before {
    display: none; /* Eliminamos el overlay rosa completamente */
}

/* Estilos para video con autoplay */
.auto-play-video {
    cursor: pointer;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Estado de carga del video */
.auto-play-video:not(.loaded) {
    opacity: 0.8;
}

.auto-play-video.loaded {
    opacity: 1;
}

/* Estado cuando el video está reproduciéndose */
.auto-play-video.playing {
    transform: scale(1.01);
}

/* Smooth hover effect */
.video-container:hover .auto-play-video {
    transform: scale(1.02);
}

/* Mobile optimizations for autoplay */
@media (max-width: 768px) {
    .auto-play-video.playing {
        transform: scale(1); /* No scaling on mobile for better performance */
    }
    
    .video-container:hover .auto-play-video {
        transform: scale(1); /* No hover scaling on mobile */
    }
}

/* About Section Mejorada */
.about-section {
    padding: 70px 16px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    text-align: center;
    position: relative;
}

.about-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="80" height="80" viewBox="0 0 80 80" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%23f25c5c" fill-opacity="0.02"><polygon points="40 0 80 40 40 80 0 40"/></g></svg>') repeat;
    pointer-events: none;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.9);
    padding: 40px;
    border-radius: 24px;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 2;
}

.about-logo {
    width: 100px;
    height: 100px;
    margin: 0 auto 30px;
    border-radius: 20px;
    box-shadow: 0 12px 32px rgba(242, 92, 92, 0.3);
    transition: transform 0.3s ease;
}

.about-logo:hover {
    transform: scale(1.1) rotate(5deg);
}

.about-content h2 {
    color: #333;
    font-size: 32px;
    margin-bottom: 28px;
    font-weight: 700;
    position: relative;
}

.about-content h2::before {
    content: '🌺';
    margin-right: 8px;
}

.about-content h2::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(135deg, #f25c5c 0%, #e04848 100%);
    border-radius: 2px;
}

.about-content p {
    color: #666;
    line-height: 1.8;
    font-size: 17px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .about-content {
        padding: 25px;
    }

    .about-content h2 {
        font-size: 26px;
    }

    .about-logo {
        width: 80px;
        height: 80px;
    }
}

/* FAQ Section Modernizada */
.faq-section {
    padding: 70px 16px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    position: relative;
}

.faq-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="120" height="120" viewBox="0 0 120 120" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%23f25c5c" fill-opacity="0.02"><circle cx="60" cy="60" r="30"/></g></svg>') repeat;
    pointer-events: none;
}

.faq-content {
    max-width: 900px;
    margin: 0 auto;
}

.faq-header {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
    align-items: center;
    margin-bottom: 40px;
}

.faq-header h2 {
    color: #333;
    font-size: 28px;
    font-weight: 700;
    margin: 0;
}

.faq-item {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    margin-bottom: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.faq-question {
    padding: 20px 24px;
    cursor: pointer;
    font-weight: 600;
    color: #333;
    font-size: 16px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.faq-question:hover {
    background: #f0f0f0;
}

.faq-answer {
    padding: 20px 24px;
    color: #666;
    line-height: 1.7;
    display: none;
}

.faq-answer.show {
    display: block;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        border-radius: 0;
    }

    .location-form-section {
        margin-top: -120px;
        /* Subir más el formulario en mobile */
        padding: 16px;
    }

    .location-form-wrapper {
        margin: 0 12px;
        padding: 18px 20px;
        border-radius: 16px;
    }

    .form-title {
        margin-bottom: 10px;
    }

    .form-title h1 {
        margin-bottom: 2px;
    }

    .form-title h2 {
        font-size: 18px;
    }

    .modern-form-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .dd-selected {
        padding: 12px 16px;
        min-height: 48px;
        font-size: 14px;
    }

    .dd-selected:not(.placeholder) {
        color: #333 !important;
        font-weight: 600 !important;
    }

    .dd-selected.selected {
        color: #333 !important;
        font-weight: 600 !important;
    }

    .btn-modern {
        min-height: 48px;
        padding: 12px 20px;
        font-size: 14px;
        width: 100%;
    }

    .categories-section {
        padding: 24px 12px;
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .category-card img {
        height: 120px;
    }

    .category-title {
        font-size: 14px;
    }

    .info-section {
        padding: 40px 16px;
    }

    .info-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .info-text h2 {
        font-size: 24px;
    }

    .about-content h2,
    .faq-header h2 {
        font-size: 24px;
    }

    .faq-header {
        grid-template-columns: 1fr;
        text-align: center;
    }

    /* Dropdown simplificado para móvil */
    .dd-list {
        max-height: 300px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .dd-options li {
        padding: 16px 20px;
        font-size: 16px;
        border-bottom: 1px solid #f0f0f0;
        min-height: 56px;
        display: flex;
        align-items: center;
        -webkit-tap-highlight-color: transparent;
    }

    .dd-options li:last-child {
        border-bottom: none;
    }

    .dd-options li:active {
        background-color: #f8f9fa;
    }
}

/* Dropdown List Styles */
.dd-list {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    border: 1px solid #e0e0e0;
    background: #fff;
    display: none;
    z-index: 99999 !important;
    max-height: 300px;
    overflow: auto;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

/* Override para asegurar que se muestren cuando tienen la clase show */
.dd-list.show {
    display: block !important;
}

.dd-list::-webkit-scrollbar {
    width: 8px;
}

.dd-list::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 4px;
}

.dd-list::-webkit-scrollbar-thumb {
    background-color: #aaa;
    border-radius: 4px;
    border: 1px solid #f0f0f0;
}

.dd-list::-webkit-scrollbar-thumb:hover {
    background-color: #888;
}

.dd-list {
    scrollbar-width: thin;
    scrollbar-color: #aaa #f0f0f0;
}

.dd-list .dd-search {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 16px;
    border: none;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    color: #555;
    transition: all 0.3s ease;
    outline: none;
}

.dd-list .dd-search:focus {
    border-bottom-color: #f25c5c;
    background-color: #fafafa;
}

.dd-list .dd-search::placeholder {
    color: #999;
    font-style: italic;
}

.dd-options {
    list-style: none;
    margin: 0;
    padding: 8px 0;
}

.dd-options li {
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    color: #555;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.dd-options li:hover {
    background-color: #f8f9fa;
    color: #333;
}

.dd-options li:active {
    background-color: #e9ecef;
    color: #333;
}

.dd-options li.active {
    background-color: #f8f9fa;
    color: #333;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-size: 14px;
    font-weight: 600;
}

.form-group label .required {
    color: #f44336;
    margin-left: 3px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dd-list.show {
    display: block;
    animation: fadeIn 0.2s ease-out;
}

@keyframes shakeValidation {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-4px);
    }

    75% {
        transform: translateX(4px);
    }
}

.shake-validation {
    animation: shakeValidation 0.4s ease-in-out;
    border-color: #f44336 !important;
}

/* Animaciones de entrada para secciones */
.categories-section,
.info-section,
.about-section,
.faq-section {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.categories-section {
    animation-delay: 0.2s;
}

.info-section {
    animation-delay: 0.4s;
}

.about-section {
    animation-delay: 0.6s;
}

.faq-section {
    animation-delay: 0.8s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Optimización para reducir animaciones en dispositivos con preferencia por movimiento reducido */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .location-form-wrapper,
    .categories-section,
    .info-section,
    .about-section,
    .faq-section {
        opacity: 1;
        transform: none;
        animation: none;
    }

    /* Disable lazy loading animations for reduced motion */
    .lazy-load:not(.loaded) {
        animation: none;
        background: #f8f9fa;
        opacity: 1;
    }

    .lazy-load {
        transition: none;
        opacity: 1;
    }

    .lazy-load.loaded {
        opacity: 1;
        background: none;
    }
}

/* Estilos para dropdown posicionado arriba en móvil */
.dd-list.mobile-top {
    position: fixed !important;
    top: 10px !important;
    left: 10px !important;
    right: 10px !important;
    bottom: auto !important;
    max-height: 50vh !important;
    z-index: 99999 !important;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

/* Mejorar scroll en listas de opciones móvil */
@media (max-width: 768px) {
    .dd-options {
        overscroll-behavior: contain;
        /* Evita que el scroll se propague */
        -webkit-overflow-scrolling: touch;
        /* Scroll suave en iOS */
        scroll-behavior: smooth;
    }

    /* Cuando el body está bloqueado (dropdown abierto) */
    body.dropdown-open {
        overflow: hidden !important;
        position: fixed !important;
        width: 100% !important;
        height: 100% !important;
    }
}

.hero-section{width:100vw;height:auto;aspect-ratio:16/5;overflow:hidden;background:#f8f9fa;margin:10px 0 0 0;padding:0;transform:translateX(-50%) translateZ(0);min-height:240px;position:relative;left:50%;max-width:none;contain:layout style}
.hero-section img{width:100%;height:100%!important;object-fit:cover;display:block;contain:layout style}
@media(max-width:768px){.hero-section{aspect-ratio:1400/850;min-height:180px;margin:5px 0 0 0}.hero-section img{object-fit:contain!important;background:#f8f9fa}}

/* Desactivar interacción del enlace flotante en mobile (solo desktop clicable) */
@media (max-width: 768px) {
    .hero-desktop-link { pointer-events: none; }
}
.location-form-wrapper{background:rgba(255,255,255,0.6);backdrop-filter:blur(15px);-webkit-backdrop-filter:blur(15px);border:1px solid rgba(255,255,255,0.2);border-radius:20px;padding:20px;box-shadow:0 8px 32px rgba(31,38,135,0.37),inset 0 1px 0 rgba(255,255,255,0.4);max-width:900px;margin:0 auto;position:relative;transition:all 0.3s ease}
.modern-form-grid{display:grid;grid-template-columns:130px 1fr 1fr 110px 70px;gap:14px;align-items:center}
@media(max-width:768px){.modern-form-grid{grid-template-columns:1fr}}

/* ========================================
   ANIMACIONES DINÁMICAS Y EFECTOS VISUALES
   ======================================== */

/* Animaciones de entrada más llamativas */
@keyframes heroZoomIn {
    0% {
        opacity: 0;
        transform: translateX(-50%) scale(1.05);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) scale(1);
    }
}

@keyframes formFloatIn {
    0% {
        opacity: 0;
        transform: translateY(50px) scale(0.9) rotateX(15deg);
    }
    60% {
        transform: translateY(-10px) scale(1.02) rotateX(-5deg);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1) rotateX(0deg);
    }
}

@keyframes sectionSlideUp {
    0% {
        opacity: 0;
        transform: translateY(60px) rotateX(15deg);
        filter: blur(5px);
    }
    100% {
        opacity: 1;
        transform: translateY(0) rotateX(0deg);
        filter: blur(0px);
    }
}

@keyframes cardMagicAppear {
    0% {
        opacity: 0;
        transform: translateY(40px) scale(0.8) rotateZ(-5deg);
        filter: blur(8px);
    }
    50% {
        transform: translateY(-10px) scale(1.05) rotateZ(2deg);
        filter: blur(2px);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1) rotateZ(0deg);
        filter: blur(0px);
    }
}

/* Efectos de partículas animadas */
@keyframes floatingParticle {
    0%, 100% {
        transform: translateY(0px) rotateZ(0deg);
        opacity: 0.4;
    }
    25% {
        transform: translateY(-20px) rotateZ(90deg);
        opacity: 0.8;
    }
    50% {
        transform: translateY(-30px) rotateZ(180deg);
        opacity: 1;
    }
    75% {
        transform: translateY(-15px) rotateZ(270deg);
        opacity: 0.6;
    }
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* Efecto de brillo dinámico */
@keyframes shimmerWave {
    0% {
        transform: translateX(-100%) rotateZ(45deg);
    }
    100% {
        transform: translateX(200%) rotateZ(45deg);
    }
}

/* Animación de glow pulsante */
@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 10px rgba(242, 92, 92, 0.3),
                    0 0 20px rgba(242, 92, 92, 0.2),
                    0 0 30px rgba(242, 92, 92, 0.1);
    }
    50% {
        box-shadow: 0 0 20px rgba(242, 92, 92, 0.6),
                    0 0 40px rgba(242, 92, 92, 0.4),
                    0 0 60px rgba(242, 92, 92, 0.2);
    }
}

/* Efecto de morphing para botones */
@keyframes morphButton {
    0% {
        border-radius: 12px;
        transform: scale(1);
    }
    50% {
        border-radius: 25px;
        transform: scale(1.05);
    }
    100% {
        border-radius: 12px;
        transform: scale(1);
    }
}

/* Animación de respiración suave para cards */
@keyframes cardGentleBreath {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-2px) scale(1.01);
    }
}

/* Animación de brillo automático */
@keyframes autoShimmer {
    0%, 90%, 100% {
        left: -100%;
        opacity: 0;
    }
    5%, 15% {
        left: 100%;
        opacity: 1;
    }
}

/* ========================================
   APLICACIÓN DE ANIMACIONES A ELEMENTOS
   ======================================== */

/* Hero section con animación de zoom simplificada */
.hero-section {
    animation: heroZoomIn 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    transform: translateX(-50%); /* Fijo, sin parallax */
}

/* Formulario con animación flotante */
.location-form-wrapper {
    animation: formFloatIn 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.3s both;
    position: relative;
    overflow: visible !important;
}

/* Efecto de brillo en el formulario - Solo móvil */
@media (max-width: 768px) {
    .location-form-wrapper::after {
        content: '';
        position: absolute;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.3) 50%, transparent 70%);
        animation: shimmerWave 3s infinite;
        pointer-events: none;
        z-index: 1;
    }
}

/* Partículas flotantes para las secciones */
.categories-section::after,
.info-section::after,
.about-section::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background: radial-gradient(circle, rgba(242, 92, 92, 0.8) 0%, transparent 70%);
    border-radius: 50%;
    top: 20%;
    left: 10%;
    animation: floatingParticle 4s ease-in-out infinite;
    pointer-events: none;
}

.info-section::after {
    top: 30%;
    left: 80%;
    animation-delay: 1s;
    animation-duration: 5s;
}

.about-section::after {
    top: 60%;
    left: 15%;
    animation-delay: 2s;
    animation-duration: 3.5s;
}

/* Animaciones mejoradas para las cards de categorías */
.category-card {
    opacity: 0;
    position: relative;
    overflow: hidden;
    transform: translateY(30px) scale(0.95);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Animación al hacer scroll - activada por JavaScript */
.category-card.animate-in {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.category-card.animate-in:nth-child(1) { transition-delay: 0.1s; }
.category-card.animate-in:nth-child(2) { transition-delay: 0.2s; }
.category-card.animate-in:nth-child(3) { transition-delay: 0.3s; }
.category-card.animate-in:nth-child(4) { transition-delay: 0.4s; }
.category-card.animate-in:nth-child(5) { transition-delay: 0.5s; }
.category-card.animate-in:nth-child(6) { transition-delay: 0.6s; }

/* Shimmer effect disabled to prevent CLS */
.category-card::after {
    display: none; /* Disabled to prevent layout shifts */
}

/* Breathing animation disabled to prevent CLS */
.category-card.animate-in {
    /* animation: cardGentleBreath 4s ease-in-out infinite; */
    /* animation-delay: 1s; */
    /* Breathing animation disabled to prevent layout shifts */
}

/* Auto shimmer disabled to prevent CLS */
.category-card.animate-in::before {
    display: none; /* Disabled to prevent layout shifts */
}

/* Simplified hover effects to prevent CLS */
.category-card:hover {
    transform: translateY(-8px) scale(1.02); /* Reduced transformation */
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    /* Removed complex 3D transforms and breathing animation pause */
}

.category-card:hover::before {
    animation-play-state: paused; /* Pausa el shimmer automático */
}

.category-card:hover .category-title {
    transform: scale(1.15) translateY(-8px) rotateZ(-2deg);
    text-shadow: 3px 3px 20px rgba(0, 0, 0, 0.9);
    background: linear-gradient(135deg, rgba(242, 92, 92, 0.9), rgba(224, 72, 72, 0.9));
}

/* Efecto sutil al completar la animación de entrada */
.category-card.animate-in.loaded {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

/* Botones con animaciones mejoradas */
.btn-primary-modern {
    position: relative;
    overflow: hidden;
    animation: glowPulse 3s ease-in-out infinite;
}

.btn-primary-modern:hover {
    animation: morphButton 0.6s ease-in-out;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 40px rgba(242, 92, 92, 0.5),
                0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Efecto de ondas en botones */
.btn-primary-modern::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-primary-modern:active::before {
    width: 200px;
    height: 200px;
}

/* Animaciones para los iconos de estado */
.estado-icono {
    position: relative;
    animation: twinkle 2s ease-in-out infinite;
}

.estado-grupo:hover .estado-icono {
    animation: morphButton 0.5s ease-in-out;
    transform: scale(1.2) rotateZ(10deg);
}

/* Animaciones para los links de ciudades */
.ciudad-compact-link {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.ciudad-compact-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.ciudad-compact-link:hover::before {
    left: 100%;
}

.ciudad-compact-link:hover {
    transform: translateY(-4px) scale(1.05) rotateZ(2deg);
    box-shadow: 0 8px 25px rgba(242, 92, 92, 0.4);
}

/* Efecto de parallax ligero para el fondo (sin hero) */
.info-section,
.about-section {
    will-change: transform;
}

/* Animaciones de scroll suave */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.animate-on-scroll.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Efectos de loading mejorados */
.btn-modern.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite, glowPulse 2s ease-in-out infinite;
}

/* Animación de entrada para el logo */
.about-logo {
    animation: cardMagicAppear 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.5s both;
}

.about-logo:hover {
    animation: morphButton 0.8s ease-in-out;
    transform: scale(1.15) rotateZ(15deg);
    box-shadow: 0 15px 40px rgba(242, 92, 92, 0.4);
}

/* Efectos especiales para FAQ */
.faq-item {
    animation: cardMagicAppear 0.6s ease-out forwards;
    opacity: 0;
}

.faq-item:nth-child(1) { animation-delay: 0.1s; }
.faq-item:nth-child(2) { animation-delay: 0.2s; }
.faq-item:nth-child(3) { animation-delay: 0.3s; }
.faq-item:nth-child(4) { animation-delay: 0.4s; }

.faq-item:hover {
    transform: translateX(5px) scale(1.02);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

/* Animación especial para títulos */
.categories-header h2,
.info-text h2,
.about-content h2,
.faq-header h2 {
    position: relative;
    animation: sectionSlideUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Efecto shimmer en títulos - Solo móvil */
@media (max-width: 768px) {
    .categories-header h2::before,
    .info-text h2::before,
    .about-content h2::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(45deg, transparent 40%, rgba(242, 92, 92, 0.1) 50%, transparent 60%);
        animation: shimmerWave 4s infinite;
        pointer-events: none;
        z-index: -1;
    }
}

/* Optimización para dispositivos con movimiento reducido */
@media (prefers-reduced-motion: reduce) {
    .hero-section,
    .location-form-wrapper,
    .category-card,
    .btn-primary-modern,
    .about-logo,
    .faq-item,
    .categories-header h2,
    .info-text h2,
    .about-content h2,
    .animate-on-scroll {
        animation: none !important;
        opacity: 1 !important;
    }
    
    .hero-section {
        transform: translateX(-50%) !important; /* Mantener centrado sin parallax */
    }
    
    .location-form-wrapper,
    .category-card,
    .btn-primary-modern,
    .about-logo,
    .faq-item,
    .categories-header h2,
    .info-text h2,
    .about-content h2,
    .animate-on-scroll {
        transform: none !important;
    }
    
    .category-card:hover,
    .btn-primary-modern:hover,
    .about-logo:hover,
    .faq-item:hover,
    .ciudad-compact-link:hover {
        transform: none !important;
        animation: none !important;
    }
}

/* Efectos especiales para móvil (más sutiles) */
@media (max-width: 768px) {
    .category-card:hover {
        transform: translateY(-8px) scale(1.02);
    }
    
    .btn-primary-modern:hover {
        transform: translateY(-2px) scale(1.01);
    }
    
    .ciudad-compact-link:hover {
        transform: translateY(-2px) scale(1.02);
    }
    
    /* Animaciones más sutiles para cards en móvil */
    .category-card.animate-in {
        animation: none; /* Sin respiración en móvil */
    }
    
    .category-card.animate-in::before {
        animation-duration: 12s; /* Shimmer más lento */
        animation-delay: 4s; /* Delay mayor */
    }
    
    /* Transición más rápida en móvil */
    .category-card {
        transition-duration: 0.5s;
    }
    
    /* Reducir animaciones de partículas en móvil */
    .categories-section::after,
    .info-section::after,
    .about-section::after {
        display: none;
    }
}

/* ========================================
   MICRO-INTERACCIONES ADICIONALES
   ======================================== */

/* Efecto de respiración para elementos importantes */
@keyframes breathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.btn-primary-modern:not(:hover) {
    animation: breathe 4s ease-in-out infinite;
}

/* Efecto de ondas en el agua para el fondo */
@keyframes rippleWave {
    0% {
        transform: scale(1) rotate(0deg);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.5) rotate(180deg);
        opacity: 0.1;
    }
    100% {
        transform: scale(2) rotate(360deg);
        opacity: 0;
    }
}

/* Añadir pequeñas ondas decorativas - Solo móvil */
@media (max-width: 768px) {
    .location-form-wrapper::before {
        animation: rippleWave 6s ease-in-out infinite;
    }
}

/* Efecto de magnetismo en los dropdowns */
.dd-selected:hover {
    animation: breathe 1s ease-in-out 3;
}