/* =========================================
   VISOR DE DATOS - SALUD MENTAL
   Diseño tipo GLIA - Profesional
   ========================================= */

/* Contenido Principal - SIN espacio excesivo arriba */
.visor-main-content {
    margin-top: 5px;
    min-height: calc(100vh - 130px);
    background: linear-gradient(135deg, #f0f4f8 0%, #e8edf2 100%);
    padding: 10px 20px 40px;
}

/* Header del Visor */
.visor-header-section {
    padding: 20px 30px;
    background: #fafafa;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.visor-main-title {
    color: #2c3e50;
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
}

.visor-main-title i {
    color: #27ae60;
}

.visor-subtitle {
    font-size: 1rem;
    margin: 8px 0 0 0;
    color: #7f8c8d !important;
    font-weight: 400;
}

.visor-header-img {
    max-width: 100%;
    height: auto;
    max-height: 180px;
    object-fit: contain;
}

/* Grid de Módulos - Tipo GLIA */
.visor-modules-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px;
}

/* Tarjetas de Módulo - Estilo GLIA */
.visor-module-card {
    background: #ffffff;
    border-radius: 30px;
    padding: 35px 20px 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 3px solid transparent;
    position: relative;
    overflow: visible;
}

.visor-module-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

/* Icono del Módulo - Siempre visible */
.module-icon-wrapper {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    border: 3px solid;
}

.module-icon-wrapper i {
    font-size: 3rem;
    color: #2c3e50 !important;
    transition: color 0.3s ease;
}

.visor-module-card:hover .module-icon-wrapper i {
    color: #ffffff !important;
}

/* Colores específicos por módulo - Tipo GLIA */
.module-atenciones .module-icon-wrapper {
    background: #a8e063;
    border-color: #8bc34a;
}
.module-atenciones {
    border-color: #a8e063;
}

.module-derivaciones .module-icon-wrapper {
    background: #2ecc71;
    border-color: #27ae60;
}
.module-derivaciones {
    border-color: #2ecc71;
}

.module-srq .module-icon-wrapper {
    background: #bdc3c7;
    border-color: #95a5a6;
}
.module-srq {
    border-color: #bdc3c7;
}

.module-rqc .module-icon-wrapper {
    background: #f9e79f;
    border-color: #f4d03f;
}
.module-rqc {
    border-color: #f9e79f;
}

.module-whooley .module-icon-wrapper {
    background: #bdc3c7;
    border-color: #95a5a6;
}
.module-whooley {
    border-color: #bdc3c7;
}

.module-gad2 .module-icon-wrapper {
    background: #d2b4de;
    border-color: #bb8fce;
}
.module-gad2 {
    border-color: #d2b4de;
}

.module-wast .module-icon-wrapper {
    background: #f9e79f;
    border-color: #f4d03f;
}
.module-wast {
    border-color: #f9e79f;
}

.module-prenatal .module-icon-wrapper {
    background: #a8e063;
    border-color: #8bc34a;
}
.module-prenatal {
    border-color: #a8e063;
}

/* Título del Módulo */
.module-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: #2c3e50;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Descripción */
.module-description {
    font-size: 0.8rem;
    color: #7f8c8d !important;
    line-height: 1.4;
    margin: 0;
}

/* Flecha oculta en diseño GLIA */
.module-arrow {
    display: none;
}

/* Footer Informativo */
.visor-info-footer {
    max-width: 1200px;
    margin: 30px auto 0;
    padding: 20px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Modal Styles */
#visorModal .modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

#visorModal .modal-header {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    border-radius: 16px 16px 0 0;
    border: none;
    padding: 16px 24px;
}

#visorModal .modal-header .btn-close {
    filter: brightness(0) invert(1);
}

#visorModal .modal-title {
    font-weight: 600;
}

#visorModal .modal-body {
    padding: 24px;
    min-height: 400px;
}

#visorModal .modal-footer {
    border-top: 1px solid #dee2e6;
    padding: 16px 24px;
}

/* Responsive */
@media (max-width: 992px) {
    .visor-main-content {
        margin-top: 30px;
        padding: 10px 15px 30px;
    }
    
    .visor-modules-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .module-icon-wrapper {
        width: 100px;
        height: 100px;
    }
    
    .module-icon-wrapper i {
        font-size: 2.5rem;
    }
}

@media (max-width: 576px) {
    .visor-main-content {
        margin-top: 35px;
        padding: 10px;
    }
    
    .visor-header-section {
        padding: 15px;
    }
    
    .visor-main-title {
        font-size: 1.4rem;
    }
    
    .visor-modules-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .visor-module-card {
        padding: 25px 20px;
    }
    
    .module-icon-wrapper {
        width: 90px;
        height: 90px;
    }
    
    .module-icon-wrapper i {
        font-size: 2.2rem;
    }
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.visor-module-card {
    animation: fadeInUp 0.4s ease-out forwards;
}

.visor-module-card:nth-child(1) { animation-delay: 0.05s; }
.visor-module-card:nth-child(2) { animation-delay: 0.1s; }
.visor-module-card:nth-child(3) { animation-delay: 0.15s; }
.visor-module-card:nth-child(4) { animation-delay: 0.2s; }
.visor-module-card:nth-child(5) { animation-delay: 0.25s; }
.visor-module-card:nth-child(6) { animation-delay: 0.3s; }
.visor-module-card:nth-child(7) { animation-delay: 0.35s; }
.visor-module-card:nth-child(8) { animation-delay: 0.4s; }