/* 1. Variables y Estilos Base */
:root {
    --primary-color: #0d6efd;
    --dark-color: #212529;
    --light-color: #f8f9fa;
    --font-family: 'Poppins', sans-serif;
}

html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

/* --- INICIO DE LA CORRECCIÓN GLOBAL DE LAYOUT --- */
html, body {
    height: 100%;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    padding-top: 76px;
}

    body#home-page {
        padding-top: 0;
    }

main {
    flex: 1 0 auto;
    overflow-x: hidden;
}
/* --- FIN DE LA CORRECCIÓN GLOBAL DE LAYOUT --- */

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

/* 2. Menú de Navegación */
#main-nav {
    background-color: rgba(10, 25, 47, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar-dark .navbar-nav .nav-link {
    position: relative;
    padding: 10px 15px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.4s ease;
}

    .navbar-dark .navbar-nav .nav-link:not(.dropdown-toggle)::after {
        content: '';
        position: absolute;
        left: 0;
        bottom: 0;
        width: 0;
        height: 2px;
        background-color: #ffffff;
        border-radius: 2px;
        transition: width 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    }

    .navbar-dark .navbar-nav .nav-link:hover {
        color: #ffffff;
    }

    .navbar-dark .navbar-nav .nav-link:not(.dropdown-toggle):hover::after {
        width: 100%;
    }

/* 3. Sección de Video (Hero) */
.hero-section {
    position: relative;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: 1;
    transform: translateX(-50%) translateY(-50%);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 800px;
    padding: 20px;
    text-shadow: 0px 2px 5px rgba(0, 0, 0, 0.7);
}

/* 4. Estilos de Componentes Generales */
.section-title {
    text-align: center;
    font-weight: 700;
    margin-bottom: 3rem;
    position: relative;
}

    .section-title::after {
        content: '';
        display: block;
        width: 60px;
        height: 4px;
        background: var(--primary-color);
        margin: 10px auto 0;
        border-radius: 2px;
    }

.card {
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    overflow: hidden;
    transition: box-shadow 0.3s ease, border-color 0.3s ease, filter 0.3s ease;
}

    .card:not(.no-hover-effect):hover {
        transform: none !important;
        box-shadow: 0 12px 24px rgba(0,0,0,0.15);
        border-color: #888;
        filter: brightness(0.97);
        cursor: pointer;
    }

.news-card .card-img-top {
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    object-fit: cover;
    height: 200px;
    width: 100%;
}

.card:hover img, .card:hover .card-img-top {
    transform: none !important;
    transition: none !important;
}

/* 5. Sección de Servicios Interactivos */
.service-tabs-container {
    min-height: 500px;
}

.service-tab-button {
    text-align: left;
    padding: 20px 25px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #6c757d;
    border: none;
    border-left: 4px solid transparent;
    border-radius: 0 !important;
    background-color: transparent !important;
    transition: all 0.3s ease;
}

    .service-tab-button:hover:not(.active) {
        color: #343a40;
    }

.service-content-pane {
    position: relative;
    width: 100%;
    min-height: 500px;
    border-radius: 12px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.service-pane-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.1) 100%);
    display: flex;
    align-items: flex-end;
    padding: 40px;
    color: #fff;
}

.service-pane-text h3 {
    font-family: 'Montserrat', sans-serif;
}

.service-pane-text p {
    font-size: 1.1rem;
    max-width: 80%;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.9);
}

.tab-pane.fade {
    transition: opacity 0.3s ease-in-out;
}

/* 6. Sección de Cifras con Fondo Animado */
.stats-section-animated {
    position: relative;
    overflow: hidden;
    background-image: linear-gradient(to bottom, #0033A0, var(--dark-color));
}

    .stats-section-animated canvas {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 1;
    }

    .stats-section-animated .display-4, .stats-section-animated .lead, .stats-section-animated .text-white-50 {
        text-shadow: 0px 2px 5px rgba(0, 0, 0, 0.7);
    }

    .stats-section-animated .section-title::after {
        background: #ffffff;
    }

/* 7. Footer */
.footer-link, .social-icon {
    text-decoration: none;
    transition: all 0.3s;
}

    .footer-link:hover {
        color: #fff;
    }

.social-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    margin-right: 10px;
}

    .social-icon:hover {
        background-color: var(--primary-color);
    }

/* 8. Página Institucional (Base) */
@import url('https://fonts.googleapis.com/css2?family=UnifrakturCook:wght@700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=IM+Fell+English+SC&display=swap');

.page-header {
    position: relative;
    padding: 100px 0;
    text-align: center;
    background-color: #173e78;
    color: #fff;
    margin-top: -76px;
    padding-top: calc(76px + 100px);
    padding-bottom: 100px;
}

    .page-header h1, .page-header p {
        text-shadow: 0px 2px 5px rgba(0, 0, 0, 0.7);
    }

.page-header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 25, 47, 0.7);
}

.institutional-tabs {
    border-bottom: 2px solid #dee2e6;
}

    .institutional-tabs .nav-link {
        color: #6c757d;
        font-weight: 600;
        border: none;
        border-bottom: 2px solid transparent;
        padding: 15px 20px;
        transition: all 0.3s ease;
    }

        .institutional-tabs .nav-link.active {
            color: var(--primary-color);
            background-color: transparent;
            border-bottom: 2px solid var(--primary-color);
        }

        .institutional-tabs .nav-link:hover:not(.active) {
            color: var(--primary-color);
        }

/* 9. Página Institucional (Contenido) */
.institutional-content {
    background-color: #ffffff;
    background-image: url("https://www.transparenttextures.com/patterns/concrete-wall.png");
    color: rgba(0, 0, 0, 0.7);
    padding: 40px;
    border: 2px solid #c2b280;
    border-top: none;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.3);
    font-family: 'IM Fell English SC', serif;
    font-size: 1.1rem;
    line-height: 1.8;
}

    .institutional-content h3 {
        font-family: 'Poppins', sans-serif;
        font-weight: 700;
        color: #000000df;
    }

.historia-img {
    width: 100%;
    max-height: 350px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 1.5rem;
    border: 1px solid #c2b280;
}

.texto-historia p {
    text-align: justify;
    margin-bottom: 1rem;
}

.direccion-card {
    padding: 20px;
    border-left: 4px solid var(--primary-color);
    background-color: #f8f9fa;
    height: 100%;
}

    .direccion-card h5 {
        font-family: 'Montserrat', sans-serif;
    }

.caidos-honor-img {
    max-width: 200px;
    opacity: 0.9;
}

.caidos-honor-roll {
    text-align: left;
    font-size: 1rem;
    line-height: 2;
    columns: 1;
    -webkit-columns: 1;
    -moz-columns: 1;
}

@media (min-width: 992px) {
    .caidos-honor-roll {
        columns: 3;
        -webkit-columns: 3;
        -moz-columns: 3;
    }
}

.caidos-honor-roll li {
    margin-bottom: 0.5rem;
}

    .caidos-honor-roll li strong {
        color: var(--primary-color);
        font-weight: 600;
        margin-right: 8px;
    }

/* 10. Galería Institucional */
#galeria-scroll-wrapper {
    max-height: 800px;
    overflow-y: auto;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 4px;
}

.gallery-item a {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: 4px;
}

.gallery-item .img-thumbnail {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.35s ease-in-out;
}

.gallery-item a::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.5), transparent);
    opacity: 0;
    transition: opacity 0.35s ease-in-out;
}

.gallery-item a:hover::after {
    opacity: 1;
}

.modal-content {
    background-color: transparent;
    border: none;
}

.modal-header {
    border-bottom: none;
}

.btn-close {
    background-color: white;
    border-radius: 50%;
}

/* 11. Sección "Accesos Útiles" */
.access-card-visual {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    height: 250px;
    text-decoration: none;
}

.access-card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.access-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 51, 160, 0.5);
    opacity: 0.5;
    transition: opacity 0.4s ease;
}

.access-card-content {
    position: relative;
    z-index: 2;
    color: #ffffff;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    text-align: center;
    text-shadow: 0px 2px 4px rgba(0, 0, 0, 0.5);
}

    .access-card-content h5 {
        font-size: 1.5rem;
    }

.access-card-visual:hover .access-card-bg {
    transform: scale(1.1);
}

.access-card-visual:hover .access-card-overlay {
    opacity: 1;
    background-color: rgba(0, 21, 68, 0.7);
}

/* 12. TARJETAS DE TRÁMITES */
.tramite-card-final {
    position: relative;
    display: block;
    min-height: 240px;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: white;
    background-size: cover;
    background-position: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    display: flex;
    align-items: flex-end;
    padding: 1.25rem;
}

    .tramite-card-final:hover {
        transform: translateY(-8px);
        box-shadow: 0 8px 25px rgba(0,0,0,0.3);
        color: white;
    }

    .tramite-card-final::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(180deg, rgba(0,0,0,0) 50%, rgba(0,0,0,0.85) 100%);
        z-index: 1;
        transition: background 0.35s ease;
    }

    .tramite-card-final:hover::before {
        background: linear-gradient(180deg, rgba(0,0,0,0.2) 20%, rgba(0,0,0,0.95) 100%);
    }

.tramite-content {
    position: relative;
    z-index: 2;
    width: 100%;
}

.titulo-tramite {
    font-size: 1.3rem;
    font-weight: 700;
    text-shadow: 1px 1px 5px rgba(0,0,0,0.8);
    margin: 0;
    transition: transform 0.35s ease;
}

.tramite-descripcion {
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.4;
    margin-top: 0.5rem;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.35s ease, max-height 0.35s ease, margin-top 0.35s ease;
}

.tramite-card-final:hover .titulo-tramite {
    transform: translateY(-5px);
}

.tramite-card-final:hover .tramite-descripcion {
    opacity: 1;
    max-height: 100px;
}

.tramite-card-final::after {
    content: '';
    position: absolute;
    top: 0;
    width: 75%;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.3) 50%, rgba(255, 255, 255, 0) 100%);
    transform: skewX(-25deg);
    left: -100%;
    transition: left 0.35s ease-in-out;
    z-index: 1;
}

.tramite-card-final:hover::after {
    left: 100%;
}

/* 13. Contenedor de Contenido Principal y Anulaciones */
.main-content-container {
    padding-top: 8rem;
    padding-bottom: 4rem;
}

    .main-content-container .card:hover {
        transform: none;
    }

.login-page .card:hover {
    transform: none !important;
    box-shadow: none !important;
    border-color: initial !important;
}

/* 14. Página de Detalle de Noticia */
.noticia-detalle-header img {
    width: 100%;
    height: auto;
    max-height: 450px;
    object-fit: cover;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.noticia-meta {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 1.5rem;
}

.noticia-contenido p {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.noticia-contenido h2, .noticia-contenido h3, .noticia-contenido h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.noticia-contenido img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    display: block;
    margin: 2rem auto;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.aside-placeholder {
    position: sticky;
    top: 100px;
    background-color: #f8f9fa;
    border: 1px dashed #dee2e6;
    padding: 2rem;
    border-radius: 0.5rem;
    text-align: center;
    color: #6c757d;
}

/* 15. Editor CKEditor */
.ck-editor__editable_inline {
    min-height: 400px;
    max-height: 800px;
    resize: vertical;
    overflow: auto;
}

/* 16. Ubicación con Mapa */
.contact-bg {
    background-image: url('../img/institucional/historia.jpg');
    background-size: cover;
    background-position: center;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.1;
    z-index: 1;
}

.contact-info-card {
    background-color: rgba(10, 10, 10, 0.7);
    padding: 2rem;
    border-radius: 0.5rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.map-container {
    border-radius: 0.5rem;
    overflow: hidden;
}

/* 17. Asistente de Chat (Comentado) */

/* 18. Plana Mayor (Conducción Superior) */
.authority-section {
    text-align: center;
    margin-bottom: 2.5rem;
}

    .authority-section:last-child {
        margin-bottom: 0;
    }

.authority-role {
    font-family: 'IM Fell English SC', serif;
    font-size: 1.4rem;
    color: #564933;
    font-style: italic;
    font-weight: bold;
    margin-bottom: 1rem;
}

.authority-image {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1.5rem;
    border: 4px solid #a88d5f;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    background-color: #ffffff;
}

.authority-section:hover .authority-image {
    transform: scale(1.05);
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

.authority-rank {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    color: #6c757d;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0;
}

.authority-name {
    font-family: 'Poppins', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: #343a40;
    margin-top: 0;
}

.authority-separator {
    max-width: 200px;
    margin: 2.5rem auto;
    border-top: 1px solid rgba(168, 141, 95, 0.5);
}

/* 19. Fondo Decorativo Plana Mayor */
#plana-mayor-pane {
    position: relative;
    overflow: hidden;
}

    #plana-mayor-pane::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-size: 870px;
        background-position: center center;
        background-repeat: no-repeat;
        opacity: 0.09;
        filter: grayscale(100%);
        mask-image: radial-gradient(circle, black 0%, transparent 130%);
        -webkit-mask-image: radial-gradient(circle, black 0%, transparent 100%);
        z-index: 1;
    }

.plana-mayor-content {
    position: relative;
    z-index: 2;
}

/* 20. PÁGINA DE CONSEJOS DE PREVENCIÓN */
.consejos-header h1 {
    font-weight: 700;
}

.consejos-header .lead {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    color: #6c757d;
}

.consejo-card-link {
    text-decoration: none;
}

.consejo-card {
    aspect-ratio: 640 / 468;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    background-color: #f8f9fa;
    border: none;
    border-radius: 0;
    position: relative;
    overflow: hidden;
}

    .consejo-card .card-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .consejo-card::before {
        content: '';
        position: absolute;
        top: 0;
        width: 75%;
        height: 100%;
        background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.3) 50%, rgba(255, 255, 255, 0) 100%);
        transform: skewX(-25deg);
        left: -100%;
        transition: left 0.35s ease-in-out;
    }

.consejo-card-link:hover .consejo-card::before {
    left: 100%;
}

.detalle-consejo-header {
    border-bottom: 3px solid var(--primary-color, #007bff);
    padding-bottom: 1rem;
    margin-bottom: 3rem;
}

    .detalle-consejo-header .lead {
        font-size: 1.15rem;
        color: #6c757d;
    }

.consejo-block {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: .5rem;
    padding: 2rem;
    margin-bottom: 1.5rem;
}

    .consejo-block h4 {
        font-weight: 600;
        color: var(--dark-color);
        margin-bottom: 1.5rem;
    }

.consejo-list {
    list-style: none;
    padding-left: 0;
}

.consejo-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.consejo-item-icon {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-right: 1rem;
    padding-top: 0.25rem;
}

.consejo-item-text {
    flex: 1;
}

    .consejo-item-text strong {
        display: block;
        margin-bottom: 0.25rem;
    }

.consejo-block-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: .200rem;
    min-height: 250px;
}

@media (max-width: 767.98px) {
    .consejo-block .col-md-4 {
        margin-bottom: 1.5rem;
    }
}

/* 21. PÁGINA DE VIOLENCIA DE GÉNERO */
.hero-section-vg {
    background-size: cover;
    background-position: center center;
    padding: 7rem 1.5rem;
    color: white;
    text-align: center;
    position: relative;
}

    .hero-section-vg h1 {
        font-size: 2.8rem;
        font-weight: 700;
        text-shadow: 0px 2px 8px rgba(0, 0, 0, 0.7);
    }

    .hero-section-vg .lead {
        text-shadow: 0px 2px 8px rgba(0, 0, 0, 0.5);
    }

.btn-emergency {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
    font-weight: bold;
    padding: 0.8rem 1.8rem;
    font-size: 1.1rem;
    border-radius: 30px;
    transition: background-color 0.3s;
}

    .btn-emergency:hover {
        background-color: #c82333;
    }

.card-denuncia {
    border-left: 4px solid #8a2be2;
    text-align: center;
    padding: 1.5rem;
    height: 100%;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

    .card-denuncia .card-icon {
        font-size: 2.5rem;
        color: #8a2be2;
    }

.bg-light-custom {
    background-color: #f8f9fa;
}

.list-group-item i {
    color: #198754;
}

.vg-footer h3 {
    color: #8a2be2;
    font-weight: bold;
}

/* 22. PÁGINA TELÉFONOS DE EMERGENCIA */
.emergency-container {
    padding: 20px 15px;
    max-width: 1200px;
    margin: 0 auto;
}

.page-title {
    font-weight: 700;
    color: #2c3e50;
}

.page-subtitle {
    font-size: 1.1rem;
    color: #555;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.emergency-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    padding: 20px 0;
}

.emergency-card {
    display: flex;
    align-items: center;
    padding: 20px;
    border-radius: 12px;
    text-decoration: none;
    color: #ffffff;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

    .emergency-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    }

.card-icon {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

    .card-icon img {
        width: 40px;
        height: 40px;
    }

.card-content {
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 0.9rem;
    font-weight: 400;
    margin: 0;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

.card-number {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.1;
}

.card-color-policia {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
}

.card-color-bomberos {
    background: #d32f2f;
}

.card-color-nino {
    background: linear-gradient(135deg, #26a69a, #80d8ff);
}

.card-color-defensa {
    background: #283593;
}

.card-color-nauticas {
    background: linear-gradient(135deg, #0288d1, #00d2ff);
}

.card-color-sanitarias {
    background: linear-gradient(135deg, #388e3c, #81c784);
}

.card-color-genero {
    background: linear-gradient(135deg, #8e24aa, #e53935);
}

.card-color-trata {
    background: linear-gradient(135deg, #455a64, #78909c);
}

.card-color-narco {
    background: #34495e;
}

/* 23. SECCIÓN DE DIRECCIONES GENERALES */
.direcciones-final-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
}

@media (min-width: 992px) {
    .direcciones-final-grid {
        grid-template-columns: repeat(2, 1fr);
    }

        .direcciones-final-grid .direccion-card-final:nth-child(odd):last-child {
            grid-column: span 2;
            justify-self: center;
        }
}

.direccion-card-final {
    border-radius: 10px;
    padding: 0;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04), 0 8px 30px rgba(0, 0, 0, 0.08);
    transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.35s cubic-bezier(0.25, 1, 0.5, 1);
    border: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

    .direccion-card-final:hover {
        transform: translateY(-10px);
        box-shadow: 0 8px 15px rgba(0, 0, 0, 0.05), 0 15px 40px rgba(0, 0, 0, 0.1);
    }

.direccion-foto-final {
    position: relative;
    width: 100%;
    max-width: 260px;
    aspect-ratio: 1 / 1;
    margin: 0 auto 1.5rem auto;
}

    .direccion-foto-final::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border-radius: 50%;
        background-image: url('/img/institucional/escudo-fondo-sutil.png');
        background-size: cover;
        background-position: center;
        opacity: 0.3;
        transition: opacity 0.3s ease;
    }

    .direccion-foto-final img {
        position: relative;
        width: 100%;
        height: 100%;
        border-radius: 50%;
        object-fit: cover;
        border: 5px solid #ffffff;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    }

.direccion-card-final:hover .direccion-foto-final::before {
    opacity: 0.6;
}

.direccion-nombre-final {
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 1.2rem;
    color: #495057;
    margin-bottom: 2rem;
    line-height: 1.5;
    letter-spacing: 0.5px;
}

.persona-info {
    margin-bottom: 1.5rem;
}

.persona-cargo {
    font-family: 'Poppins', sans-serif;
    font-size: 0.75rem;
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 0.5rem;
}

.persona-nombre {
    font-family: 'Poppins', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
}

.direccion-contacto-final {
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid #f0f0f0;
    font-size: 0.9rem;
    color: #6c757d;
    font-family: 'Poppins', sans-serif;
}

/* 23.1. MEJORA CREATIVA: BORDE ANIMADO PARA TARJETAS DE DIRECCIÓN */
.direccion-card-final::before {
    content: "";
    position: absolute;
    width: 150%;
    height: 150%;
    background-image: conic-gradient( #8b7c1ee5 20deg, transparent 120deg );
    animation: rotar 4s linear infinite;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes rotar {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(-360deg);
    }
}

.direccion-card-final::after {
    content: "";
    position: absolute;
    width: calc(100% - 6px);
    height: calc(100% - 6px);
    background-color: #f5f5f5;
    background-image: url("https://www.transparenttextures.com/patterns/french-stucco.png");
    border-radius: 10px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.card-content-wrapper {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    text-align: center;
    padding: 2.5rem;
}

/* 24. TARJETAS DE NOTICIAS MODERNAS */
.noticia-card-link {
    text-decoration: none;
    display: block;
    height: 100%;
}

.noticia-card {
    position: relative;
    overflow: hidden;
    border-radius: 5px;
    background-size: cover;
    background-position: center;
    min-height: 420px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

    .noticia-card:hover {
        transform: scale(1.03);
        box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    }

    .noticia-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,0.85) 100%);
        z-index: 1;
        transition: background 0.35s ease;
    }

    .noticia-card:hover::before {
        background: linear-gradient(180deg, rgba(0,0,0,0.1) 30%, rgba(0,0,0,0.95) 100%);
    }

.noticia-card-content {
    position: relative;
    z-index: 2;
    color: #ffffff;
    padding: 1.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.noticia-card-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.4;
    text-shadow: 0px 2px 5px rgba(0, 0, 0, 0.7);
    margin: 0;
}

.noticia-card-fecha {
    font-family: 'Poppins', sans-serif;
    font-size: 0.8rem;
    font-weight: 400;
    margin-top: 0.75rem;
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 25. TARJETAS DE NOTICIAS PARA PÁGINA DE LISTADO */
.noticia-list-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.noticia-list-card {
    display: flex;
    flex-direction: column;
    border: 1px solid #e9ecef;
    border-radius: 5px;
    overflow: hidden;
    background-color: #ffffff;
    height: 100%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
    transition: box-shadow 0.3s ease-in-out, transform 0.3s ease-in-out;
}

    .noticia-list-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    }

.noticia-list-card-img-container {
    width: 100%;
    height: 220px;
}

.noticia-list-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.noticia-list-card-link:hover .noticia-list-card-img {
    transform: scale(1.05);
}

.noticia-list-card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
}

.noticia-list-card-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--dark-color);
}

.noticia-list-card-text {
    font-size: 0.95rem;
    color: #6c757d;
    line-height: 1.6;
}

.noticia-list-card-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.noticia-list-card-readmore {
    font-weight: 600;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

.noticia-list-card-link:hover .noticia-list-card-readmore {
    color: var(--dark-color);
}

@media (min-width: 768px) {
    .noticia-list-card {
        flex-direction: row;
    }

    .noticia-list-card-img-container {
        width: 300px;
        height: auto;
        flex-shrink: 0;
    }
}

/* 26. SECCIÓN DE ESTADÍSTICAS */
.stats-tabs .nav-link {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.3);
    margin: 0 5px;
    border-radius: 30px;
    padding: 0.5rem 1.5rem;
    transition: all 0.3s ease;
}

    .stats-tabs .nav-link:hover, .stats-tabs .nav-link.active {
        color: var(--dark-color);
        background-color: #ffffff;
        border-color: #ffffff;
    }

.stat-block {
    padding: 2rem 1rem;
    height: 100%;
}

    .stat-block .stat-number {
        font-size: 3rem;
        font-weight: 700;
        color: #ffffff;
        line-height: 1.1;
        margin-bottom: 0.75rem;
    }

    .stat-block .stat-label {
        font-size: 1rem;
        color: rgba(255, 255, 255, 0.8);
        margin: 0;
    }

.tab-content .tab-pane {
    transition: opacity 0.4s ease-in-out;
}

/* 27. SECCIÓN "CAÍDOS EN DEBER" */
.caidos-header {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    text-align: center;
    color: #ffffff;
    padding: 4rem 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.caidos-header-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.caidos-header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.10);
    z-index: 2;
}

.caidos-header-content {
    position: relative;
    z-index: 3;
    max-width: 800px;
}

    .caidos-header-content h3 {
        font-family: 'Poppins', sans-serif;
        font-size: 2.8rem;
        font-weight: 700;
        color: #ffffff;
        text-shadow: -1px -1px 0 rgba(0,0,0,0.7), 1px -1px 0 rgba(0,0,0,0.7), -1px 1px 0 rgba(0,0,0,0.7), 1px 1px 0 rgba(0,0,0,0.7), 0px 4px 10px rgba(0,0,0,0.8);
    }

    .caidos-header-content .lead {
        font-size: 1.1rem;
        color: #ffffff;
        text-shadow: -1px -1px 0 rgba(0,0,0,0.7), 1px -1px 0 rgba(0,0,0,0.7), -1px 1px 0 rgba(0,0,0,0.7), 1px 1px 0 rgba(0,0,0,0.7), 0px 2px 8px rgba(0,0,0,0.8);
    }

.caidos-honor-roll {
    margin-top: 3rem !important;
}

/* 28. SECCIÓN "MUSICA VIDEO HEADER" */
.btn-audio-hero {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 10;
    width: 50px;
    height: 50px;
    font-size: 18px;
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.7);
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

    .btn-audio-hero:hover {
        background-color: rgba(0, 0, 0, 0.5);
        transform: scale(1.1);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    }

    .btn-audio-hero .fa-pause {
        display: none;
    }

    .btn-audio-hero.playing .fa-play {
        display: none;
    }

    .btn-audio-hero.playing .fa-pause {
        display: block;
    }

/* 29. SECCIÓN "VIOLENCIA DE GENERO" */
.violencia-genero-section .section-title {
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

    .violencia-genero-section .section-title::after {
        content: '';
        display: block;
        width: 70px;
        height: 3px;
        background-color: #0d6efd;
        position: absolute;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
    }

.violencia-genero-section .legal-framework-card {
    background-color: #f8f9fa;
    border: none;
    border-left: 5px solid #0d6efd;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

    .violencia-genero-section .legal-framework-card .card-title {
        font-weight: 600;
        color: #343a40;
    }

.violencia-genero-section .violence-type-badge {
    font-size: 1rem;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: 50rem;
    background-color: #eef2ff;
    color: #435ebe;
    transition: all 0.2s ease-in-out;
}

    .violencia-genero-section .violence-type-badge:hover {
        background-color: #0d6efd;
        color: #fff;
        transform: translateY(-3px);
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
    }

/* 29. SECCIÓN "NOTIFICACION DE EVENTO" */
#eventToast {
    background-color: transparent;
    border: none;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    border-radius: 0.375rem;
    width: 90%;
    max-width: 500px;
}

    #eventToast .toast-body {
        border-radius: inherit;
    }

    #eventToast .btn-close {
        position: absolute;
        top: 4%;
        right: 4%;
        z-index: 10;
        width: 2.5rem;
        height: 2.5rem;
        padding: 0;
        background-color: rgba(0, 0, 0, 0.5);
        border-radius: 50%;
        opacity: 0.8;
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e");
    }

        #eventToast .btn-close:hover {
            background-color: rgba(0, 0, 0, 0.8);
            opacity: 1;
        }

    #eventToast img {
        border-radius: inherit;
        display: block;
        width: 100%;
    }

    #eventToast .btn-event-info {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        bottom: 12%;
        font-weight: bold;
        font-size: 1.25rem;
        padding: 0.8rem 2.5rem;
        white-space: nowrap;
        border-radius: 50rem;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
        transition: all 0.2s ease-in-out;
        animation: pulse 1.5s infinite ease-in-out;
    }

        #eventToast .btn-event-info:hover {
            transform: translateX(-50%) translateY(-3px);
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
            animation: none;
        }

@media (min-width: 992px) {
    #eventToast {
        max-width: 600px !important;
    }
}

@keyframes slideInUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

#eventToast.show {
    animation: slideInUp 0.5s ease-out forwards;
}

@media (max-width: 991.98px) {
    #eventToast .btn-event-info {
        font-size: 1rem;
        padding: 0.6rem 1.5rem;
    }
}

@keyframes pulse {
    0% {
        transform: translateX(-50%) scale(1);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }

    50% {
        transform: translateX(-50%) scale(1.05);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    }

    100% {
        transform: translateX(-50%) scale(1);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }
}

/* 29. SECCIÓN "ASIDE NOTICIAS" */
.sidebar-aside {
    position: sticky;
    top: 20px;
    margin-top: 2rem;
}

    .sidebar-aside .sidebar-title {
        font-size: 1.25rem;
        font-weight: 600;
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
        border-bottom: 2px solid #e9ecef;
    }

    .sidebar-aside a img {
        transition: opacity 0.3s ease;
    }

    .sidebar-aside a:hover img {
        opacity: 0.85;
    }

/* 30. ESTILO AUDITORIA INDEX */
.table-fixed-layout {
    table-layout: fixed;
    width: 100%;
}

.audit-details-cell {
    word-wrap: break-word;
    white-space: normal !important;
}
