/* ==========================================================================
   CHIP SOLUTIONS - COTIZADOR INTERACTIVO FIBRA ÓPTICA
   HOJA DE ESTILOS CORE: SEMI-FLAT / FLUENT UI DESIGN (MÁXIMA COMPACTACIÓN)
   ========================================================================== */

/* --- RESETEO GENERAL Y TIPOGRAFÍA --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: #f3f4f6;
    color: #1e293b;
    text-align: center;
    overflow-x: hidden;
}

/* --- CLASE DE ACCESIBILIDAD PARA LECTORES DE PANTALLA --- */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* --- ENCABEZADO ULTRA-COMPACTO CORPORATIVO --- */
.header {
    background: linear-gradient(135deg, #001f3f, #0041c2); /* Gradiente Institucional */
    color: #ffffff;
    padding: 8px 20px; /* Reducido para adelgazar la barra azul */
    position: relative;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.btn-inicio {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-inicio:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-52%) scale(1.03);
}

.logo-chip-container {
    width: 70px;
    height: 70px;
    margin: 0 auto 0px auto; /* Eliminada separación inferior con el título */
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-chip-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.header h1 {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin: 0; /* Cancelados márgenes por defecto del navegador */
}

.header p {
    font-size: 12px;
    font-style: italic;
    opacity: 0.85;
    margin: 0;
    margin-top: 2px; /* Espaciado milimétrico con el título h1 */
}

/* --- CUERPO GENERAL COMPACTO --- */
.main-container {
    max-width: 900px;
    margin: 5px auto 25px auto; /* Reducido espacio superior con el encabezado */
    padding: 0 15px;
}

.main-title {
    font-size: 26px;
    color: #0041c2; /* Azul Rey */
    margin-top: 0; /* Cancelado margen residual */
    margin-bottom: 4px;
    font-weight: 700;
}

.main-subtitle {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 5px; /* Reducida separación con el logo Infinitum */
    line-height: 1.5;
}

.logo-infinitum {
    width: 189px;
    height: auto;
    margin: 0 auto 5px auto; /* Pegado seguro al subtítulo y wizard */
    display: block;
}

/* --- CONTENEDOR DEL WIZARD (FLUENT UI) --- */
.wizard-container {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    border: 1px solid #e2e8f0;
    padding-bottom: 10px; /* Ajuste para unificar base con barra de controles */
}

/* Barra de Estado Superior (Etiqueta Blanca Informativa) */
.status-bar {
    background-color: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 12px;
    font-size: 11px;
    color: #475569;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.status-item {
    background-color: #f8fafc;
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
    font-weight: 500;
}

.status-item span {
    font-weight: 700;
    color: #0041c2;
}

/* Barra de progreso de avance */
.progress-container {
    background-color: #f1f5f9;
    height: 5px;
    width: 100%;
}

.progress-bar {
    background-color: #22c55e; /* Verde Esmeralda */
    height: 100%;
    width: 7.69%;
    transition: width 0.3s ease;
}

/* Paneles de Pasos Compresos */
.step-panel {
    padding: 10px 25px 20px 25px; /* Reducido relleno superior para pegar a la barra de progreso */
    display: none;
}

.step-panel.active {
    display: block;
}

.step-number {
    font-size: 13px;
    color: #94a3b8;
    text-transform: uppercase;
    font-weight: 700;
    margin-top: 0px; /* Fuerza pegado superior */
    margin-bottom: 2px; /* Acerca el texto al título de la pregunta */
    letter-spacing: 1px;
}
.step-question {
    font-size: 22px;
    color: #0f172a;
    font-weight: 700;
    margin-bottom: 8px; /* Reducida drásticamente para compactar */
}

.step-text-muted {
    color: #64748b;
    margin-bottom: 12px; /* Acerca las descripciones a los botones de opción */
    font-size: 15px;
}

/* --- BOTONES DE OPCIÓN E INTERACTIVIDAD PREMIUM --- */
.options-group {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.group-margin-top {
    margin-top: 25px;
}

.center-layout-group {
    justify-content: center;
    margin-top: 25px;
}

.final-row-gap {
    gap: 15px;
}

.popup-buttons-row {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.btn-option {
    background-color: #ffffff;
    border: 2px solid #0041c2;
    color: #0041c2;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    min-width: 150px;
    transition: all 0.2s ease;
}

.btn-option:hover {
    background-color: #0041c2;
    color: #ffffff;
    transform: translateY(-2px); /* Elevación física tridimensional */
    box-shadow: 0 4px 12px rgba(0, 65, 194, 0.15); /* Sombras blandas */
}

.btn-green {
    border-color: #22c55e !important;
    color: #22c55e !important;
}

.btn-green:hover {
    background-color: #22c55e !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.2) !important;
}

.btn-blue-action {
    background-color: #0041c2 !important;
    color: #ffffff !important;
}

.btn-blue-action:hover {
    background-color: #002d8c !important;
    box-shadow: 0 4px 12px rgba(0, 65, 194, 0.25) !important;
}

/* Botones de acción principales */
.btn-action-primary {
    background-color: #0041c2;
    color: #ffffff;
    border: none;
    padding: 12px 35px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    display: inline-block;
    margin: 5px auto; /* Reducida de 15px a 5px arriba y abajo */
    transition: all 0.2s ease;
}

.btn-action-primary:hover {
    background-color: #002d8c;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 65, 194, 0.25);
}

.btn-action-green {
    background-color: #22c55e !important;
}

.btn-action-green:hover {
    background-color: #16a34a !important;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.25) !important;
}

.btn-facebook-color {
    background-color: #3b5998 !important;
    color: #ffffff !important;
}

.btn-facebook-color:hover {
    background-color: #2d4373 !important;
    box-shadow: 0 4px 12px rgba(59, 89, 152, 0.25) !important;
}

.btn-muted-grey {
    background-color: #64748b !important;
    color: #ffffff !important;
}

.btn-muted-grey:hover {
    background-color: #475569 !important;
    box-shadow: 0 4px 12px rgba(100, 116, 139, 0.25) !important;
}

.custom-margin-top {
    margin-top: 10px;
}

.no-margin {
    margin: 0 !important;
}

.vertical-actions-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0px;
    margin-top: 0px;
}

/* --- PASO 6: TARJETA INFORMATIVA FLUENT UI COMPACTA --- */
.fluent-card {
    background-color: #ffffff;
    border: 1px solid #a7f3d0; /* Verde esmeralda pastel */
    border-radius: 12px;
    padding: 15px 20px; /* Reducido de 30px a 15px arriba y abajo */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
    max-width: 600px;
    margin: 0 auto 0px auto; /* Reducida separación inferior */
    text-align: center;
}

.fluent-card h3 {
    color: #0b8a5a; /* Verde esmeralda */
    font-size: 20px;
    margin-top: 0px; /* Cancelado margen nativo del h3 */
    margin-bottom: 5px;
    font-weight: 700;
}

.fluent-card-instruction {
    font-size: 13px;
    color: #475569;
    margin-bottom: 5px; /* Acerca el texto explicativo a la barra del slider */
    line-height: 1.4;
}

.slider-container {
    margin: 5px 0; /* Comprimida la separación superior e inferior */
}

.range-slider {
    width: 100%;
    max-width: 400px;
    height: 6px;
    accent-color: #0041c2;
    cursor: pointer;
}

.slider-value {
    font-size: 18px;
    font-weight: 700;
    color: #0041c2;
    margin-top: 0px;
}

.icon-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 0px;
    border-top: 1px solid #f1f5f9;
    padding-top: 0px;
    text-align: center;
}

.icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 0px;
}

.icon-item span {
    font-size: 26px;
    margin-bottom: 0px;
    display: block;
}

.icon-item p {
    font-size: 11px;
    color: #1e3a5f; /* Azul marino sutil */
    font-weight: 600;
}

.speed-output-box {
    background-color: #f1f5f9;
    border-radius: 8px;
    padding: 5px; /* Reducido el relleno de la caja informativa */
    font-size: 16px;
    font-weight: 700;
    color: #0041c2;
    display: inline-block;
    margin-top: 0px;
    margin-bottom: 0px; /* Reducido de 15px a solo 5px */
    border: 1px solid #e2e8f0;
}
/* --- PASO 7: CAJA DE PROMOCIONES --- */
.promo-box {
    background-color: #f8fafc;
    border-left: 4px solid #22c55e;
    padding: 15px;
    text-align: left;
    max-width: 600px;
    margin: 0 auto 8px auto;
    border-radius: 0 8px 8px 0;
    font-size: 14px;
    line-height: 1.5;
}

.step7-title-color {
    margin-bottom: -2px; 
    color: #0041c2;
    font-weight: 700;
    font-size: 18px;
}

.summary-price-box {
    font-size: 16px;
    margin-top: -15px;
    margin-bottom: 5px;
    color: #334155;
    line-height: 1;
}

/* --- CATÁLOGOS DE STREAMING (PASOS 8, 9, 11) --- */
.streaming-catalog-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 600px;
    margin: 0 auto;
    text-align: left;
}

.streaming-group-title {
    text-align: left;
    font-size: 14px;
    font-weight: 700;
    color: #002f6c; /* Azul marino sutil */
    text-transform: uppercase;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 4px;
    margin: 15px 0 5px 0;
    letter-spacing: 0.5px;
}

.streaming-card {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 14px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
}

.streaming-card:hover {
    border-color: #0041c2;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 65, 194, 0.12);
}

.streaming-card input[type="radio"], .streaming-card input[type="checkbox"] {
    margin-top: 4px;
    cursor: pointer;
    accent-color: #0041c2;
}

.streaming-info {
    flex: 1;
}

.streaming-header {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    font-size: 15px;
    color: #0f172a;
    margin-bottom: 4px;
}

.streaming-desc {
    font-size: 12px;
    color: #64748b;
    line-height: 1.4;
}

.price-strike {
    text-decoration: line-through;
    color: #94a3b8;
    font-weight: 400;
    margin-right: 6px;
}

.price-free {
    color: #ef4444;
    font-weight: 700;
}

.disabled-card {
    opacity: 0.55;
    cursor: not-allowed !important;
    background-color: #f1f5f9 !important;
    border-color: #e2e8f0 !important;
}

/* --- PASO 10: SOLUCIONES DIGITALES --- */
.soluciones-catalog-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 15px;
    max-width: 800px;
    margin: 0 auto;
}

.solucion-card {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    gap: 12px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
}

.solucion-card:hover {
    border-color: #22c55e;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.12);
}

.solucion-card.selected {
    border-color: #22c55e;
    background-color: #f0fdf4;
}

.solucion-card input[type="checkbox"] {
    margin-top: 4px;
    accent-color: #22c55e;
}

.solucion-info-body {
    flex: 1;
}

.solucion-header-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 4px;
}

.solucion-name {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
}

.solucion-price {
    font-size: 13px;
    font-weight: 700;
    color: #166534;
}

.solucion-price.free {
    background-color: #dcfce7;
    color: #15803d;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    text-transform: uppercase;
}

.solucion-meta {
    font-size: 11px;
    color: #475569;
    font-style: italic;
    margin-bottom: 4px;
}

.solucion-desc {
    font-size: 11px;
    color: #64748b;
    line-height: 1.4;
}

/* --- PASO 12: RESUMEN DE COTIZACIÓN --- */
.summary-main-card {
    max-width: 750px !important;
    margin: 0 auto 20px auto;
}

.summary-title {
    font-size: 22px !important;
    color: #001f3f !important;
    border-bottom: 2px solid #0041c2;
    padding-bottom: 6px;
    margin-bottom: 15px;
}

.summary-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    background-color: #f8fafc;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 15px;
    border: 1px solid #e2e8f0;
}

.meta-cell {
    font-size: 13px;
    color: #334155;
    text-align: left;
}

.summary-section {
    margin-bottom: 15px;
}

.section-header-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    color: #0b8a5a;
    border-bottom: 1px dashed #cbd5e1;
    padding-bottom: 2px;
    margin-bottom: 6px;
    text-align: left;
}

.two-col-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #334155;
    padding: 3px 0;
}

.col-desc {
    flex: 1;
    text-align: left;
}

.col-price {
    font-weight: 700;
    color: #0f172a;
    text-align: right;
    min-width: 90px;
}

/* Bloques de Totales */
.totals-grand-container {
    margin-top: 25px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.totals-sub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
    width: 100%;
}

.total-block {
    background-color: #f8fafc;
    border: 1px solid #cbd5e1;
    padding: 15px;
    border-radius: 8px;
    text-align: left;
}

.total-block-green {
    background-color: #f0fdf4 !important;
    border-color: #bbf7d0 !important;
    text-align: left !important;
}

.total-label {
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
}

.total-amount {
    font-size: 28px;
    font-weight: 800;
    color: #0f172a;
    margin: 4px 0;
}

.total-block-green .total-amount {
    color: #166534;
}

.total-disclaimer {
    font-size: 11px;
    color: #64748b;
    line-height: 1.4;
}

.text-green-bold {
    color: #166534;
    font-weight: 700;
}

/* Ficha del Asesor */
.advisor-section {
    margin-top: 25px;
    border-top: 1px solid #cbd5e1;
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.advisor-info {
    flex: 1;
    font-size: 13px;
    color: #334155;
    line-height: 1.5;
    text-align: left;
}

.advisor-info p {
    margin-bottom: 4px;
}

.advisor-img-box {
    width: 160px;
    height: 110px;
    overflow: hidden;
  }

.advisor-img-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* --- PASO 13: FORMULARIO Y COBERTURA --- */
.form-aligned-card {
    text-align: left; 
    max-width: 600px; 
    margin: 0 auto;
}

.warning-alert-text {
    margin-bottom: 15px; 
    font-weight: bold; 
    color: #ef4444;
    text-align: left;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 12px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #334155;
}

.form-group input {
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    color: #0f172a;
    background-color: #f8fafc;
}

.form-group input:focus {
    outline: none;
    border-color: #0041c2;
    background-color: #ffffff;
}

.max-width-btn {
    background: #0041c2; 
    width: 100%;
}

.label-margin-top {
    margin-top: 10px;
}

.whatsapp-large-btn {
    margin-top: 20px; 
    font-size: 18px;
    width: 100%;
}

.center-text-card {
    margin-top: 30px; 
    text-align: center;
}

.centered-avatar {
    margin: 0 auto 15px auto;
}

.notice-title {
    color: #002f6c; 
    font-size: 18px; 
    margin-bottom: 15px;
}

.notice-subtitle {
    font-size: 13px; 
    color: #555; 
    margin-bottom: 15px;
}

.requirements-list {
    text-align: left;
    font-size: 13px;
    color: #334155;
    padding-left: 20px;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

.requirements-list li {
    margin-bottom: 6px;
}

/* --- BARRA INFERIOR DE CONTROLES --- */
.controls-bar {
    background-color: #f8fafc;
    padding: 10px 20px; /* Relleno vertical reducido para compactar base del wizard */
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
}

.btn-control {
    background-color: #64748b;
    color: white;
    border: none;
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-control:hover {
    background-color: #475569;
    transform: translateY(-1px);
}

.btn-reset {
    background-color: #ef4444;
}

.btn-reset:hover {
    background-color: #dc2626;
}

/* --- POPUP COMPARTIR FACEBOOK --- */
.fb-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.fb-popup-box {
    background-color: #ffffff;
    padding: 25px;
    border-radius: 8px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    text-align: center;
}

/* --- SECCIÓN DE PREGUNTAS FRECUENTES (FAQ) --- */
.faq-container {
    max-width: 900px;
    margin: 30px auto;
    padding: 0 15px;
    text-align: left;
}

.faq-main-title {
    font-size: 20px;
    color: #001f3f;
    font-weight: 700;
    margin-bottom: 15px;
    border-left: 4px solid #0041c2;
    padding-left: 10px;
    text-align: left;
}

.faq-item {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    transition: all 0.2s ease;
}

.faq-item:hover {
    border-color: #0041c2;
}

.faq-header {
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 14px;
    color: #0f172a;
}

.faq-icon {
    font-size: 18px;
    color: #64748b;
    transition: transform 0.2s ease;
}

.faq-body {
    max-height: 0;
    padding: 0 20px;
    background-color: #f8fafc;
    overflow: hidden;
    transition: all 0.2s ease-out;
}

.faq-body p {
    font-size: 13px;
    color: #475569;
    line-height: 1.5;
    padding-bottom: 14px;
}

/* Clases dinámicas activadas por JavaScript */
.faq-item.active .faq-body {
    max-height: 200px; /* Permite la expansión suave del contenedor */
    padding-top: 10px;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg); /* Convierte el "+" en una "x" de cierre */
    color: #ef4444;
}


/* --- ESTILOS DE IMPRESIÓN EXCLUSIVOS --- */
@media print {
    body {
        background-color: #ffffff !important;
        color: #000000 !important;
    }
    .progress-container, .status-bar, .controls-bar, .options-group, .btn-action-primary, .btn-control {
        display: none !important;
    }
    .step-panel {
        display: none !important;
    }
    .step-panel#step-12 {
        display: block !important;
        padding: 0 !important;
    }
    .wizard-container {
        border: none !important;
        box-shadow: none !important;
    }
    .summary-main-card {
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        max-width: 100% !important;
    }
    .totals-sub-grid {
        background: #f1f5f9 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .total-block {
        border: 1px solid #cbd5e1 !important;
    }
}
/* --- ENLACE DE FAQ EN LA BARRA DE CONTROLES INFERIOR --- */
.faq-link-bar {
    font-size: 13px;
    color: #64748b;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s ease;
}

.faq-link-bar:hover {
    color: #0041c2 !important; /* Cambia al azul rey corporativo al pasar el cursor */
    text-decoration: underline !important;
}
