/* =========================================
   PÁGINA INTERIOR: EDILES DEPARTAMENTALES
========================================= */
.seccion-ediles {
    width: 100%;
}

.descripcion-ediles {
    font-size: 1.05rem;
    color: var(--gris-oscuro);
    margin-bottom: 30px;
}

.bloque-partido {
    background-color: var(--blanco);
    border: 1px solid var(--gris-borde);
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 40px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.encabezado-partido {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid;
    padding-bottom: 15px;
    margin-bottom: 25px;
}

.encabezado-partido h3 {
    font-size: 1.5rem;
    font-weight: 800;
}

.cantidad-ediles {
    background-color: var(--gris-fondo);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    color: var(--texto-oscuro);
}

/* Colores representativos para los encabezados */
.encabezado-partido.pn { border-color: #4A90E2; color: #4A90E2; }
.encabezado-partido.fa { border-color: #D0021B; color: #D0021B; }

/* Grilla de Ediles */
.grilla-ediles {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* En móvil: 2 por fila */
    gap: 20px;
}

.tarjeta-edil {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer; /* Cambia el cursor a una manito */
    transition: transform 0.3s ease; /* Transición suave */
    padding: 10px;
    border-radius: 8px;
}

.tarjeta-edil:hover {
    transform: translateY(-5px); /* Efecto de elevarse al pasar el mouse */
    background-color: var(--gris-fondo);
}

.foto-edil-wrapper {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 10px;
    padding: 3px;
    background-color: var(--blanco);
    transition: transform 0.3s ease;
}

.tarjeta-edil:hover .foto-edil-wrapper {
    transform: scale(1.05); /* La foto hace un pequeño zoom */
}

/* Bordes coloridos según partido para la foto */
.foto-edil-wrapper.pn-border { border: 2px solid #4A90E2; }
.foto-edil-wrapper.fa-border { border: 2px solid #D0021B; }

.foto-edil-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.tarjeta-edil h4 {
    font-size: 0.9rem;
    color: var(--texto-oscuro);
    line-height: 1.2;
    margin-bottom: 4px;
}

.tarjeta-edil p {
    font-size: 0.75rem;
    color: var(--gris-oscuro);
    font-weight: 600;
}

/* =========================================
   MODAL DE INFORMACIÓN DEL EDIL
========================================= */
.modal-overlay-edil {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 100000; /* Aseguramos que esté por encima de todo */
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay-edil.activo {
    opacity: 1;
    visibility: visible;
}

.modal-contenido-edil {
    background-color: var(--blanco);
    width: 90%;
    max-width: 350px;
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    position: relative;
    transform: translateY(-30px);
    transition: transform 0.3s ease;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.modal-overlay-edil.activo .modal-contenido-edil {
    transform: translateY(0);
}

.btn-cerrar-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--gris-oscuro);
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
}

.btn-cerrar-modal:hover {
    color: var(--verde-oscuro);
}

/* Contenido dentro del modal */
.modal-foto-wrapper {
    width: 150px;
    height: 150px;
    margin: 0 auto 20px auto;
    border-radius: 50%;
    padding: 4px;
    background-color: var(--blanco);
}

.modal-foto-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.modal-nombre {
    font-size: 1.4rem;
    color: var(--texto-oscuro);
    font-weight: 800;
    margin-bottom: 5px;
}

.modal-cargo {
    font-size: 0.95rem;
    color: var(--gris-oscuro);
    font-weight: 600;
    margin-bottom: 20px;
}

.modal-partido-etiqueta {
    display: inline-block;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    margin-bottom: 15px;
    color: white;
}

/* Colores dinámicos que cambian con JS */
.modal-partido-etiqueta.pn-bg { background-color: #4A90E2; }
.modal-partido-etiqueta.fa-bg { background-color: #D0021B; }

.modal-lista-info {
    background-color: var(--gris-fondo);
    padding: 15px;
    border-radius: 8px;
    font-size: 0.95rem;
    border: 1px solid var(--gris-borde);
}

.modal-lista-info strong {
    font-size: 1.1rem;
    color: var(--texto-oscuro);
    display: block;
    margin-top: 5px;
}

/* Responsive: Tablets y PC */
@media (min-width: 768px) {
    .grilla-ediles {
        grid-template-columns: repeat(4, 1fr);
        gap: 25px;
    }
    .foto-edil-wrapper {
        width: 130px;
        height: 130px;
    }
    .tarjeta-edil h4 { font-size: 1rem; }
    .tarjeta-edil p { font-size: 0.85rem; }
}

@media (min-width: 1024px) {
    .grilla-ediles {
        grid-template-columns: repeat(5, 1fr);
    }
    .bloque-partido {
        padding: 40px;
    }
}