﻿/* ==========================================================================
   HOJA DE ESTILOS INSTITUCIONAL - FAQS E INSTRUCTIVOS (SIURNAPP / URNA)
   ========================================================================== */

.urna-section,
.faqs-section {
    width: 100%;
    min-height: 75vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.urna-container {
    width: 95%;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    color: #333;
    overflow: hidden;
}

.faqs-main-title {
    color: #003F75;
    font-size: 1.5rem;
    letter-spacing: 0.5px;
}

.faqs-sub-title {
    color: #003F75;
    font-size: 1.25rem;
    letter-spacing: 0.3px;
}

.faqs-selection-prompt {
    color: #475569;
    font-size: 1rem;
    font-weight: 600;
}

/* ==========================================================================
   BOTONES SELECTORES DE TIPO DE INSTRUCTIVO (CA-012, CA-015, CA-057)
   ========================================================================== */
.btn-tipo-instructivo {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    padding: 10px 24px;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    background-color: #E2E8F0;
    color: #19325B;
    border-color: #CBD5E1;
    transition: all 0.2s ease-in-out;
}

.btn-tipo-instructivo:hover:not(.active) {
    background-color: #CBD5E1;
    color: #003F75;
    transform: translateY(-1px);
}

.btn-tipo-instructivo.active {
    background-color: #003F75;
    color: #FFFFFF;
    border-color: #003F75;
    box-shadow: 0 4px 12px rgba(0, 63, 117, 0.25);
}

.badge-tipo-externos-solo {
    background-color: #E8F0FE;
    color: #003F75;
    font-weight: 700;
    border: 1px solid #B8D5FA;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 0.95rem;
}

/* ==========================================================================
   BARRA DE BÚSQUEDA (CA-017, CA-018, CA-019)
   ========================================================================== */
.faqs-search-wrapper {
    max-width: 100%;
    margin: 0 auto;
}

.faqs-search-group {
    border: 1px solid #CBD5E1;
    border-radius: 10px;
    overflow: hidden;
    background-color: #FFFFFF;
}

.faqs-search-icon-box {
    padding-left: 1.1rem;
    font-size: 1.1rem;
}

.faqs-search-input {
    font-size: 0.92rem;
    color: #2B2D45;
    padding: 0.75rem 0.5rem;
    box-shadow: none !important;
}

.faqs-search-input:focus {
    border-color: #CBD5E1;
}

.faqs-btn-clear {
    cursor: pointer;
    font-size: 1.1rem;
    padding-right: 0.9rem;
}

.faqs-btn-clear:hover {
    color: #003F75 !important;
}

.btn-faqs-search {
    background-color: #003F75;
    color: #FFFFFF;
    border: none;
    font-size: 0.92rem;
    transition: background-color 0.2s ease, transform 0.15s ease;
}

.btn-faqs-search:hover {
    background-color: #00284D;
    color: #FFFFFF;
}

.btn-faqs-search:active {
    transform: scale(0.98);
}

/* ==========================================================================
   TABLA DE PREGUNTAS FRECUENTES (CA-021 A CA-027)
   ========================================================================== */
.faqs-table-container {
    border-radius: 10px;
    border: 1px solid #E2E8F0;
    background-color: #FFFFFF;
    overflow-x: auto;
}

.faqs-table {
    font-size: 0.88rem;
    border-collapse: separate;
    border-spacing: 0;
}

.faqs-table thead {
    background-color: #003F75;
}

.faqs-table thead th {
    background-color: #003F75 !important;
    color: #FFFFFF !important;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 13px 12px;
    border: none;
    white-space: nowrap;
    vertical-align: middle;
    text-align: center !important;
    text-transform: uppercase !important;
}

.faqs-table tbody tr {
    border-bottom: 1px solid #E2E8F0;
    transition: background-color 0.15s ease;
}

.faqs-table tbody tr:hover {
    background-color: #F8FAFC;
}

.faqs-table tbody td {
    padding: 14px 12px;
    vertical-align: middle;
    color: #334155;
    line-height: 1.45;
    text-align: center;
}

/* Badge estilizado para la columna Proceso */
.badge-proceso-aj {
    background-color: #E2F0D9;
    color: #1E4620;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 6px 12px;
    border-radius: 6px;
    display: inline-block;
    border: 1px solid #C6E0B4;
}

.faq-nombre-inst {
    color: #0F172A;
    line-height: 1.4;
    text-align: center;
    font-size: 0.88rem;
}

.faq-nombre-inst strong {
    font-weight: 700;
    color: #0F172A;
}

.faq-preguntas-texto {
    color: #334155;
    font-size: 0.87rem;
    line-height: 1.5;
    text-align: center;
}

.faq-palabras-texto {
    color: #475569;
    font-size: 0.84rem;
    line-height: 1.45;
    text-align: center;
}

.faq-rol-texto {
    color: #475569;
    font-size: 0.85rem;
    line-height: 1.45;
    text-align: center;
}

/* Botón Ver instructivo (Icono Ojito - CA-027, CA-077) */
.btn-ver-faq {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    color: #003F75 !important;
    font-size: 1.3rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    cursor: pointer !important;
    transition: transform 0.2s ease, color 0.2s ease;
    line-height: 1 !important;
}

.btn-ver-faq:hover,
.btn-ver-faq:focus {
    color: #002244 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    transform: scale(1.22);
}

.btn-ver-faq:disabled {
    color: #CBD5E1;
    cursor: not-allowed;
    background: transparent;
    transform: none;
}

.btn-gray {
    background: #6c757d;
    color: #fff;
    border: none;
    padding: .35rem .65rem;
    border-radius: 8px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.btn-gray:disabled,
.btn-gray.disabled {
    background: #6c757d;
    color: #fff;
    opacity: 0.85;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* ==========================================================================
   ESTADO VACÍO (EMPTY STATE)
   ========================================================================== */
.faqs-empty-icon i {
    font-size: 3.5rem;
    color: #94A3B8;
}

/* ==========================================================================
   PAGINACIÓN INSTITUCIONAL (MODELO SOLICITADO)
   ========================================================================== */
.paginacion-faqs {
    margin: 0;
    padding: 0;
    list-style: none;
}

.paginacion-faqs .page-arrow {
    width: 36px;
    height: 36px;
    padding: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px !important;
    font-size: 0.95rem;
    font-weight: 700;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #19325b;
    transition: all .2s ease;
    text-decoration: none;
}

.paginacion-faqs .page-arrow:hover {
    background: #003F75;
    color: #ffffff;
    border-color: #003F75;
    transform: translateY(-1px);
}

.paginacion-faqs .page-item.disabled .page-arrow {
    background: #f8fafc;
    color: #cbd5e1;
    border-color: #e2e8f0;
    transform: none;
    cursor: not-allowed;
}

.paginacion-faqs .page-link {
    min-width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #19325B;
    background-color: transparent;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.15s ease;
}

.paginacion-faqs .page-link:hover {
    background-color: #E8F0FE;
    color: #003F75;
}

.paginacion-faqs .page-item.active .page-link {
    background-color: #003F75 !important;
    color: #ffffff !important;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(0, 63, 117, 0.3);
}

.shadow-2sm {
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
}

/* ==========================================================================
   BOTÓN FLOTANTE SUBIR (GLASSMORPHISM INSTITUCIONAL CONTRAPUESTO)
   ========================================================================== */
.scroll-top-fab {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 1200;
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(185, 203, 220, 0.6);
    color: #007268;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    border: 1.5px solid rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px) saturate(120%);
    -webkit-backdrop-filter: blur(8px) saturate(120%);
    transition: transform .18s ease, box-shadow .18s ease, background .15s ease;
    padding: 0;
}

.scroll-top-fab i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    line-height: 1;
}

.scroll-top-fab:hover,
.scroll-top-fab:focus {
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
    background: rgba(200, 218, 232, 0.85);
    color: #004d40;
    outline: none;
}

/* ==========================================================================
   MODAL VISOR DE PDF INSTITUCIONAL (VISTA PREVIA DEL SOPORTE)
   ========================================================================== */
#modalVisorPDF .modal-dialog {
    width: 85%;
    max-width: 1140px;
    margin: 1.75rem auto;
}

#modalVisorPDF .modal-content {
    border: none;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
    border-radius: 8px;
    overflow: hidden;
    min-width: 450px;
}

#modalVisorPDF .visor-pdf-header {
    background-color: #003F75 !important;
    border-bottom: none;
    padding: 0.85rem 1.25rem;
}

#modalVisorPDF .visor-pdf-title h6 {
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

#modalVisorPDF #btnDescargarPdfVisor {
    background-color: #FFFFFF !important;
    color: var(--pdf-viewer-accent, #89143a) !important;
    border: 1px solid var(--pdf-viewer-accent, #89143a) !important;
    font-size: 0.85rem;
    font-weight: 700;
    transition: all 0.2s ease;
}

#modalVisorPDF #btnDescargarPdfVisor:hover {
    background-color: var(--pdf-viewer-accent, #89143a) !important;
    color: #FFFFFF !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--pdf-viewer-accent-rgb, 137, 20, 58), 0.2);
}

#modalVisorPDF .modal-body {
    background-color: #525659;
}
