/* Estilos personalizados para la web de RED DE SALUD ALTO AMAZONAS */

/* Variables de colores */
:root {
    --primary-color: #0c62cf;
    --secondary-color: #6c757d;
    --accent-color: #28a745;
    --light-color: #acacad;
    --dark-color: #343a40;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --bs-primary: #0c62cf !important;
    --quick-access-bg: #3d73e8;
}

/* Estilos generales */
body {
    font-family: 'Roboto', sans-serif;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden; /* Prevenir scroll horizontal */
}

a {
    color: var(--primary-color);
    transition: all 0.3s ease;
}

a:hover {
    color: #4993f2;
    text-decoration: none;
}

/* Cabecera */

/* Degradado radial para la barra superior */
.top-bar {
    font-size: 0.75rem !important;
    background: radial-gradient(circle, #4993f2 0%, #0c62cf 100%) !important;
    background-color: transparent !important;
    padding-top: 0.35rem !important;
    padding-bottom: 0.35rem !important;
}

/* Estilos para la barra superior */
.top-bar-link {
    color: white;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    margin-right: 15px;
    transition: all 0.3s ease;
    font-size: 0.75rem;
}

.top-bar-link:hover {
    color: rgba(255, 255, 255, 0.8);
}

.top-bar-link i {
    margin-right: 5px;
    font-size: 0.85rem;
}

/* Estilos para el logo y título en dos filas */
.brand-container {
    display: flex;
    align-items: center;
    gap: 5px; /* Reducido de 5px a 3px */
}

.brand-logo {
    height: 50px;
    width: auto;
}

.brand-text-container {
    display: flex;
    flex-direction: column;
}

.brand-text-main {
    font-weight: 700;
    font-size: 1rem;
    color: #333;
    line-height: 1.2;
    margin: 0;
}

.brand-text-sub {
    font-weight: 500;
    font-size: 0.85rem;
    color: #666;
    line-height: 1.2;
    margin: 0;
}

/* Separador vertical */
.vertical-divider {
    width: 1px;
    height: 40px;
    background-color: #dee2e6;
    margin: 0 5px 0 0; /* Reducido el margen derecho de 15px a 5px y eliminado el margen izquierdo */
}

.navbar-brand img {
    max-height: 50px;
}

.navbar {
    padding: 0.5rem 1rem;
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem;
}

/* Secciones */
.section-title {
    color: var(--primary-color);
    position: relative;
    padding-bottom: 0.5rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: var(--accent-color);
}

/* Título para secciones con fondo oscuro - Alineado a la izquierda */
.section-title-light {
    color: white;
    position: relative;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    text-align: left;
}

.section-title-light::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    transform: none;
    width: 50px;
    height: 3px;
    background-color: white;
}

/* Divisor para secciones claras */
.divider-light {
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    max-width: 80%;
    margin: 1.5rem 0;
}

/* Slider principal (full-width) */
.main-slider-container {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    margin-bottom: 2rem;
    overflow: hidden;
}

/* Carousel con efecto zoom */
.carousel-caption {
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 5px;
    padding: 15px;
}

.carousel-item {
    overflow: hidden;
}

.carousel-item img {
    height: 500px;
    object-fit: cover;
    width: 100%;
    animation: zoomOut 10s ease-in-out forwards;
    transform-origin: center center;
}

@keyframes zoomOut {
    0% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1.0);
    }
}

/* Tarjetas de noticias */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 1.5rem;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.card-img-top {
    height: 200px;
    object-fit: cover;
}

.card-title {
    color: var(--primary-color);
}

.aside_noti {
    color: var(--light-color);
}

.card-footer {
    background-color: rgba(0, 0, 0, 0.03);
}

/* Accesos rápidos - NUEVO ESTILO */
.quick-access {
    display: block;
    padding: 1.5rem;
    text-align: center;
    color: white;
    background-color: var(--quick-access-bg);
    transition: all 0.3s ease;
    text-decoration: none;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(61, 115, 232, 0.3);
    height: 100%;
}

.quick-access:hover {
    background-color: #2a5cc9;
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(61, 115, 232, 0.4);
    color: white;
}

.quick-access-icon {
    margin-bottom: 1rem;
    color: white;
}

.quick-access h5 {
    color: white;
    font-weight: 600;
    margin-top: 0.5rem;
}

/* Estadísticas */
.stat-counter {
    padding: 1rem;
}

.stat-counter i {
    font-size: 2rem;
}

.counter {
    font-size: 2rem;
    font-weight: 700;
    margin: 0.5rem 0;
}

/* Pie de página */
footer {
    background-color: var(--dark-color);
    color: white;
    margin-top: 0 !important; /* Forzar margen superior a 0 */
}

footer h5 {
    color: var(--light-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

footer a.text-white:hover {
    color: var(--warning-color) !important;
}

/* Responsive */
@media (max-width: 768px) {
    .carousel-item img {
        height: 300px;
    }
    
    .section-title {
        text-align: center;
    }
    
    .section-title::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .quick-access {
        padding: 1rem;
    }
    
    .quick-access-icon i {
        font-size: 2.5rem !important;
    }
    
    .quick-access h5 {
        font-size: 1rem;
    }
}

/* Estilos para tablas */
.table-responsive {
    overflow-x: auto;
}

.table th {
    background-color: var(--primary-color);
    color: white;
}

/* Estilos para formularios */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 86, 179, 0.25);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #003d7a;
    border-color: #003d7a;
}

/* Estilos para paginación */
.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.pagination .page-link {
    color: var(--primary-color);
}

/* Estilos para alertas */
.alert {
    border-radius: 0;
    border-left-width: 4px;
}

.alert-success {
    border-left-color: var(--accent-color);
}

.alert-danger {
    border-left-color: var(--danger-color);
}

.alert-warning {
    border-left-color: var(--warning-color);
}

.alert-info {
    border-left-color: var(--info-color);
}

/* Estilos para módulos específicos */
/* Módulo de documentos */
.document-card {
    border-left: 4px solid var(--primary-color);
}

.document-icon {
    font-size: 2rem;
    margin-right: 1rem;
}

/* Módulo de indicadores */
.indicator-card {
    border-top: 4px solid var(--accent-color);
}

.chart-container {
    height: 300px;
    margin-bottom: 2rem;
}

/* Módulo de convocatorias */
.job-listing {
    border-left: 4px solid var(--warning-color);
    padding: 1rem;
    margin-bottom: 1rem;
}

.job-status {
    font-weight: bold;
}

.job-status.active {
    color: var(--accent-color);
}

.job-status.closed {
    color: var(--danger-color);
}

/* Animaciones */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* NUEVOS ESTILOS PARA SECCIÓN DE INDICADORES DE SALUD */

/* Sección de indicadores de salud - FULL WIDTH */
.indicadores-salud-section {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    margin-bottom: 0rem;
    padding: 0;
    overflow: hidden;
}

.indicadores-background {
    background-image: url('../images/indicadores.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    width: 100%;
    padding: 3rem 0;
}

/* Tarjetas con efecto vidrio (glassmorphism) linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)),*/
.glass-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    padding: 25px;
    height: 100%;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.glass-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px 0 rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.glass-card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: white;
    background: rgba(255, 255, 255, 0.2);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.glass-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.glass-card-body h5 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: white;
    font-weight: 600;
}

.glass-card-body p {
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    flex: 1;
}

.btn-glass {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 30px;
    padding: 0.5rem 1.5rem;
    transition: all 0.3s ease;
    margin-top: auto;
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Sección SAMU */
.samu-section {
    padding: 0rem 0;
    background-color: #f8f9fa;
    margin-bottom: 0 !important;
}

.samu-section + * {
    margin-top: 0 !important;
}

.samu-section .container {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.samu-logo {
    max-width: 200px;
    margin-bottom: 1.5rem;
}

.samu-image {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
}

.samu-image:hover {
    transform: scale(1.02);
}

.samu-contact {
    background-color: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
}

.samu-contact h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 600;
}

.samu-phone {
    display: flex;
    align-items: center;
    margin-bottom: 0.8rem;
    padding: 0.5rem;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.samu-phone:hover {
    background-color: #f8f9fa;
}

.samu-phone i {
    font-size: 1.5rem;
    color: #dc3545;
    margin-right: 1rem;
}

.samu-phone-number {
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
}

.samu-phone-label {
    font-size: 0.8rem;
    color: #6c757d;
    display: block;
}

/* Estilos para menús mejorados */
.mega-menu {
    width: 400px; /* Reducido para una sola columna */
    padding: 15px;
    max-width: 90vw;
}

.dropdown-item-enhanced {
    display: block;
    padding: 10px 12px;
    border-radius: 6px;
    margin-bottom: 6px;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    text-decoration: none;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    position: relative;
}

.dropdown-item-enhanced:hover {
    background-color: #f8f9fa;
    border-left-color: #0d6efd;
    text-decoration: none;
    color: inherit;
}

.dropdown-item-enhanced .icon {
    display: inline-block;
    width: 18px;
    margin-right: 10px;
    color: #0d6efd;
    text-align: center;
    vertical-align: top;
    margin-top: 1px;
}

.dropdown-item-enhanced .content {
    display: inline-block;
    width: calc(100% - 32px);
    vertical-align: top;
}

.dropdown-item-enhanced .title {
    font-weight: 600;
    color: #212529;
    margin-bottom: 3px;
    font-size: 0.9em;
    line-height: 1.2;
    display: block;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-item-enhanced .description {
    font-size: 0.75em;
    color: #6c757d;
    line-height: 1.4;
    display: block;
    width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

.nav-link-enhanced {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.nav-link-enhanced:hover {
    background-color: rgba(13, 110, 253, 0.1);
    color: #0d6efd;
}

.nav-link-enhanced .nav-icon {
    font-size: 1.1em;
}

/* Responsive para tarjetas de vidrio y SAMU */
@media (max-width: 992px) {
    .glass-card {
        padding: 20px;
    }
    
    .glass-card-icon {
        font-size: 2rem;
        width: 70px;
        height: 70px;
    }
    
    .glass-card-body h5 {
        font-size: 1.3rem;
    }
    
    .top-bar-link span {
        display: none; /* Ocultar texto en móviles, mostrar solo iconos */
    }
    
    .top-bar-link {
        margin-right: 10px;
    }
    
    .samu-logo {
        max-width: 150px;
    }
    
    .mega-menu {
        width: 100%;
        padding: 10px;
    }
    
    .dropdown-item-enhanced .content {
        width: calc(100% - 28px);
    }
    
    .vertical-divider {
        display: none;
    }
    
    .brand-text-main, .brand-text-sub {
        font-size: 0.8rem;
    }
    
    .brand-logo {
        height: 40px;
    }
}

/* Ajustes para la barra superior cuando el usuario está logueado */
.top-bar .col-md-6.text-md-end {
    display: flex;
    flex-wrap: nowrap; /* Evita que los elementos se envuelvan a la siguiente línea */
    justify-content: flex-end; /* Alinea los elementos a la derecha */
    align-items: center; /* Centra verticalmente los elementos */
    overflow: visible; /* Permite que el dropdown sea visible */
    gap: 8px; /* Espacio entre elementos */
}

.top-bar .col-md-6.text-md-end .top-bar-link {
    flex-shrink: 1; /* Permite que los enlaces se encojan si es necesario */
    min-width: 0; /* Permite que el contenido se encoja */
    white-space: nowrap; /* Evita que el texto se envuelva */
}

.top-bar .col-md-6.text-md-end .dropdown {
    flex-shrink: 0; /* Evita que el dropdown se encoja */
    position: relative; /* Asegura el posicionamiento correcto del dropdown */
}

.top-bar .col-md-6.text-md-end .dropdown .btn {
    white-space: nowrap; /* Evita que el texto del botón se envuelva */
    overflow: hidden; /* Oculta el texto que se desborda */
    text-overflow: ellipsis; /* Agrega puntos suspensivos al texto desbordado */
    max-width: 140px; /* Limita el ancho del botón para nombres largos */
    font-size: 0.7rem; /* Reduce el tamaño de fuente */
    padding: 0.25rem 0.5rem; /* Reduce el padding */
}

/* Asegurar que el dropdown menu sea visible */
.top-bar .dropdown-menu {
    position: absolute;
    z-index: 1050; /* Z-index alto para estar por encima de otros elementos */
    right: 0; /* Alinear a la derecha */
    left: auto; /* Anular alineación izquierda */
    min-width: 180px; /* Ancho mínimo del dropdown */
    font-size: 0.8rem; /* Tamaño de fuente del dropdown */
}

/* Mejoras para responsividad en la barra superior */
@media (max-width: 1200px) {
    .top-bar .col-md-6.text-md-end .top-bar-link span {
        display: none; /* Ocultar texto en pantallas medianas */
    }
    
    .top-bar .col-md-6.text-md-end .top-bar-link {
        margin-right: 8px; /* Reducir margen */
    }
}

@media (max-width: 992px) {
    .top-bar .col-md-6.text-md-end {
        gap: 5px; /* Reducir espacio entre elementos */
    }
    
    .top-bar .col-md-6.text-md-end .dropdown .btn {
        max-width: 120px; /* Reducir ancho máximo */
        font-size: 0.65rem; /* Reducir más el tamaño de fuente */
        padding: 0.2rem 0.4rem; /* Reducir más el padding */
    }
}

@media (max-width: 768px) {
    .indicadores-background {
        background-attachment: scroll;
    }
    
    .samu-image {
        margin-bottom: 1rem;
    }
    
    .top-bar .col-md-6.text-md-end {
        justify-content: center; /* Centra los elementos en móviles */
    }
}

@media (max-width: 576px) {
    .glass-card {
        padding: 15px;
    }
    
    .glass-card-icon {
        font-size: 1.8rem;
        width: 60px;
        height: 60px;
        margin-bottom: 0.8rem;
    }
    
    .glass-card-body h5 {
        font-size: 1.2rem;
        margin-bottom: 0.8rem;
    }
    
    .glass-card-body p {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
    
    .btn-glass {
        padding: 0.4rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .samu-phone-number {
        font-size: 1rem;
    }
}


