/* Estilos para Detalles Entidad Municipio */
/* Add these styles to make inner content fully responsive */

/* Make all elements respect container width */
.dem-grid,
.dem-card,
.dem-logos,
.dem-title,
.dem-back-button {
    max-width: 100%;
    box-sizing: border-box;
}

/* Fix for map iframe overflow */
.dem-map-container iframe {
    max-width: 100%;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Fix for long text content */
.dem-card p, 
.dem-person-email, 
.dem-address-text,
.dem-schedule-text {
    word-break: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

/* Make images responsive */
.dem-logos img,
.dem-transparency-icon,
.dem-contact-icon {
    max-width: 100%;
    height: auto;
}

/* Additional mobile optimizations */
@media (max-width: 768px) {
    /* Ensure grid doesn't overflow */
    .dem-grid {
        padding: 0;
        width: 100%;
    }
    
    /* Modify existing cards for better mobile display */
    .dem-card {
        padding: 0.8rem;
    }
    
    /* Make person images more compact */
    .dem-person-image {
        width: 120px;
        height: 160px;
    }
    
    /* Fix for email links */
    .dem-person-email {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    /* Even smaller images and tighter spacing */
    .dem-person-image {
        width: 100px;
        height: 140px;
    }
    
    /* Smaller icons */
    .dem-transparency-icon,
    .dem-contact-icon {
        max-width: 80px;
    }
    
    /* Smaller text */
    .dem-card-title {
        font-size: 1rem;
    }
    
    /* Ensure map stays contained */
    .dem-map-container {
        height: 120px;
    }
}
/* Sección de logos */
.dem-logos {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1rem;
}

.dem-logos img {
    max-width: 100%;
    height: auto;
}

/* Botón de volver */
.dem-back-button {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 15px 30px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    text-decoration: none;
    border-radius: 15px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.dem-back-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Título del departamento - Más llamativo */
.dem-title {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 2rem;
    color: #1a365d;
    position: relative;
    padding-bottom: 0.75rem;
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
    letter-spacing: 0.5px;
}

.dem-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background-color: #2980b9;
    border-radius: 2px;
}

/* Grid de secciones */
.dem-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Tarjetas de contenido */
.dem-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    padding: 1.5rem;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid rgba(0, 0, 0, 0.2); /* Borde más visible */
}

.dem-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    border-color: rgba(0, 0, 0, 0.3); /* Borde más oscuro al pasar el mouse */
}

.dem-card-title {
    color: #2c3e50;
    text-align: center;
    margin-top: 0;
    margin-bottom: 1.2rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid #f0f0f0;
    font-size: 1.3rem;
}

/* Estilos específicos para cada tipo de tarjeta */
.dem-card-description p {
    text-align: justify;
    line-height: 1.6;
}

/* Tarjeta de presentación */
.dem-card-person {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.dem-person-image {
    width: 180px;
    height: 240px;
    border-radius: 8px;
    object-fit: cover;
    border: 3px solid #000;
    margin-bottom: 1rem;
}

.dem-person-name {
    font-weight: bold;
    font-size: 1.2rem;
    margin: 0.5rem 0;
}

.dem-person-title {
    color: #7f8c8d;
    margin-bottom: 0.8rem;
}

.dem-person-email {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
}

.dem-person-email:hover {
    text-decoration: underline;
}

/* Tarjeta de contacto */
.dem-card-contact {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.dem-contact-icon {
    max-width: 50px;
    margin-bottom: 0.5rem;
}

/* Tarjeta de transparencia */
.dem-card-transparency {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.dem-transparency-icon {
    max-width: 150px;
    transition: transform 0.3s ease;
}

.dem-card-transparency:hover .dem-transparency-icon {
    transform: scale(1.05);
}

/* Tarjeta de dirección */
.dem-card-address {
    display: flex;
    flex-direction: column;
}

.dem-map-container {
    width: 100%;
    height: 200px;
    margin-bottom: 1rem;
    border-radius: 6px;
    overflow: hidden;
}

.dem-address-text {
    text-align: center;
    line-height: 1.5;
}

/* Tarjeta de horarios */
.dem-card-schedule {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.dem-schedule-icon {
    font-size: 2.5rem;
    color: #000;
    margin-bottom: 1rem;
}

.dem-schedule-text {
    text-align: center;
    font-size: 1.1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .dem-grid {
        grid-template-columns: 1fr;
    }
    
    .dem-title {
        font-size: 1.8rem;
    }
    
    /* Fix for person image overflow */
    .dem-person-image {
        width: 140px;
        height: 180px;
    }
    
    /* Reduce card padding for smaller screens */
    .dem-card {
        padding: 1rem;
    }
    
    /* Adjust font sizes */
    .dem-card-title {
        font-size: 1.1rem;
        margin-bottom: 0.8rem;
    }
    
    .dem-person-name {
        font-size: 1rem;
    }
    
    /* Adjust icons and containers */
    .dem-transparency-icon,
    .dem-contact-icon {
        max-width: 100px;
    }
    
    /* Ensure text stays within bounds */
    .dem-card-description p,
    .dem-address-text,
    .dem-schedule-text {
        max-width: 100%;
        overflow-wrap: break-word;
        word-wrap: break-word;
    }
    
    /* Add horizontal scrolling for any tables if they exist */
    table {
        display: block;
        width: 100%;
        overflow-x: auto;
    }
}

/* Extra responsive styles for very small screens */
@media (max-width: 480px) {
    .dem-card {
        padding: 0.8rem;
    }
    
    .dem-person-image {
        width: 120px;
        height: 160px;
    }
    
    .dem-title {
        font-size: 1.5rem;
    }
    
    .dem-map-container {
        height: 150px;
    }
}