/* =========================================
   VARIABLES & RESET
   ========================================= */
:root {
    --primary: #1e4a90;
    --primary-dark: #0f2c5c;
    --accent: #f7d417;
    --accent-hover: #e6c115;
    --bg-light: #f4f7fa;
    --surface: #ffffff;
    --text-main: #1c1c1c;
    --text-secondary: #666666;
    --radius: 24px;
    --shadow: 0 12px 40px -12px rgba(0, 37, 69, 0.1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.2;
}

a { text-decoration: none; transition: all 0.3s ease; }
ul { list-style: none; }

/* =========================================
   HERO SECTION (BIENVENIDA)
   ========================================= */
.hero-section {
    position: relative;
    height: 90vh; /* Ocupa casi toda la pantalla */
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url('img/laura-cea1.jpg'); /* Asegúrate que la imagen es alta calidad */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding: 20px;
    text-align: center;
    margin-bottom: -50px; /* Efecto de superposición con la siguiente sección */
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(30, 74, 144, 0.4), rgba(30, 74, 144, 0.8));
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    color: white;
    animation: fadeUp 1s ease-out;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 5vw, 5rem);
    color: white;
    margin-bottom: 20px;
    text-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.btn-hero {
    display: inline-block;
    padding: 16px 40px;
    background: var(--surface);
    color: var(--primary);
    font-weight: 700;
    border-radius: 50px;
    font-size: 1.1rem;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.btn-hero:hover {
    transform: translateY(-3px);
    background: var(--accent);
    color: var(--primary-dark);
}

/* =========================================
   PROPUESTAS (Renovación Liquid Glass)
   ========================================= */
.proposals-strip {
    position: relative;
    z-index: 10;
    max-width: 1200px;
    
    /* CAMBIO AQUÍ: Subimos el bloque 140px hacia arriba */
    margin: -100px auto 60px; 
    
    padding: 0 20px;
    pointer-events: none; /* Esto permite clicar a través de los huecos vacíos si fuera necesario */
}

/* Aseguramos que los elementos interactivos sí reciban clics */
.proposals-strip > * {
    pointer-events: auto;
}

.proposals-container {
    /* Efecto Cristal Helado */
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    
    border-radius: 30px; /* Bordes más redondeados */
    padding: 35px;
    
    /* Borde sutil y sombra profunda */
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 
        0 20px 50px -10px rgba(30, 74, 144, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
        
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 20px;
    transition: transform 0.3s ease;
}


.proposal-btn {
    background: transparent;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 15px;
    border-radius: 20px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}

.proposal-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(145deg, #ffffff, #e6efff);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s;
    border-radius: 20px;
}

.proposal-btn:hover::before {
    opacity: 1;
}

.proposal-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(30, 74, 144, 0.1);
}

.proposal-icon {
    width: 64px;
    height: 64px;
    border-radius: 22px; /* Squircle shape */
    background: linear-gradient(135deg, #eef4ff 0%, #dbe9ff 100%);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Efecto rebote */
    box-shadow: inset 0 2px 5px rgba(255,255,255,1), 0 5px 10px rgba(30,74,144,0.05);
}

.proposal-btn:hover .proposal-icon {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--accent);
    transform: scale(1.1) rotate(-3deg);
    box-shadow: 0 10px 25px rgba(30, 74, 144, 0.3);
}

.proposal-label {
    font-weight: 700;
    color: var(--primary);
    font-size: 0.9rem;
    letter-spacing: -0.3px;
}

/* =========================================
   GRID PRINCIPAL (Estilo Glass Cards)
   ========================================= */
.main-grid {
    max-width: 1300px;
    margin: 0 auto 80px;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 30px;
}

/* Tarjetas Genéricas Renovadas */
.card {
    background: #ffffff;
    border-radius: 28px;
    padding: 35px;
    
    /* Sombra suave y difusa */
    box-shadow: 
        0 2px 10px rgba(0,0,0,0.02), 
        0 15px 40px -5px rgba(30,74,144,0.08);
    
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.5);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Efecto de borde brillante sutil en hover */
.card:hover {
    box-shadow: 
        0 20px 50px -10px rgba(30,74,144,0.15);
    border-color: rgba(30,74,144,0.1);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 30px;
    position: relative;
    z-index: 2;
}
.card-title { font-size: 2rem; margin: 0; letter-spacing: -1px; }
.card-subtitle { color: var(--text-secondary); font-size: 1rem; margin-top: 5px; display: block; }

/* Distribución del Grid */
.span-8 { grid-column: span 8; }
.span-4 { grid-column: span 4; }
.span-6 { grid-column: span 6; }
.span-12 { grid-column: span 12; }

@media (max-width: 1024px) {
    .span-8, .span-4, .span-6 { grid-column: span 12; }
}

/* Corrección para Iniciativas */
.initiative-item {
    display: block; /* <--- ESTA es la clave: convierte el enlace en una caja sólida */
    background: #f8fbff;
    border-radius: 12px; /* Reducimos un poco el radio para que el borde encaje mejor */
    padding: 20px;
    margin-bottom: 15px;
    border-left: 5px solid var(--primary); /* Borde vertical sólido */
    text-decoration: none; /* Quita el subrayado por defecto de los enlaces */
    box-shadow: 0 2px 5px rgba(0,0,0,0.03); /* Sombra suave para dar profundidad */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.initiative-item:hover {
    transform: translateX(5px);
    background: white;
    box-shadow: 0 8px 15px rgba(0,0,0,0.08);
}
.init-tags .tag { padding: 4px 12px; border-radius: 20px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; }
.tag.aprobada { background: #dcfce7; color: #166534; }
.tag.rechazada { background: #fee2e2; color: #991b1b; }
.tag.tramitacion { background: #fef9c3; color: #854d0e; }

/* Mapa Styles */
.map-wrapper svg { width: 100%; height: auto; filter: drop-shadow(0 5px 10px rgba(0,0,0,0.1)); }
.map-wrapper path { fill: #dce5f0; stroke: white; stroke-width: 1.5; transition: 0.3s; }
.map-wrapper path.concejo-activo { fill: var(--primary); cursor: pointer; }
.map-wrapper path.concejo-activo:hover, .map-wrapper path.concejo-activo.active { fill: var(--accent); }

/* Noticias Styles */
/* Noticias Styles - Ajuste de Altura */
.news-grid-internal { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
    gap: 20px; 
    /* Esto asegura que la rejilla empuje hacia abajo ocupando el espacio libre */
    flex: 1; 
    height: 100%;
}

.news-preview { 
    position: relative; 
    border-radius: 16px; 
    overflow: hidden; 
    /* CAMBIO: Aumentamos de 300px a 420px para mayor impacto vertical */
    height: 420px; 
    /* Opcional: Si prefieres que se estire automáticamente al 100% del padre:
       height: 100%; 
       min-height: 350px; 
    */
}

.news-preview img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; /* Crucial: recorta la imagen para llenar la caja sin deformarla */
    transition: transform 0.5s; 
}

.news-preview:hover img { 
    transform: scale(1.05); 
}

.news-overlay {
    position: absolute; 
    bottom: 0; 
    left: 0; 
    width: 100%;
    /* Degradado más alto para que el texto se lea bien sobre imágenes altas */
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.5) 60%, transparent 100%);
    padding: 25px; 
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

/* Contacto Compacto */
.contact-form-compact input, .contact-form-compact textarea {
    width: 100%;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    background: #f9f9f9;
    font-family: inherit;
}
.contact-form-compact input:focus, .contact-form-compact textarea:focus {
    outline: 2px solid var(--primary);
    background: white;
}
.btn-primary {
    width: 100%;
    padding: 15px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
}
.btn-primary:hover { background: var(--primary-dark); }

/* =========================================
   FOOTER
   ========================================= */
.modern-footer {
    background: var(--primary-dark);
    color: rgba(255,255,255,0.7);
    padding: 60px 20px 20px;
    text-align: center;
    margin-top: 60px;
}
.footer-logos { display: flex; justify-content: center; gap: 30px; margin-bottom: 40px; flex-wrap: wrap;}
.footer-logos img { height: 35px; opacity: 0.8; filter: grayscale(100%) brightness(200%); transition: 0.3s; }
.footer-logos img:hover { filter: none; opacity: 1; }

/* =========================================
   MODAL & ANIMATIONS
   ========================================= */
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* Fondo del Modal (Overlay) */
.proposal-modal {
    position: fixed;
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    z-index: 9999; 
    align-items: center; 
    justify-content: center;
    background: rgba(15, 44, 92, 0.6); /* Fondo semitransparente */
    backdrop-filter: blur(8px);         /* Efecto borroso */
    
    /* ESTADO INICIAL: Oculto pero "presente" para animar */
    opacity: 0;
    pointer-events: none; /* Evita clicks cuando es invisible */
    transition: opacity 0.3s ease; /* Transición suave del fondo */
}

/* Clase activa para mostrar el fondo */
.proposal-modal.open {
    opacity: 1;
    pointer-events: auto; /* Reactiva los clicks */
}
/* Contenido del Modal (Tarjeta) */
.proposal-modal-content {
    background: white;
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    position: relative; 
    max-width: 500px; 
    width: 90%;
    
    /* ESTADO INICIAL: Pequeño y transparente */
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); /* Rebote suave */
}

/* Clase activa para mostrar la tarjeta */
.proposal-modal.open .proposal-modal-content {
    transform: scale(1);
    opacity: 1;
}