/* --- CONFIGURACIÓN GENERAL --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary-color: #0e430c;    /* Verde */
    --secondary-color: #0e430c;  /* Verde */
    --accent-color: #27ae60;     /* Verde éxito */
    --bg-light: #f4f7f6;
    --text-dark: #333;
    --white: #ffffff;
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

/* --- HEADER Y NAVEGACIÓN --- */
header {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(6, 93, 19, 0.1);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: var(--accent-color);
}

/* --- SECCIÓN HERO --- */
.hero-flex {
    background: linear-gradient(rgba(58, 60, 59, 0.8), rgba(73, 85, 79, 0.8)), 
                url('municipalidades.png') center center;
    background-size: 100% auto; /* El 100% asegura que cubra todo lo ancho */
    background-repeat: no-repeat;
    color: white;
    padding: 70px 0;
    width: 100%; /* Asegura que el contenedor use todo el espacio disponible */
}

.flex-container {
    display: flex;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}

.hero-text {
    flex: 1;
    min-width: 300px;
}

.hero-text h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.hero-image {
    flex: 1;
    min-width: 300px;
}

/* --- SECCIONES Y TARJETAS --- */
.content-section {
    padding: 60px 0;
}

.center {
    text-align: center;
    margin-bottom: 30px;
}

.card-main {
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    margin-bottom: 40px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.card {
    background: var(--white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-5px);
}

.icon {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 15px;
}

/* --- GRID DE MUNICIPALIDADES (FACEBOOK STYLE) --- */
.fb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.fb-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: 0.3s;
    border: 1px solid #ddd;
}

.fb-card:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.fb-card-img img {
    width: 100%;
    height: 150px;
    object-fit: contain; /* Para no deformar escudos */
    background: #f9f9f9;
    padding: 10px;
}

.fb-card-content {
    padding: 15px;
    text-align: center;
}

.fb-icon-inline {
    color: #1877f2; /* Azul Facebook */
    margin-bottom: 5px;
}

/* --- FOOTER --- */
footer {
    background: var(--primary-color);
    color: white;
    text-align: center;
    padding: 30px 0;
    margin-top: 50px;
}

/* --- UNIDADES (HIDDEN BY DEFAULT) --- */
.unidad-detalle {
    display: none;
    padding: 20px;
    background: #e8f4fd;
    border-left: 5px solid var(--accent-color);
    margin-top: 20px;
    border-radius: 4px;
}

/* --- RESPONSIVIDAD --- */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
    }
    
    nav ul {
        margin-top: 20px;
    }
    
    nav ul li {
        margin: 0 10px;
    }

    .hero-text h2 {
        font-size: 1.8rem;
    }


}
