/* ============================================================
   POLIDICOM HOME - Mejoras modernas (secciones nuevas)
   Paleta: fondo #0f0f14, azul #14264D/#22406f, rojo #c62828
   ============================================================ */

/* --- Animación de entrada (fade-in al hacer scroll) --- */
.ph-reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.ph-reveal.ph-in { opacity: 1; transform: none; }

/* Animación de entrada del contenido del hero */
.ph-hero-content > * { animation: phFadeUp .7s ease both; }
.ph-hero-subtitle { animation-delay: .05s; }
.ph-hero-desc { animation-delay: .15s; }
.ph-search { animation-delay: .25s; }
.ph-stats { animation-delay: .35s; }
@keyframes phFadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }

/* Degradado animado sutil del hero */
.ph-hero {
    background: linear-gradient(160deg, #0a0a12 0%, #1a1a3e 50%, #0d1b2a 100%) !important;
    background-size: 200% 200% !important;
    animation: phGradient 18s ease infinite;
}
@keyframes phGradient { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }

/* Contador: leve pulso al terminar */
.ph-stat-number { transition: transform .2s; }

/* ============================================================
   ¿SABÍAS QUE?
   ============================================================ */
.ph-sabias { background: #12121a; border-top: 1px solid rgba(255,255,255,.05); border-bottom: 1px solid rgba(255,255,255,.05); }
.ph-sabias-inner { max-width: 900px; margin: 0 auto; padding: 16px 20px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: center; text-align: center; }
.ph-sabias-tag { background: #c62828; color: #fff; font-weight: 700; font-size: .8rem; padding: 5px 12px; border-radius: 20px; white-space: nowrap; }
.ph-sabias-text { color: #cbd5e1; font-size: .95rem; margin: 0; font-style: italic; }

/* ============================================================
   PERSONAJE DESTACADO
   ============================================================ */
.ph-destacado { background: #0f0f14; padding: 46px 20px; }
.ph-destacado-inner { max-width: 900px; margin: 0 auto; display: grid; grid-template-columns: 220px 1fr; gap: 32px; align-items: center; background: linear-gradient(135deg, #16213e, #1a1a2e); border: 1px solid rgba(255,255,255,.08); border-radius: 18px; padding: 30px; }
.ph-destacado-photo { width: 220px; height: 260px; border-radius: 14px; overflow: hidden; background: #0d1b2a; }
.ph-destacado-photo img { width: 100%; height: 100%; object-fit: cover; }
.ph-destacado-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 5rem; font-weight: 900; color: rgba(255,255,255,.25); background: linear-gradient(135deg, #14264D, #22406f); }
.ph-destacado-tag { display: inline-block; background: rgba(198,40,40,.15); color: #ff6b6b; font-size: .78rem; font-weight: 700; padding: 5px 12px; border-radius: 20px; text-transform: uppercase; letter-spacing: 1px; }
.ph-destacado-name { font-size: 2rem; font-weight: 900; color: #fff; margin: 12px 0 4px; }
.ph-destacado-cargo { color: #94a3b8; font-size: .95rem; }
.ph-destacado-frase { border-left: 3px solid #c62828; margin: 16px 0; padding: 12px 18px; color: #f1f5f9; font-style: italic; font-size: 1.05rem; line-height: 1.6; background: rgba(255,255,255,0.05); border-radius: 0 8px 8px 0; }
.ph-destacado-frase::before, .ph-destacado-frase::after { content: none; }
.ph-destacado-rating { color: #f59e0b; font-size: 1.1rem; margin-bottom: 16px; }
.ph-destacado-rating span { color: #cbd5e1; font-size: .85rem; margin-left: 6px; }
.ph-destacado-btn { display: inline-block; background: #c62828; color: #fff; padding: 11px 22px; border-radius: 8px; text-decoration: none; font-weight: 700; font-size: .9rem; transition: transform .15s, background .2s; }
.ph-destacado-btn:hover { background: #e53935; transform: translateX(3px); color: #fff; }

/* ============================================================
   RANKING CIUDADANO
   ============================================================ */
.ph-ranking { background: #12121a; padding: 50px 20px; }
.ph-ranking-inner { max-width: 1000px; margin: 0 auto; }
.ph-ranking-sub { text-align: center; color: #94a3b8; margin: 4px 0 30px; font-size: .95rem; }
.ph-ranking-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.ph-ranking-col { background: #0f0f14; border: 1px solid rgba(255,255,255,.07); border-radius: 14px; padding: 22px; }
.ph-ranking-mejor { border-top: 3px solid #12805c; }
.ph-ranking-peor { border-top: 3px solid #c62828; }
.ph-ranking-title { font-size: 1.15rem; font-weight: 800; color: #fff; margin: 0 0 16px; }
.ph-ranking-item { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 10px; text-decoration: none; transition: background .2s; margin-bottom: 6px; }
.ph-ranking-item:hover { background: rgba(255,255,255,.04); }
.ph-ranking-pos { font-size: 1.1rem; font-weight: 900; color: #64748b; min-width: 28px; }
.ph-ranking-photo { width: 46px; height: 46px; border-radius: 50%; overflow: hidden; flex: 0 0 auto; background: #14264D; }
.ph-ranking-photo img { width: 100%; height: 100%; object-fit: cover; }
.ph-ranking-ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; background: linear-gradient(135deg, #14264D, #22406f); }
.ph-ranking-data { flex: 1; min-width: 0; }
.ph-ranking-name { display: block; color: #e2e8f0; font-weight: 700; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-ranking-cargo { display: block; color: #64748b; font-size: .78rem; }
.ph-ranking-score { font-weight: 800; font-size: .95rem; white-space: nowrap; }
.ph-score-up { color: #34d399; }
.ph-score-down { color: #f87171; }

/* ============================================================
   PARTICIPACIÓN
   ============================================================ */
.ph-participa { background: linear-gradient(135deg, #14264D, #22406f); padding: 46px 20px; text-align: center; }
.ph-participa-inner { max-width: 640px; margin: 0 auto; }
.ph-participa h2 { color: #fff; font-size: 1.8rem; font-weight: 900; margin: 0 0 10px; }
.ph-participa p { color: rgba(255,255,255,.85); margin: 0 0 22px; font-size: 1rem; line-height: 1.6; }
.ph-participa-btn { display: inline-block; background: #fff; color: #14264D; padding: 13px 28px; border-radius: 8px; text-decoration: none; font-weight: 800; font-size: .95rem; transition: transform .15s, box-shadow .2s; }
.ph-participa-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.3); color: #14264D; }

/* ============================================================
   HOVER dinámico en tarjetas de persona (zoom foto)
   ============================================================ */
.ph-person-card .ph-person-photo { overflow: hidden; }
.ph-person-card .ph-person-photo img { transition: transform .4s ease; }
.ph-person-card:hover .ph-person-photo img { transform: scale(1.07); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .ph-destacado-inner { grid-template-columns: 1fr; text-align: center; }
    .ph-destacado-photo { width: 180px; height: 210px; margin: 0 auto; }
    .ph-destacado-frase { text-align: left; }
    .ph-ranking-cols { grid-template-columns: 1fr; }
}
