:root {
    /* PALETA CORPORATIVA */
    --primary-dark: #1F3776;   /* Azul Marino */
    --primary-light: #64A6DC;  /* Azul Claro */
    --white: #ffffff;
    --gray-bg: #f0f4f8;
    --border-radius: 8px;
    --shadow: 0 8px 25px rgba(31, 55, 118, 0.15);
    --transition: all 0.3s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-display: swap;}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--gray-bg);
    color: var(--primary-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --- Header --- */
header {
    background-color: var(--white);
    padding: 1.2rem 5%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid var(--primary-dark);
}

.logo {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 1.6rem;
    color: var(--primary-dark);
    text-decoration: none;
    letter-spacing: -0.5px;
}
.logo span { color: var(--primary-light); }

/* --- Wrapper --- */
.cotizador-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    background: linear-gradient(145deg, var(--primary-dark) 0%, #152a55 100%);
}
.cotizador-wrapper section{
    max-width: 800px;
    margin: 40px auto;
    color: #cecece;
    font-size: 0.9rem;
    line-height: 1.6;
    text-align: center;
}

/* --- Tarjeta --- */
.cotizador-card {
    background: var(--white);
    width: 100%;
    max-width: 900px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.card-header {
    background-color: var(--white);
    padding: 30px 40px 10px;
    text-align: center;
    border-bottom: 1px solid #eee;
}
.card-header h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8rem;
    margin-bottom: 8px;
    color: var(--primary-dark);
}

.card-body { padding: 30px 40px; }

/* --- Pasos --- */
.steps-container {
    display: flex;
    justify-content: space-between;
    margin-bottom: 35px;
    position: relative;
    max-width: 80%;
    margin-left: auto;
    margin-right: auto;
}
.steps-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0; right: 0;
    height: 2px;
    background: #e0e0e0;
    z-index: 1;
    transform: translateY(-50%);
}
.step-indicator {
    position: relative;
    z-index: 2;
    background: var(--white);
    padding: 0 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #ccc;
    font-size: 0.8rem;
    font-weight: 600;
}
.step-circle {
    width: 40px; height: 40px;
    background: #f0f0f0;
    border: 2px solid #e0e0e0;
    border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    margin-bottom: 8px; color: #aaa;
    transition: var(--transition);
}
.step-indicator.active { color: var(--primary-dark); }
.step-indicator.active .step-circle {
    background: var(--white);
    border-color: var(--primary-light);
    color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(100, 166, 220, 0.1);
}

.step-content { display: none; animation: fadeIn 0.4s ease; }
.step-content.active { display: block; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Formulario --- */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 25px;
}
.full-width { grid-column: 1 / -1; }

.input-group { display: flex; flex-direction: column; gap: 8px; }
.input-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-dark);
}
.input-group select, .input-group input {
    padding: 14px 15px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}
.input-group select:focus, .input-group input:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(100, 166, 220, 0.2);
}

/* --- Botones --- */
.btn-container {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
}
.btn {
    padding: 14px 35px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
}
.btn-prev { background: transparent; border: 1px solid #cbd5e0; color: #666; }
.btn-prev:hover { background: #f8f9fa; }
.btn-next { background: var(--primary-light); color: var(--white); margin-left: auto; }
.btn-next:hover {
    background: #5394ca;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(100, 166, 220, 0.4);
}

/* --- Resultado --- */
.result-box {
    text-align: center;
    padding: 30px;
    background: linear-gradient(to bottom, #fbfdfe, #f0f7fc);
    border-radius: 8px;
    border: 1px solid #e1eaf2;
}
.price-display {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-light);
    margin: 10px 0 20px 0;
}
.detail-row {
    display: flex; justify-content: space-between;
    padding: 10px 0; border-bottom: 1px solid #e0e0e0;
    font-size: 0.95rem; color: #555;
}
.detail-row span:last-child { font-weight: 600; color: var(--primary-dark); }

/* --- MODAL GLOBAL (Reemplazo de Alert) --- */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(31, 55, 118, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease;
}
.modal-overlay.active { opacity: 1; pointer-events: all; }

.modal-content {
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    width: 90%; max-width: 450px;
    text-align: center;
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}
.modal-overlay.active .modal-content { transform: translateY(0); }

.modal-icon {
    font-size: 3rem; 
    margin-bottom: 20px;
}
/* Iconos de modal */
.modal-icon.error { color: #dc3545; }
.modal-icon.success { color: #28a745; }
.modal-icon.info { color: var(--primary-light); }

.modal-title { font-size: 1.5rem; color: var(--primary-dark); margin-bottom: 10px; }
.modal-text { color: #666; margin-bottom: 30px; line-height: 1.5; }
.btn-modal { width: 100%; background: var(--primary-dark); color: white; }
.btn-modal:hover { background: #162a5c; }

/* Responsive */
@media (max-width: 768px) {
    .form-grid { grid-template-columns: 1fr; }
    .cotizador-wrapper { padding: 0; }
    .cotizador-card { border-radius: 0; min-height: 100vh; }
    .steps-container { max-width: 100%; padding: 0 10px; }
    .step-indicator span { display: none; }
}

.hidden { display: none; }
footer { text-align: center; padding: 20px; font-size: 0.8rem; color: #8fa6b8; }