@import url('https://fonts.googleapis.com/css2?family=Roboto+Condensed:ital,wght@0,100..900;1,100..900&display=swap');

body {
    font-family: "Roboto Condensed", sans-serif;
    background-color: #f4f7f6;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

/* Menú Superior Sticky */
.sticky-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    padding: 0; 
}

.header-top {
    padding: 10px 0; 
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    flex-wrap: wrap;
    gap: 15px;
}

/* Logo Municipalidad */

.logo-header {
    height: 40px;
    width: auto;
    display: block;
    transition: transform 0.3s ease;
}

.logo-header:hover {
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .header-content {
        justify-content: center;
    }
}

/* Enlaces de Transparencia (Rojos) */
.link-item {
    text-align: left;
    font-size: 0.75em;
    color: red;
    text-decoration: none;
    line-height: 1.2;
    transition: opacity 0.3s;
}

.link-item:hover {
    opacity: 0.7;
}

.link-item strong {
    display: block;
    font-size: 1.1em;
    text-transform: uppercase;
}

/* Redes Sociales (Rojos) */
.social-icons {
    display: flex;
    gap: 10px;
}

.icon-circle {
    width: 30px;
    height: 30px;
    border: 2px solid red;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: red;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.icon-circle:hover {
    background-color: red;
    color: white;
}

/* Menú de Navegación Rojo */
.main-nav {
    background-color: red;
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 12px 0;
    margin: 0;
}

.nav-content {
    max-width: 1000px;
    width: 100%;
    display: flex;
    gap: 30px;
    padding: 0 20px;
}

.nav-item {
    color: white;
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9em;
}

.nav-item:hover {
    opacity: 0.8;
}

.enlace {
    text-decoration: none;
    color: red;
}
/* Contenedor Principal */
.main-content {
    margin-top: 150px;
    background-color: #ffffff;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    max-width: 450px;
    width: 90%;
    text-align: center;
    margin-bottom: 40px;
}

.logo {
    max-width: 200px;
    margin-bottom: 30px;
    height: auto;
}

/* Botón de Pago */
.btn-pago {
    display: inline-block;
    background-color: #007bff;
    color: white;
    padding: 18px 30px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1.1em;
    transition: transform 0.2s;
    margin-bottom: 20px;
}

.btn-pago:hover {
    transform: scale(1.03);
    background-color: #0056b3;
}

/* Mensaje de Renovación */
.mensaje-renovacion {
    margin-top: 25px;
    padding: 15px;
    background-color: #f8f9fa;
    border-left: 5px solid red;
    color: #555;
    font-style: italic;
    font-size: 0.95em;
    margin-bottom: 20px;
}

/* Contacto Footer */
.contacto-footer {
    font-size: 0.9em;
    color: #666;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

/* Imagen Banners */

.banner-adaptable {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
    border-radius: 8px;
    
    box-shadow: 0 4px 8px rgba(0,0,0,0.1); 
    transition: all 0.3s ease;
}

.banner-adaptable:hover {
    transform: translateY(-5px); 
    box-shadow: 0 12px 20px rgba(0,0,0,0.2); 
    filter: brightness(1.05);
}

/* Para videos concejos */
.main-content-wide {
    margin-top: 160px;
    background-color: #ffffff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    max-width: 1100px;
    width: 95%;
    text-align: center;
    margin-bottom: 40px;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.video-card {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid #eee;
    transition: transform 0.3s ease;
}

.video-card:hover {
    transform: translateY(-5px);
}

.video-responsive {
    overflow: hidden;
    padding-bottom: 56.25%;
    position: relative;
    height: 0;
}

.video-responsive iframe {
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    position: absolute;
    border-radius: 5px;
}

/* Organigrama */

.cab-org {
    padding-bottom: 20px;
    text-align: center;
}

#chart-container {
    width: 100%;
    height: 800px;
    background-color: white;
    border: 1px solid #d1d1d1;
    border-radius: 12px;
}

.node-foreign-object-div {
    background-color: #ffffff !important;
    border: 2px solid #3498db !important;
    border-radius: 15px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important; 
    overflow: visible !important;
}

.node-name {
    color: #2C3E50 !important;
    font-weight: bold;
    font-size: 13px;
    text-align: center;
    margin-top: 50px;
    padding: 0 10px;
}

.button-group {
    transition: transform 0.2s;
}

.button-group:hover circle {
    fill: #3498db !important;
    stroke: #2980b9 !important;
}

.button-group:hover text {
    fill: #ffffff !important;
}

.node-foreign-object {
    overflow: visible !important;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none; /* Oculto por defecto */
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(3px);
}

/* modal organigrama */
.modal-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    
    /* ESTO ASEGURA EL CENTRADO DE LOS ELEMENTOS HIJOS */
    display: flex;
    flex-direction: column;
    align-items: center; /* Centra horizontalmente imagen, título y funcionario */
    
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    animation: fadeIn 0.3s ease;
}

#modalDesc {
    width: 100%;
    text-align: justify; /* Esto justifica el texto */
    margin-top: 15px;
    padding: 0 10px;    /* Un poco de margen lateral para que no toque los bordes */
    box-sizing: border-box;
}

.contenido-html-externo {
    text-align: justify;
    line-height: 1.6; /* Mejora la lectura en texto justificado */
    margin-bottom: 12px;
}

.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #3498db;
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #2980b9;
}

.modal-content div {
    text-align: left; /* Alineamos el contenido del archivo HTML a la izquierda */
}

.modal-content ul {
    text-align: left;
    padding-left: 20px;
    margin-top: 10px;
}

.modal-content li {
    margin-bottom: 8px;
    color: #555;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #95a5a6;
}

.modal-content img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid #3498db;
    margin-bottom: 15px;
}

.modal-content h3 { margin: 10px 0; color: #2C3E50; }
.modal-content p { color: #7f8c8d; line-height: 1.6; }

/***************/

/* Contenedor de Gastos */
.gastos-container {
    text-align: left;
    max-width: 600px;
    margin: 20px auto;
}

.anio-titulo {
    color: red;
    border-bottom: 2px solid #eee;
    padding-bottom: 5px;
    margin-bottom: 15px;
}

/*.lista-descargas {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.item-descarga {
    display: flex;
    align-items: center;
    background-color: #f9f9f9;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    font-weight: bold;
    transition: all 0.2s ease;
    border: 1px solid #eee;
}

.item-descarga:hover {
    background-color: #f0f0f0;
    transform: translateX(5px);
    border-color: red;
    color: red;
}*/

/*.pdf-icon {
    font-size: 1.5em;
    color: #e74c3c;
    margin-right: 15px;
}*/

.pdf-icon {
    color: #e74c3c;
    margin-right: 12px;
}

/* Estilos del Acordeón */
.acordeon-item {
    max-width: 600px;
    margin: 10px auto;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    background-color: #fff;
}

.acordeon-header {
    width: 100%;
    padding: 15px 20px;
    background-color: #f9f9f9;
    border: none;
    outline: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    color: red; /* Color año solicitado */
    transition: background-color 0.3s;
}

.acordeon-header:hover {
    background-color: #f0f0f0;
}

.icon-arrow {
    transition: transform 0.3s ease;
}

/* Control del despliegue */
.acordeon-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    background-color: #fff;
}

.acordeon-item.active .acordeon-content {
    max-height: 1000px; /* Suficiente para todos los meses */
    padding: 15px;
}

.acordeon-item.active .icon-arrow {
    transform: rotate(180deg);
}

.lista-descargas {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.item-descarga {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background-color: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 5px;
    text-decoration: none;
    color: #444;
    transition: all 0.2s;
}

.item-descarga:hover {
    background-color: #fef1f1;
    border-color: red;
    color: red;
}