/* ==========================================================================
   RESET & CONFIGURACIÓN BASE
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: #f8fafc;
    color: #1e293b;
    line-height: 1.6;
    padding: 3rem 1rem;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
}

/* ==========================================================================
   CABECERA
   ========================================================================== */
header {
    margin-bottom: 3rem;
    text-align: left;
    border-left: 4px solid #0d9488;
    padding-left: 1.25rem;
}

header h1 {
    font-size: 2rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.04em;
    margin-bottom: 0.35rem;
}

header p {
    color: #64748b;
    font-size: 1rem;
}

/* ==========================================================================
   GRID PRINCIPAL (Estructura de dos columnas)
   ========================================================================== */
.calculator-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .calculator-grid {
        grid-template-columns: 360px 1fr;
    }
}

/* ==========================================================================
   PANELES / TARJETAS
   ========================================================================== */
section {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.03), 0 2px 4px -2px rgba(0, 0, 0, 0.03);
}

section h2 {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #94a3b8;
    margin-bottom: 1.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #f1f5f9;
}

/* ==========================================================================
   FORMULARIOS E INPUTS
   ========================================================================== */
.input-group {
    margin-bottom: 1.25rem;
}

.input-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.5rem;
}

.input-group input, 
.input-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    color: #0f172a;
    background-color: #ffffff;
    font-weight: 500;
    transition: all 0.15s ease-in-out;
}

.input-group input:focus, 
.input-group select:focus {
    outline: none;
    border-color: #0d9488;
    box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.1);
}

.btn-calculate {
    width: 100%;
    background-color: #0f172a;
    color: #ffffff;
    border: none;
    padding: 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 1rem;
}

.btn-calculate:hover {
    background-color: #0d9488;
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.2);
}

/* ==========================================================================
   BLOQUES DE RESULTADOS (KPIs)
   ========================================================================== */
.kpi-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

@media (min-width: 640px) {
    .kpi-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.kpi-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.25rem;
    transition: transform 0.2s ease;
}

.kpi-card:hover {
    transform: translateY(-2px);
}

.kpi-card label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    margin-bottom: 0.35rem;
    letter-spacing: 0.02em;
}

.kpi-card .value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.kpi-card .value.teal {
    color: #0d9488;
    font-size: 1.5rem;
}

/* ==========================================================================
   GRÁFICO
   ========================================================================== */
.chart-container {
    position: relative;
    margin: auto;
    height: 340px;
    width: 100%;
}

/* ==========================================================================
   ESTILOS SECCIÓN TEXTO SEO
   ========================================================================== */
.seo-content {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid #e2e8f0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.seo-content h2 {
    font-size: 1.5rem;
    color: #0f172a;
    text-transform: none;
    letter-spacing: -0.02em;
    border-bottom: none;
    margin-bottom: 1rem;
    padding-bottom: 0;
}

.seo-content h3 {
    font-size: 1.15rem;
    color: #0f172a;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.seo-content p {
    color: #475569;
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
    text-align: justify;
}

.seo-content ul {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
    color: #475569;
    font-size: 0.95rem;
}

.seo-content li {
    margin-bottom: 0.75rem;
}

.seo-content strong {
    color: #0f172a;
}

.seo-content .formula {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 1.25rem;
    border-radius: 8px;
    text-align: center;
    font-size: 1.3rem;
    color: #0d9488;
    font-weight: 600;
    margin: 1.5rem 0;
    letter-spacing: 0.05em;
}

/* ==========================================================================
   PIE DE PÁGINA
   ========================================================================== */
footer {
    margin-top: 5rem;
    text-align: center;
    font-size: 0.8rem;
    color: #94a3b8;
    border-top: 1px solid #e2e8f0;
    padding-top: 1.5rem;
}

footer p {
    margin-bottom: 0.25rem;
}