/* * ESTILOS OBSERVATORIO KATA - VERSIÓN FINAL CONSOLIDADA
 * Ubicación: public/css/kata-observatorio.css
 */

/* 1. Variables y Configuración Base */
:root {
    --kata-purple: #7b2cbf;
    --kata-purple-light: #f3e5f5;
    --kata-dark: #121212;
    --kata-sidebar-width: 280px;
    --kata-red: #e23d2f;
    --toolbar-height: 65px;
}

body {
    background-color: #f8f9fa;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    margin: 0;
    padding: 0 !important;
    overflow: hidden;
}

/* 2. SIDEBAR */
#sidebar {
    width: var(--kata-sidebar-width);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background: var(--kata-dark);
    color: white;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

#sidebar.collapsed {
    transform: translateX(-100%);
}

.sidebar-header {
    padding: 20px 10px;
    text-align: center;
    background: #1d1c1c;
    border-bottom: 2px solid var(--kata-purple);
}

.sidebar-logo {
    width: 90%;
    max-width: 240px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.nav-kata {
    flex-grow: 1;
    padding: 1.5rem 0;
    overflow-y: auto;
}

.nav-kata .nav-link {
    color: rgba(255, 255, 255, 0.6);
    padding: 0.85rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 500;
    text-decoration: none;
    border-left: 4px solid transparent;
    transition: all 0.2s ease;
}

.nav-kata .nav-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.nav-kata .nav-link.active {
    color: white;
    background: rgba(123, 44, 191, 0.15);
    border-left-color: var(--kata-purple);
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* 3. CONTENIDO PRINCIPAL */
#main-wrapper {
    margin-left: var(--kata-sidebar-width);
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    width: calc(100% - var(--kata-sidebar-width));
    transition: margin-left 0.3s ease, width 0.3s ease;
}

#main-wrapper.expanded {
    margin-left: 0;
    width: 100%;
}

.top-toolbar {
    height: var(--toolbar-height);
    background: white;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    z-index: 1000;
}

.toggle-btn {
    background: transparent;
    border: none;
    padding: 0.5rem;
    font-size: 1.5rem;
    color: var(--kata-dark);
    cursor: pointer;
    outline: none !important;
}

#sections-container {
    flex-grow: 1;
    width: 100%;
    overflow-y: auto;
    background-color: #f8f9fa;
    position: relative;
}

.kata-section-page {
    width: 100%;
    padding: 3rem 0;
    min-height: 100%;
}

.section-inner {
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 2.5rem;
}

/* 4. COMPONENTES MEMORIAL */
.memorial-item {
    margin-bottom: 60px;
    background: white;
    border-radius: 40px;
    padding: 50px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.03);
    overflow: hidden;
    border: 1px solid rgba(123, 44, 191, 0.05);
}

.memorial-photo-wrap {
    float: right;
    width: 300px;
    height: auto;
    margin-left: 35px;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

.memorial-photo-rect {
    width: 100%;
    height: auto;
    max-height: 450px;
    object-fit: contain;
    border-radius: 15px;
    display: block;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.memorial-name-title {
    color: var(--kata-purple);
    font-size: 1.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.memorial-date-label {
    color: #000000;
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: block;
    margin-bottom: 25px;
}

.memorial-text-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #444;
    text-align: justify;
}

.memorial-footer-quote {
    font-family: 'Georgia', serif;
    font-style: italic;
    font-size: 1.3rem;
    color: var(--kata-purple);
    padding: 25px;
    background: #fbf8ff;
    border-radius: 20px;
    display: block;
    margin-top: 35px;
    border-left: 6px solid var(--kata-purple);
    clear: both;
}

/* 5. DASHBOARD BI */
#dashboard-full {
    height: calc(100vh - var(--toolbar-height));
    width: 100%;
    overflow: hidden;
    background: #121212;
}

#sections-container:has(#dashboard-full) {
    overflow: hidden !important;
}

.dashboard-container {
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
}

.dashboard-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    margin-bottom: -5px;
}

/* 6. LÍNEA DE TIEMPO */
.timeline-container {
    position: relative;
    padding: 20px 0;
}

.timeline-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    height: 100%;
    width: 4px;
    background: #e9ecef;
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
    padding-left: 60px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 12px;
    height: 20px;
    width: 20px;
    background: white;
    border: 4px solid var(--kata-purple);
    border-radius: 50%;
    z-index: 1;
}

.timeline-content {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border-left: 5px solid var(--kata-purple);
    transition: transform 0.2s ease;
}

.timeline-content:hover {
    transform: translateY(-3px);
}

.timeline-municipio {
    display: inline-block;
    padding: 2px 12px;
    background: var(--kata-purple-light);
    color: var(--kata-purple);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    margin-bottom: 10px;
    text-transform: uppercase;
}

/* 7. TARJETAS DE FORMULARIOS */
.card-custom {
    background: white;
    border-radius: 20px !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05) !important;
    transition: all 0.3s ease;
}

/* 8. RUTAS DE ATENCIÓN */
.line-purple {
    width: 80px;
    height: 4px;
    background-color: var(--kata-purple);
    border-radius: 2px;
}

.card-ruta-general {
    border-left: 6px solid var(--kata-purple) !important;
}

.card-municipio {
    transition: all 0.3s ease;
    border: 1px solid rgba(123, 44, 191, 0.05);
}

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

.badge-muni-count,
.badge-muni {
    background-color: var(--kata-purple-light);
    color: var(--kata-purple);
}

.box-80 {
    width: 80px;
    height: 80px;
}

.ruta-icon-box {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 8px;
}

.bg-soft-purple {
    background-color: rgba(123, 44, 191, 0.12) !important;
}

.bg-soft-danger {
    background-color: rgba(226, 61, 47, 0.08) !important;
}

.ruta-item-list {
    transition: background 0.2s;
}

.ruta-item-list:hover {
    background-color: var(--kata-purple-light) !important;
    cursor: pointer;
}

.ruta-img-thumb,
.object-fit-cover {
    object-fit: cover;
}

.ruta-meta-text {
    font-size: 0.75rem;
}

.ruta-btn-action-view {
    border-color: var(--kata-purple);
    color: var(--kata-purple);
}

.ruta-btn-action-view:hover {
    background-color: var(--kata-purple);
    color: white;
}

.ruta-btn-action-download {
    background-color: var(--kata-purple);
    width: 32px;
    height: 32px;
}

/* Lógica de expandir/colapsar para "Ver más" */
.btn-toggle-muni[aria-expanded="true"] .txt-expand {
    display: none;
}

.btn-toggle-muni[aria-expanded="true"] .txt-collapse {
    display: inline-block !important;
}

/* Modales */
.modal-img-preview {
    max-height: 85vh;
    object-fit: contain;
}

/* 9. UTILIDADES Y RESPONSIVIDAD */
.text-purple {
    color: var(--kata-purple);
}

.bg-purple {
    background-color: var(--kata-purple);
}

.border-purple {
    border-color: var(--kata-purple) !important;
}

.text-justify {
    text-align: justify;
}

#sections-container::-webkit-scrollbar {
    width: 8px;
}

#sections-container::-webkit-scrollbar-thumb {
    background: var(--kata-purple);
    border-radius: 10px;
}

@media (max-width: 991px) {
    #sidebar {
        transform: translateX(-100%);
    }

    #sidebar.show {
        transform: translateX(0);
    }

    #main-wrapper {
        margin-left: 0;
        width: 100%;
    }

    .memorial-photo-wrap {
        float: none;
        width: 100%;
        max-width: 280px;
        margin: 0 auto 30px auto;
    }
}

/* 10. CRÉDITOS Y LOGOS */
.credits-box {
    margin-top: 5rem;
    padding-top: 3rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.logo-funding-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 50px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.logo-funding {
    max-height: 70px;
    width: auto;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.4s ease;
}

.logo-funding:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.05);
}