* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    background: #f1f5f9;
    padding: 20px;
    color: #0f172a;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
}

/* Header */
.header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: white;
    padding: 30px 25px;
    border-radius: 28px;
    margin-bottom: 25px;
}

.header h1 {
    font-size: 2rem;
    margin-bottom: 8px;
}

.volver {
    display: inline-block;
    margin-top: 15px;
    color: #94a3b8;
    text-decoration: none;
}

.volver:hover {
    color: white;
}

/* Leyenda */
.leyenda {
    background: white;
    border-radius: 20px;
    padding: 15px 20px;
    margin-bottom: 25px;
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.leyenda span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.circulo {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-block;
}
.circulo.verde { background: #10b981; }
.circulo.amarillo { background: #f59e0b; }
.circulo.rojo { background: #ef4444; }

/* Grid */
.candidatos-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
}

/* Tarjeta candidato */
.candidato-card {
    background: white;
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 20px 35px -12px rgba(0,0,0,0.15);
    border-left: 8px solid;
}

.credibilidad-verde { border-left-color: #10b981; }
.credibilidad-amarilla { border-left-color: #f59e0b; }
.credibilidad-naranja { border-left-color: #f97316; }
.credibilidad-roja { border-left-color: #ef4444; }

.card-content {
    padding: 28px;
}

.candidato-principal {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    align-items: center;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 25px;
    margin-bottom: 20px;
}

.foto-candidato img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.info-candidato {
    flex: 1;
}

.info-candidato h2 {
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.partido {
    color: #475569;
    margin-bottom: 8px;
}

.badge-credibilidad {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 40px;
    font-size: 0.8rem;
    font-weight: 600;
    margin: 8px 0;
}
.badge-rojo { background: #fee2e2; color: #b91c1c; }
.badge-amarillo { background: #fef3c7; color: #b45309; }
.badge-verde { background: #dcfce7; color: #15803d; }

.motivo {
    font-size: 0.9rem;
    color: #334155;
    background: #f8fafc;
    padding: 8px 12px;
    border-radius: 16px;
    display: inline-block;
}

/* Votación */
.votacion {
    margin-top: 15px;
    display: flex;
    gap: 12px;
}

.btn-like, .btn-dislike {
    border: none;
    font-size: 1.1rem;
    padding: 8px 20px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s;
}
.btn-like {
    background: #e0f2fe;
    color: #0284c7;
}
.btn-like:hover { background: #bae6fd; }
.btn-dislike {
    background: #ffe4e4;
    color: #dc2626;
}
.btn-dislike:hover { background: #fecaca; }

/* Desplegable regidores */
.detalle-regidores {
    margin-top: 15px;
}

details {
    background: #f8fafc;
    border-radius: 24px;
    padding: 15px 20px;
    cursor: pointer;
}
summary {
    font-weight: 700;
    font-size: 1rem;
}
.regidores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 15px;
}
.regidor-item {
    background: white;
    border-radius: 16px;
    padding: 12px;
    text-align: center;
    border-left: 4px solid;
}
.semaforo-verde { border-left-color: #10b981; }
.semaforo-amarillo { border-left-color: #f59e0b; }
.semaforo-rojo { border-left-color: #ef4444; }
.semaforo-individual { font-size: 1.8rem; }
.regidor-nombre { font-weight: 700; margin: 5px 0; }
.motivo-breve { font-size: 0.7rem; color: #475569; }

.alerta-equipo {
    margin-top: 15px;
    background: #fee2e2;
    padding: 10px;
    border-radius: 16px;
    text-align: center;
    font-size: 0.85rem;
}

.btn-equipo {
    display: inline-block;
    margin-top: 20px;
    background: #1e293b;
    color: white;
    padding: 10px 24px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 500;
}

/* Página de equipo */
.equipo-container {
    background: white;
    border-radius: 40px;
    padding: 30px;
}
.btn-volver {
    background: #0f172a;
    color: white;
    padding: 8px 20px;
    border-radius: 30px;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 25px;
}
.candidato-principal-equipo {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    align-items: center;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 25px;
    margin-bottom: 30px;
}
.candidato-principal-equipo img {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    object-fit: cover;
}
.regidores-grid-equipo {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 25px 0;
}
.regidor-card {
    background: #f8fafc;
    border-radius: 24px;
    padding: 18px;
    text-align: center;
    border-top: 6px solid;
}
.semaforo-grande { font-size: 2.5rem; }
.conclusion-equipo {
    background: #fee2e2;
    padding: 20px;
    border-radius: 28px;
    margin-top: 25px;
}

footer {
    margin-top: 40px;
    text-align: center;
    color: #64748b;
    font-size: 0.75rem;
    border-top: 1px solid #cbd5e1;
    padding-top: 20px;
}

@media (max-width: 700px) {
    .candidato-principal { flex-direction: column; text-align: center; }
    .candidato-principal-equipo { flex-direction: column; text-align: center; }
    .info-candidato h2 { font-size: 1.5rem; }
}