/* ================================================================
   ESTILOS GENERALES DE LA SECCIÓN (Protege el Header)
   ================================================================ */

#seccion-calculadora {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #e0e0e0;
}

#seccion-calculadora .calc-container-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    /* Espacio superior para no chocar con el header */
    padding: 120px 20px 80px 20px; 
    min-height: 100vh;
    box-sizing: border-box;
}

/* Tarjeta Principal */
#seccion-calculadora .calc-card {
    background-color: #1a1a1a !important;
    padding: 40px !important;
    border-radius: 12px !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8) !important;
    border-top: 5px solid #800000 !important;
    width: 100%;
    max-width: 450px;
    box-sizing: border-box;
}

#seccion-calculadora h2 {
    color: #ffffff;
    text-align: center;
    margin: 0 0 5px 0;
    font-size: 1.8rem;
}

#seccion-calculadora .subtitle-lidera {
    text-align: center; 
    color: #888; 
    font-size: 0.85rem; 
    margin-bottom: 25px;
}

/* NUEVO: Selectores de Tipo de Proceso (Gastos vs Emergencia) */
#seccion-calculadora .selector-servicio-wrapper {
    margin: 25px 0;
}

#seccion-calculadora .selector-botones {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

#seccion-calculadora .btn-tipo-servicio {
    flex: 1;
    background-color: #252525;
    border: 1px solid #333;
    color: #888;
    padding: 14px 5px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

#seccion-calculadora .btn-tipo-servicio:hover {
    border-color: #555;
    color: #bbb;
}

#seccion-calculadora .btn-tipo-servicio.active {
    background-color: #2a0000;
    border-color: #800000;
    color: #fff;
    box-shadow: 0 0 15px rgba(128, 0, 0, 0.2);
}

#seccion-calculadora #titulo-dinamico {
    color: #800000 !important;
    font-weight: 600;
    text-align: center;
    font-size: 0.9rem;
    letter-spacing: 1px;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
    margin: 25px 0 !important;
    text-transform: uppercase;
}

/* ================================================================
   FORMULARIOS (Inputs, Selects, Radios)
   ================================================================ */

#seccion-calculadora .input-group {
    margin-bottom: 20px;
    transition: opacity 0.3s ease;
}

#seccion-calculadora label {
    color: #bbb;
    font-size: 0.85rem;
    display: block;
    margin-bottom: 8px;
}

#seccion-calculadora input, 
#seccion-calculadora select {
    width: 100%;
    background-color: #252525;
    border: 1px solid #333;
    color: #fff;
    border-radius: 6px;
    padding: 12px;
    box-sizing: border-box;
    font-size: 1rem;
    transition: border-color 0.3s;
}

#seccion-calculadora input:focus,
#seccion-calculadora select:focus {
    border-color: #800000;
    outline: none;
}

/* Estilos para Radio Buttons */
#seccion-calculadora .formacion-titulo {
    text-align: center;
    color: #888;
    font-size: 0.85rem;
    margin-bottom: 12px;
}

#seccion-calculadora .radio-group {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-bottom: 20px;
}

#seccion-calculadora .radio-item {
    font-size: 0.9rem;
    color: #ccc;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

#seccion-calculadora .radio-item input[type="radio"] {
    width: auto;
    margin: 0;
    accent-color: #800000;
}

/* Botón de Calcular */
#seccion-calculadora .btn-calculate {
    background-color: #800000;
    color: #fff;
    border: none;
    padding: 16px;
    width: 100%;
    border-radius: 6px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s, transform 0.1s;
    margin-top: 10px;
}

#seccion-calculadora .btn-calculate:hover {
    background-color: #a30000;
}

#seccion-calculadora .btn-calculate:active {
    transform: scale(0.98);
}

/* ================================================================
   MODAL DE RESULTADOS (Sincronizado con JS)
   ================================================================ */

.calc-modal-overlay {
    display: none; /* Oculto por defecto */
    position: fixed; 
    top: 0; left: 0; 
    width: 100%; height: 100%; 
    background: rgba(0, 0, 0, 0.92); 
    justify-content: center; 
    align-items: center; 
    z-index: 1000000 !important; /* Por encima de todo incluyendo header */
}

/* Clase que activa el JS */
.calc-modal-active { 
    display: flex !important; 
}

.calc-modal-box {
    background: #111;
    padding: 30px;
    border-radius: 15px;
    max-width: 420px;
    width: 90%;
    border-top: 6px solid #800000;
    box-shadow: 0 15px 50px rgba(0,0,0,0.7);
    color: #fff;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.calc-modal-box h2 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.calc-res-inner {
    background: #1a1a1a;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #333;
}

.calc-res-row { 
    display: flex; 
    justify-content: space-between; 
    padding: 12px 0;
    border-bottom: 1px solid #252525;
}

.calc-res-label { font-size: 0.85rem; color: #888; }
.calc-res-value { font-size: 1rem; color: #fff; font-weight: 500; }

#res-servicio {
    color: #800000;
    font-weight: bold;
    text-align: center;
    text-transform: uppercase;
    font-size: 0.8rem;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

/* Contenedor del Total Final */
.calc-total-box {
    text-align: center;
    margin-top: 20px;
    padding-top: 10px;
}

.calc-total-box p {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 5px;
}

.calc-total-box h1 {
    font-size: 2.4rem;
    color: #ffffff;
    margin: 0;
}

/* Botón de Cerrar Modal */
.calc-btn-close {
    background: #800000;
    color: white;
    border: none;
    padding: 14px;
    width: 100%;
    border-radius: 6px;
    margin-top: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.calc-btn-close:hover {
    background: #a30000;
}