/* =========================================
   CALCULADORA STYLES (Matching Landing Page)
   ========================================= */

/* --- 1. Contenedor Principal --- */
.calculator-section {
    padding: 60px 0;
    background-color: var(--bg-light, #f4f7f6);
    min-height: 85vh;
}

.calculator-card {
    background: var(--white, #ffffff);
    padding: 30px;
    border-radius: var(--radius, 12px);
    box-shadow: var(--shadow-card, 0 10px 30px rgba(0,0,0,0.08));
    border: 1px solid #f0f0f0;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
  display: flex;
  flex-direction: column;
}

/* --- 2. Títulos y Textos --- */
.step-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary, #0056b3);
    text-align: center;
    margin-bottom: 10px;
}

.step-subtitle {
    text-align: center;
    color: var(--text-light, #5f6c7b);
    margin-bottom: 25px;
    font-size: 1rem;
}

/* --- 3. Inputs & Estilos de Landing Form --- */
.form-group {
    margin-bottom: 20px;
}

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

/* Container para Iconos */
.input-with-icon {
    position: relative;
    width: 100%;
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 1rem;
    z-index: 10;
}

/* Inputs Generales */
.calculator-section input, 
.calculator-section select {
    width: 100%;
    padding: 12px 15px; 
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: 'Lato', sans-serif;
    font-size: 1rem;
    height: auto;
    background-color: #fff;
    transition: all 0.3s ease;
}

/* Clase especial para inputs con iconos (padding a la izquierda) */
.calculator-section input.padded-left {
    padding-left: 45px; /* Espacio para el icono */
}

.calculator-section input:focus, 
.calculator-section select:focus {
    border-color: var(--primary, #0056b3);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.1);
}

/* Layout de Filas (Edad / Teléfono) */
.form-row {
    display: flex;
    gap: 15px;
}

.form-group.half {
    flex: 1; /* Ocupan 50% cada uno */
}

/* Input con Error */
.input-error {
    border-color: #dc3545 !important;
    background-color: #fff8f8 !important;
    animation: shake 0.4s ease;
}

.error-msg {
    display: none;
    color: #dc3545;
    font-size: 0.85rem;
    margin-top: 5px;
    font-weight: 600;
}

.hint {
    display: block;
    font-size: 0.8rem;
    color: #999;
    margin-top: 5px;
}

/* --- 4. Botones (+/-) Contador --- */
.counter-wrapper { display: flex; }
.counter-input {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}
.counter-input button {
    background: #f8f9fa;
    border: none;
    width: 45px;
    height: 48px;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--primary, #0056b3);
    transition: background 0.2s;
}
.counter-input button:hover { background: #e9ecef; }
.counter-input input {
    width: 60px;
    border: none;
    border-radius: 0;
    text-align: center;
    font-weight: bold;
    padding: 0;
    height: 48px;
    pointer-events: none;
}

/* --- 5. Botón de Acción --- */
.btn-primary.full-width {
    width: 100%;
    background: linear-gradient(135deg, var(--orange, #ff6f00), var(--orange-hover, #e65100));
    color: white;
    border: none;
    padding: 16px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    box-shadow: 0 4px 15px rgba(255, 111, 0, 0.3);
}
.btn-primary.full-width:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 111, 0, 0.4);
}

.btn-link-secondary {
    background: none;
    border: none;
    color: var(--text-light, #5f6c7b);
    text-decoration: underline;
    width: 100%;
    margin-top: 15px;
    cursor: pointer;
    font-size: 0.9rem;
}
.btn-link-secondary:hover { color: var(--primary, #0056b3); }

/* --- 6. Barra de Progreso --- */

.progress-fill {
    background: var(--primary, #0056b3);
    height: 100%;
    width: 33%;
    border-radius: 4px;
    transition: width 0.4s ease;
}


.progress-container {
    max-width: 450px;
    margin: 0 auto 40px auto;
    position: relative;
}

.progress-track {
    background: #e0e0e0;
    height: 4px;
    border-radius: 4px;
    position: absolute;
    top: 50%;                /* 🔑 centro exacto */
    left: 0;
    width: 100%;
    transform: translateY(-50%);
    z-index: 1;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;     /* 🔑 centra los círculos */
    position: relative;
    height: 35px;            /* igual al alto del círculo */
    z-index: 2;
}


/* Los círculos */
.step {
    position: relative;
    z-index: 2;
    width: 35px;
    height: 35px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 50%;
    display: flex; /* Flexbox para centrar el número adentro */
    align-items: center;
    justify-content: center;
    font-weight: 700;
    transition: all 0.3s;
}
.step.active {
    background: var(--primary, #0056b3);
    color: white;
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.15);
}

/* Asegura que el contenedor de los pasos esté alineado */
.progress-bar {
    display: flex;
    justify-content: space-between;
    align-items: center; /* Centra verticalmente los elementos hijos */
    position: relative;
    margin-bottom: 40px;
}

/* La línea de fondo debe estar exactamente a la mitad */
.progress-bar::before {
    content: '';
    position: absolute;
    top: 50%; /* La posiciona al 50% del alto */
    left: 0;
    transform: translateY(-50%); /* Ajuste fino para centrar perfecto */
    height: 2px;
    width: 100%;
    background: #e0e0e0;
    z-index: 1;
}

/* --- 7. Resultados --- */
.result-header {
    text-align: center;
    background: #e3f2fd;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 25px;
    border: 1px solid #bbdefb;
}
.big-number {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--primary, #0056b3);
    line-height: 1.1;
    margin: 10px 0;
}
.result-breakdown {
    background: #fff;
    border: 1px solid #eee;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
}
.breakdown-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
    font-size: 0.95rem;
}
.breakdown-row:last-child {
    border-bottom: none;
    font-weight: 700;
    color: var(--text-main, #2c3e50);
}

/* --- 8. Resumen Sticky --- */
.summary-pill { text-align: center; margin-bottom: 20px; }
.summary-pill span {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid #c8e6c9;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Mobile Fixes */
@media (max-width: 480px) {
    .calculator-card { padding: 20px; }
    .big-number { font-size: 2.2rem; }
    .form-row { flex-direction: column; gap: 0; }
}

/* --- Nueva Sección: Beneficios (Tarjetas) --- */
.benefits-section {
    padding: 80px 0;
    background: #fff;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.benefit-card {
    padding: 40px 30px;
    border-radius: 20px;
    background: #ffffff;
    border-bottom: 4px solid var(--primary, #0056b3);
    box-shadow: 0 15px 35px rgba(0,0,0,0.05);
    text-align: center;
    transition: transform 0.3s ease;
}

.benefit-card:hover { transform: translateY(-10px); }

.benefit-icon {
    font-size: 2.5rem;
    color: var(--orange, #ff6f00);
    margin-bottom: 20px;
}

/* --- Nueva Sección: Cómo funciona (Lista) --- */
.how-it-works-section {
    padding: 80px 0;
    background: #f8fafc; /* Fondo sutilmente distinto */
}

.explainer-list {
    max-width: 800px;
    margin: 40px auto 0;
}

.explainer-item {
    display: flex;
    align-items: flex-start;
    gap: 25px;
    padding: 30px;
    background: #fff;
    margin-bottom: 20px;
    border-radius: 15px;
    border-left: 5px solid #e0e0e0;
}

.explainer-num {
    background: var(--primary, #0056b3);
    color: #fff;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.explainer-content h3 {
    margin-bottom: 8px;
    color: var(--primary, #0056b3);
    font-size: 1.2rem;
}

.explainer-content p {
    color: #5f6c7b;
    line-height: 1.6;
    margin: 0;
}

/* Mobile */
@media (max-width: 600px) {
    .explainer-item { flex-direction: column; align-items: center; text-align: center; }
}

/* --- Calculadora dentro del hero --- */
.hero-calculator {
  max-width: 520px;        /* un poco más chico que el form del index */
  width: 100%;
}

.hero-calculator .calculator-card {
  margin: 0;
  box-shadow: none;       /* el wrapper ya tiene sombra */
  border: none;
  padding: 0;
}

/* Barra de progreso más compacta en hero */
.hero-calculator .progress-container {
  margin-bottom: 20px;
}

.hero-calculator .calculator-card {
  transition: min-height 0.25s ease;
}



/* --- Tooltip info ⓘ --- */
.info-tooltip {
  position: relative;
  display: inline-block;
  margin-left: 6px;
  font-size: 0.75rem;
  color: #2e7d32;
  cursor: help;
}

.info-tooltip .tooltip-content {
  position: absolute;
  bottom: 130%;
  left: 50%;
  transform: translateX(-50%);
  width: 240px;
  background-color: #1f2937; /* gris oscuro */
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.4;
  padding: 8px 10px;
  border-radius: 6px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 1000;
  text-align: center;
}

/* Flechita */
.info-tooltip .tooltip-content::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: #1f2937 transparent transparent transparent;
}

/* Hover */
.info-tooltip:hover .tooltip-content {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-4px);
}

#step-success {
  flex: 1;                   /* ocupa todo el alto disponible */
  display: flex;
  flex-direction: column;
  justify-content: center;   /* centrado vertical */
  align-items: center;       /* centrado horizontal */
  text-align: center;
}