/* --- VARIABLES --- */
:root {
    --gold: #D4AF37;       
    --navy: #1B263B;       
    --navy-light: #2C3E50;
    --white: #ffffff;
    --gray-bg: #F4F6F8;
    --green: #27ae60;
    --yellow: #f39c12;
    --red: #c0392b;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Lato', sans-serif; background: var(--gray-bg); color: #333; line-height: 1.6; }

h1, h2, h3 { font-family: 'Playfair Display', serif; color: var(--navy); }
a { text-decoration: none; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.text-center { text-align: center; }

/* HERO */
.hero-section {
    background: linear-gradient(rgba(27, 38, 59, 0.9), rgba(27, 38, 59, 0.8)), url('https://img.freepik.com/free-photo/low-angle-shot-church-ceiling_181624-9642.jpg?w=1380');
    background-size: cover; background-position: center;
    color: var(--white); padding: 80px 0; text-align: center;
    border-bottom: 5px solid var(--gold);
}
.hero-section h1 { font-size: 3rem; margin-bottom: 10px; line-height: 1.1; color: var(--white) !important; }
.slogan { font-size: 1.1rem; opacity: 0.9; font-weight: 300; color: var(--white); }

/* PROPÓSITO */
.section-proposito { padding: 50px 20px; background: var(--white); margin-top: -30px; border-radius: 8px; box-shadow: 0 5px 15px rgba(0,0,0,0.05); position: relative; z-index: 2; margin-bottom: 40px; }
.lead { font-size: 1.1rem; max-width: 800px; margin: 0 auto 30px auto; color: #555; }

/* BOTONES */
.btn-gold { display: inline-block; background: var(--gold); color: var(--navy); padding: 12px 25px; border-radius: 4px; font-weight: bold; transition: 0.3s; }
.btn-gold:hover { background: #b39225; }
.btn-blue { display: inline-block; background: var(--navy); color: var(--white); padding: 10px 20px; border-radius: 4px; transition: 0.3s; }
.btn-blue:hover { background: var(--navy-light); }

/* PRINCIPIOS */
.section-principios { background: #E9ECEF; padding: 50px 0; text-align: center; }
.principios-preview { display: flex; justify-content: center; gap: 30px; margin-top: 30px; flex-wrap: wrap; }
.pilar-icon { width: 100px; font-size: 0.9rem; font-weight: bold; color: var(--navy); }
.pilar-icon i { font-size: 2.2rem; color: var(--gold); margin-bottom: 10px; display: block; }
.mt-20 { margin-top: 30px; }

/* PARTIDOS */
.section-partidos { padding: 40px 20px; margin-bottom: 40px; }
.header-divider { text-align: center; margin-bottom: 30px; border-bottom: 1px solid #ddd; padding-bottom: 20px; }
.subtext { color: #666; font-size: 0.95rem; margin-top: 5px; }

.partidos-grid-layout { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; } 

.party-card {
    background: var(--white); border-radius: 8px; padding: 20px; text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); border-top: 4px solid #ccc; transition: transform 0.2s;
    display: flex; flex-direction: column; align-items: center;
}
.party-card:hover { transform: translateY(-5px); box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
.party-logo { width: 70px; height: 70px; object-fit: contain; margin-bottom: 10px; }
.party-name { font-weight: bold; font-size: 1rem; color: var(--navy); margin-bottom: 5px; line-height: 1.2; }
.party-rating { font-size: 0.75rem; font-weight: bold; padding: 2px 8px; border-radius: 10px; display: inline-block; color: white; margin-bottom: 10px; }

/* NUEVO: ESTILO PARA LA RAZÓN DE LA CALIFICACIÓN */
.party-reason {
    font-size: 0.85rem;
    color: #555;
    margin-top: 10px;
    border-top: 1px solid #eee;
    padding-top: 10px;
    font-style: italic;
    line-height: 1.4;
    width: 100%;
}

/* CANDIDATOS */
.section-candidatos-wrapper { background: #fff; padding: 50px 0; border-top: 1px solid #eee; }
.quick-filters { display: flex; justify-content: center; gap: 20px; margin-bottom: 30px; flex-wrap: wrap; }
.dash-card {
    background: #f8f9fa; border: none; padding: 15px 25px; border-radius: 8px; cursor: pointer;
    text-align: center; border-top: 4px solid #ccc; min-width: 150px; transition: 0.2s;
}
.dash-card:hover { transform: translateY(-3px); background: #fff; box-shadow: 0 5px 10px rgba(0,0,0,0.05); }
.dash-card .icon { font-size: 1.5rem; margin-bottom: 5px; }
.dash-card h3 { font-size: 0.9rem; font-weight: bold; margin: 0; color: #555; }

.card-green { border-top-color: var(--green); } .card-green .icon { color: var(--green); }
.card-yellow { border-top-color: var(--yellow); } .card-yellow .icon { color: var(--yellow); }
.card-red { border-top-color: var(--red); } .card-red .icon { color: var(--red); }

.filters-toolbar { 
    background: #f4f6f8; padding: 20px; border-radius: 8px; 
    display: flex; flex-wrap: wrap; gap: 15px; border: 1px solid #eee; margin-bottom: 20px; 
}
.filter-group { flex: 1; min-width: 180px; }
.filter-group label { display: block; font-weight: bold; font-size: 0.8rem; margin-bottom: 5px; color: var(--navy); }
.filter-group input, .filter-group select { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 4px; font-size: 0.95rem; }
.filter-msg { text-align: center; font-style: italic; color: #777; margin-bottom: 20px; font-size: 0.9rem; }

.grid-layout { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 25px; }
.card { background: var(--white); border-radius: 8px; overflow: hidden; box-shadow: 0 3px 10px rgba(0,0,0,0.08); border-top: 5px solid #ccc; display: flex; flex-direction: column; }
.card-header { padding: 20px; text-align: center; border-bottom: 1px solid #eee; }
.foto-candidato { width: 90px; height: 90px; border-radius: 50%; object-fit: cover; border: 3px solid #f9f9f9; margin-bottom: 10px; }
.status-badge { display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: 0.75rem; color: white; font-weight: bold; margin-top: 10px; }
.bg-rojo { background: var(--red); } .borde-rojo { border-top-color: var(--red) !important; }
.bg-verde { background: var(--green); } .borde-verde { border-top-color: var(--green) !important; }
.bg-amarillo { background: var(--yellow); } .borde-amarillo { border-top-color: var(--yellow) !important; }

.card-body { padding: 15px; font-size: 0.9rem; flex-grow: 1; }
.tabla-pilares { width: 100%; border-collapse: collapse; margin-bottom: 15px; }
.tabla-pilares td { padding: 5px 0; border-bottom: 1px solid #eee; }
.txt-positivo { color: var(--green); font-weight: bold; }
.txt-negativo { color: var(--red); font-weight: bold; }
.btn-evidencia { display: block; text-align: center; border: 1px solid var(--navy); color: var(--navy); padding: 8px; border-radius: 4px; font-size: 0.8rem; font-weight: bold; }
.btn-evidencia:hover { background: var(--navy); color: var(--white); }
.loading-box { text-align: center; grid-column: 1 / -1; padding: 40px; color: #777; font-size: 1.2rem; }

/* CTA FINAL */
.section-cta { background: var(--navy); color: var(--white); padding: 60px 0; text-align: center; margin-top: 40px; }
.cta-content h2 { color: var(--gold); margin-bottom: 15px; }
.cta-form { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 30px; max-width: 800px; margin: 30px auto 0; }
.cta-form input { padding: 12px; border: none; border-radius: 4px; flex: 1; min-width: 200px; font-size: 1rem; }
.cta-form button { padding: 12px 30px; background: var(--gold); border: none; border-radius: 4px; font-weight: bold; cursor: pointer; color: var(--navy); font-size: 1rem; }
.cta-form button:hover { background: #fff; }

.legal-check { width: 100%; margin-top: 15px; margin-bottom: 10px; font-size: 0.85rem; display: flex; align-items: center; justify-content: center; gap: 10px; }
.legal-check input { width: auto; flex: 0; min-width: auto; }

footer { background: #111; color: #777; text-align: center; padding: 30px; font-size: 0.9rem; }

/* RESPONSIVE */
@media (max-width: 768px) {
    .hero-section { padding: 60px 0; }
    .hero-section h1 { font-size: 2rem; }
    .section-proposito { margin-top: 0; box-shadow: none; border-radius: 0; padding: 40px 20px; }
    .partidos-grid-layout { grid-template-columns: repeat(1, 1fr); } 
    .filters-toolbar { flex-direction: column; }
    .filter-group { width: 100%; margin-bottom: 10px; }
    .cta-form { flex-direction: column; padding: 0 20px; }
    .cta-form input, .cta-form button { width: 100%; margin-bottom: 10px; }
}
