:root {
    --primary: #d32f2f;
    --primary-dark: #b71c1c;
    --primary-light: #ffebee;
    --secondary: #ff6b6b;
    --accent: #ffa726;
    --success: #4caf50;
    --bg-main: #ffffff;
    --bg-secondary: #f5f7fa;
    --bg-card: #ffffff;
    --text: #2c3e50;
    --text-secondary: #546e7a;
    --text-muted: #78909c;
    --border: #e0e0e0;
    --shadow: rgba(0, 0, 0, 0.08);
    --shadow-hover: rgba(0, 0, 0, 0.12);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-main);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

.hero {
    position: relative;
    padding: 3rem 1.5rem 2.5rem;
    background: linear-gradient(135deg, #fff5f5 0%, #ffe0e0 100%);
    border-bottom: 4px solid var(--primary);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(211, 47, 47, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 107, 107, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    padding: 0 1rem;
}

h1 {
    font-size: clamp(1.75rem, 5vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeSlideDown 0.8s ease-out;
    line-height: 1.2;
}

.subtitle {
    font-size: clamp(1rem, 3vw, 1.2rem);
    color: var(--text-secondary);
    margin-bottom: 2rem;
    animation: fadeSlideDown 0.8s ease-out 0.2s both;
}

.alert-banner {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    padding: 1.25rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px var(--shadow);
    animation: fadeSlideDown 0.8s ease-out 0.4s both;
    color: white;
}

.alert-icon {
    font-size: 2rem;
    animation: pulse 2s ease-in-out infinite;
    flex-shrink: 0;
}

.alert-banner strong {
    color: white;
}

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

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
    padding: 0 1rem;
    animation: fadeIn 0.8s ease-out 0.6s both;
}

.stat-card {
    background: var(--bg-card);
    padding: 1.75rem 1.5rem;
    border-radius: 16px;
    border: 2px solid var(--border);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px var(--shadow);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px var(--shadow-hover);
    border-color: var(--primary);
}

.stat-card:hover::before {
    transform: scaleY(1);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.stat-value {
    font-size: clamp(2rem, 5vw, 2.5rem);
    font-weight: 800;
    color: var(--primary);
    font-family: 'JetBrains Mono', monospace;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-value.alert {
    color: var(--secondary);
}

.stat-rate {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.section {
    padding: 2.5rem 1rem;
    background: var(--bg-main);
}

.section:nth-child(even) {
    background: var(--bg-secondary);
}

h2 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--primary);
    position: relative;
    display: inline-block;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary) 0%, transparent 100%);
}

.search-box {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px solid var(--border);
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px var(--shadow);
}

.search-input {
    width: 100%;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-family: 'Outfit', sans-serif;
    transition: all 0.3s ease;
    background: var(--bg-main);
    color: var(--text);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.1);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.states-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.state-card {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px solid var(--border);
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 2px 8px var(--shadow);
}

.state-card:hover {
    border-color: var(--primary);
    box-shadow: 0 6px 16px var(--shadow-hover);
    transform: translateY(-2px);
}

.state-card.hidden {
    display: none;
}

.state-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    gap: 0.5rem;
}

.state-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
}

.state-cases {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    font-weight: 800;
    color: var(--primary);
    font-family: 'JetBrains Mono', monospace;
}

.state-rate {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.bar-container {
    background: var(--bg-secondary);
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 1rem;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 4px;
    transition: width 1s ease-out;
    animation: fillBar 1.5s ease-out;
}

@keyframes fillBar {
    from { width: 0; }
}

.filter-section {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px solid var(--border);
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px var(--shadow);
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--border);
    background: var(--bg-main);
    color: var(--text);
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    white-space: nowrap;
}

.filter-btn:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
}

.filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.chart-container {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 12px;
    border: 2px solid var(--border);
    margin: 2rem 0;
    box-shadow: 0 2px 8px var(--shadow);
    height: 420px;
    position: relative;
}

@media (max-width: 768px) {
    .chart-container {
        padding: 1rem 0.75rem;
        height: 300px;
    }
}

@media (max-width: 480px) {
    .chart-container {
        padding: 0.75rem 0.5rem;
        height: 260px;
    }
}

.info-box {
    background: #fff8e1;
    border-left: 4px solid var(--accent);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 2rem 0;
    box-shadow: 0 2px 8px var(--shadow);
}

.info-box h3 {
    color: var(--accent);
    margin-bottom: 0.75rem;
    font-size: 1.2rem;
}

.info-box ul {
    margin-left: 1.5rem;
    color: var(--text);
}

.info-box li {
    margin: 0.5rem 0;
}

.timeline {
    position: relative;
    padding-left: 2rem;
    margin: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    padding-bottom: 2rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2.4rem;
    top: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary);
    border: 3px solid var(--bg-main);
}

.timeline-date {
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-family: 'JetBrains Mono', monospace;
}

footer {
    background: var(--bg-secondary);
    padding: 2rem 1rem;
    text-align: center;
    border-top: 2px solid var(--border);
    margin-top: 4rem;
}

footer p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0.5rem 0;
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* RESPONSIVE MÓVIL */
@media (max-width: 768px) {
    .hero {
        padding: 2rem 1rem 1.5rem;
    }

    .alert-banner {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        padding: 0 0.5rem;
    }

    .stat-card {
        padding: 1.5rem 1rem;
    }

    .states-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .filter-buttons {
        flex-direction: column;
    }

    .filter-btn {
        width: 100%;
        justify-content: center;
    }

    .search-input {
        font-size: 16px; /* Evita zoom en iOS */
    }

    .section {
        padding: 2rem 0.5rem;
    }

    h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.5rem;
    }

    .stat-value {
        font-size: 1.75rem;
    }

    .state-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

.severity-high { border-left-color: var(--secondary) !important; }
.severity-medium { border-left-color: var(--accent) !important; }
.severity-low { border-left-color: var(--success) !important; }

/* Productos y Servicios */
.productos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.producto-card {
    background: var(--bg-dark);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
}

.producto-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(255, 107, 107, 0.2);
    border-color: var(--secondary);
}

.producto-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.producto-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.producto-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.75rem;
}

.producto-card p {
    font-size: 0.9rem;
    color: var(--text-dim);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.producto-precio {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 1rem;
    font-family: 'JetBrains Mono', monospace;
}

.producto-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
}

.producto-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(211, 47, 47, 0.4);
}

.servicios-banner {
    margin-top: 3rem;
}

.servicio-card {
    background: linear-gradient(135deg, rgba(211, 47, 47, 0.1) 0%, rgba(255, 107, 107, 0.1) 100%);
    padding: 2.5rem;
    border-radius: 12px;
    border: 2px solid var(--primary);
    text-align: center;
}

.servicio-card h3 {
    font-size: 1.5rem;
    color: var(--secondary);
    margin-bottom: 0.75rem;
}

.servicio-card p {
    color: var(--text-dim);
    margin-bottom: 1.5rem;
}

.servicio-btn {
    display: inline-block;
    padding: 1rem 2rem;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.servicio-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(211, 47, 47, 0.4);
}

@media (max-width: 768px) {
    .productos-grid {
        grid-template-columns: 1fr;
    }
}

/* Cuestionario Interactivo */
.cuestionario-box {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 3rem;
    border: 2px solid var(--border);
    position: relative;
    min-height: 400px;
}

.pregunta-card {
    display: none;
    animation: fadeSlideIn 0.5s ease-out;
}

.pregunta-card.active {
    display: block;
}

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

.pregunta-numero {
    font-size: 0.9rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    font-weight: 600;
}

.pregunta-titulo {
    font-size: 1.8rem;
    color: var(--text);
    margin-bottom: 2rem;
    font-weight: 700;
}

.opciones-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.opcion-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 2rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    font-family: 'Outfit', sans-serif;
    color: var(--text);
}

.opcion-btn:hover {
    background: rgba(211, 47, 47, 0.1);
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(211, 47, 47, 0.2);
}

.opcion-btn-small {
    padding: 1.5rem 1rem;
    flex-direction: row;
    justify-content: flex-start;
    text-align: left;
}

.opcion-icon {
    font-size: 3rem;
}

.opcion-btn-small .opcion-icon {
    font-size: 2rem;
}

.opcion-texto {
    font-size: 1.1rem;
    font-weight: 600;
}

.opcion-btn-small .opcion-texto {
    font-size: 1rem;
}

.resultado-container {
    text-align: center;
    padding: 2rem 0;
}

.resultado-si {
    background: linear-gradient(135deg, rgba(211, 47, 47, 0.2) 0%, rgba(255, 107, 107, 0.2) 100%);
    border: 2px solid var(--primary);
    border-radius: 16px;
    padding: 3rem;
    margin-bottom: 2rem;
}

.resultado-no {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.2) 0%, rgba(129, 199, 132, 0.2) 100%);
    border: 2px solid #4caf50;
    border-radius: 16px;
    padding: 3rem;
    margin-bottom: 2rem;
}

.resultado-precaucion {
    background: linear-gradient(135deg, rgba(255, 215, 61, 0.2) 0%, rgba(255, 193, 7, 0.2) 100%);
    border: 2px solid var(--accent);
    border-radius: 16px;
    padding: 3rem;
    margin-bottom: 2rem;
}

.resultado-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
}

.resultado-titulo {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.resultado-si .resultado-titulo {
    color: var(--primary);
}

.resultado-no .resultado-titulo {
    color: #4caf50;
}

.resultado-precaucion .resultado-titulo {
    color: var(--accent);
}

.resultado-descripcion {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text);
    margin-bottom: 2rem;
}

.resultado-acciones {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.resultado-accion {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid var(--primary);
}

.reiniciar-btn {
    background: var(--bg-dark);
    color: var(--text);
    border: 2px solid var(--border);
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Outfit', sans-serif;
    margin-top: 2rem;
}

.reiniciar-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .cuestionario-box {
        padding: 2rem 1rem;
    }

    .opciones-grid {
        grid-template-columns: 1fr;
    }

    .pregunta-titulo {
        font-size: 1.4rem;
    }

    .resultado-icon {
        font-size: 3.5rem;
    }

    .resultado-titulo {
        font-size: 1.5rem;
    }
}
