/* --- Variables de Diseño Premium --- */
:root {
    --color-white: #ffffff;
    --color-bg-light: #fdfdfd; 
    --color-cream: #fbf9f6; 
    --color-red: #b91c1c; 
    --color-red-dark: #7f1d1d; 
    --color-gold: #d4af37; 
    --color-ink: #111827; 
    --color-gray: #4b5563; 
    --color-gray-light: #e5e7eb; 

    --font-heading: 'Merriweather', serif; 
    --font-body: 'Inter', sans-serif; 

    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    background-color: var(--color-bg-light);
    color: var(--color-ink);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0MCIgaGVpZ2h0PSI0MCIgdmlld0JveD0iMCAwIDQwIDQwIj48ZyBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxnIGZpbGw9IiNmMGYwZjAiIGZpbGwtb3BhY2l0eT0iMC40Ij48cGF0aCBkPSJNMCAwaDQwdjQwSDBWMHptMjAgMjBoMjB2MjBIMjBWMjB6TTAgMjBoMjB2MjBIMFYyMHoyMCAwaDIwdjIwSDIwVjB6Ii8+PC9nPjwvZz48L3N2Zz4=');
}

.container { max-width: 1280px; margin: 0 auto; padding: 0 2.5rem; }
.text-red { color: var(--color-red); }
.text-white { color: var(--color-white); }
.text-gray-light { color: #a1a1aa; }
.bg-cream { background-color: var(--color-cream); }
.mt-2 { margin-top: 0.5rem; }

/* --- Navegación --- */
#scroll-progress {
    position: fixed; top: 0; left: 0; height: 4px;
    background: linear-gradient(to right, var(--color-red), var(--color-red-dark));
    width: 0%; z-index: 10000; transition: width 0.1s ease-out;
}
#main-header {
    position: fixed; top: 0; left: 0; width: 100%;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px); border-bottom: 1px solid var(--color-gray-light);
    z-index: 1000; transition: all 0.3s ease;
}
#main-header.scrolled { box-shadow: var(--shadow-md); background-color: rgba(255, 255, 255, 1); }
.header-container { display: flex; justify-content: space-between; align-items: center; height: 90px; transition: height 0.3s ease; }
#main-header.scrolled .header-container { height: 70px; }

.logo-link { display: flex; align-items: center; gap: 1.2rem; text-decoration: none; color: var(--color-ink); }
.campaign-logo { height: 50px; width: auto; object-fit: contain; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1)); transition: transform 0.3s ease; }
.logo-link:hover .campaign-logo { transform: scale(1.05); }

.logo-text { display: flex; flex-direction: column; }
.logo-title { font-weight: 800; font-size: 1.2rem; text-transform: uppercase; letter-spacing: 0.5px; }
.logo-subtitle { font-size: 0.85rem; color: var(--color-gray); letter-spacing: 1.5px; text-transform: uppercase; font-weight: 600; }

.desktop-nav { display: flex; gap: 0.5rem; }
.nav-link { text-decoration: none; color: var(--color-ink); padding: 0.75rem 1.25rem; border-radius: 6px; font-weight: 600; transition: all 0.2s ease; }
.nav-link:hover, .nav-link.active { background-color: rgba(185, 28, 28, 0.08); color: var(--color-red); }

/* --- Sección Hero --- */
.hero-section {
    min-height: 100vh; display: flex; align-items: center; padding-top: 110px; padding-bottom: 60px;
    background: radial-gradient(circle at 90% 10%, rgba(185, 28, 28, 0.04), transparent 45%);
}
.hero-container { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 6rem; }
.hero-content { display: flex; flex-direction: column; align-items: flex-start; }

/* Insignia Periodo 2026-2030 Animada */
.new-period-badge {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(90deg, var(--color-gold), #fff5c2, var(--color-gold));
    background-size: 200% auto;
    color: var(--color-red-dark);
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 1px;
    border-radius: 50px;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
    animation: shineGradient 3s linear infinite, floatBadge 3s ease-in-out infinite;
}
@keyframes shineGradient { to { background-position: 200% center; } }
@keyframes floatBadge {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
    100% { transform: translateY(0px); }
}

.badge-campaign {
    display: inline-block; color: var(--color-red); border: 2px solid var(--color-red);
    padding: 0.6rem 2rem; font-weight: 800; text-transform: uppercase; letter-spacing: 3px;
    border-radius: 50px; margin-bottom: 2rem; font-size: 0.9rem;
}
.hero-title { font-family: var(--font-heading); font-size: 5rem; line-height: 1.05; margin-bottom: 1.5rem; font-weight: 900; }
.typewriter-container { font-size: 2.2rem; font-weight: 600; margin-bottom: 2rem; height: 1.3em; display: flex; align-items: center; flex-wrap: wrap; }
.typewriter-prefix { margin-right: 8px; }
.cursor {
    display: inline-block; width: 3px; height: 1.1em; background-color: var(--color-red);
    margin-left: 4px; animation: blink 1s infinite step-end;
}
.cursor.typing { animation: none; opacity: 1; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
.hero-description { font-size: 1.25rem; color: var(--color-gray); margin-bottom: 3.5rem; max-width: 580px; }

/* Botón Animado */
.btn-primary {
    position: relative; display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--color-red), var(--color-red-dark)); color: var(--color-white);
    padding: 1.2rem 3rem; text-decoration: none; font-weight: 700; font-size: 1.15rem;
    border-radius: 8px; overflow: hidden; transition: all 0.3s ease;
    animation: pulseShadow 2.5s infinite;
}
.btn-primary::after {
    content: ''; position: absolute; top: 0; left: -100%; width: 50%; height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.4) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg); animation: sweepShine 4s infinite;
}
.btn-primary:hover { transform: translateY(-3px); animation: none; box-shadow: 0 8px 0px 0px var(--color-gold), 0 15px 30px rgba(0,0,0,0.15); }
@keyframes pulseShadow {
    0% { box-shadow: 0 6px 0px 0px var(--color-gold), 0 0 0 0 rgba(185, 28, 28, 0.5); }
    70% { box-shadow: 0 6px 0px 0px var(--color-gold), 0 0 0 15px rgba(185, 28, 28, 0); }
    100% { box-shadow: 0 6px 0px 0px var(--color-gold), 0 0 0 0 rgba(185, 28, 28, 0); }
}
@keyframes sweepShine { 0% { left: -100%; } 20% { left: 200%; } 100% { left: 200%; } }

/* Imagen Hero */
.hero-image-wrapper { position: relative; width: 100%; max-width: 550px; justify-self: end; }
.image-frame {
    position: relative; z-index: 10; border-radius: 12px; overflow: hidden;
    box-shadow: var(--shadow-lg), 0 0 0 1px var(--color-gray-light); background-color: var(--color-white);
    padding: 8px; 
}
.image-frame::after {
    content: ''; position: absolute; top: 0; left: -100%; width: 60%; height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.4) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg); animation: sweepShineImage 6s infinite; pointer-events: none; z-index: 12;
}
@keyframes sweepShineImage { 0% { left: -100%; } 15% { left: 200%; } 100% { left: 200%; } }
.frame-decor-top { position: absolute; top: 0; right: 0; width: 60px; height: 60px; border-top: 4px solid var(--color-gold); border-right: 4px solid var(--color-gold); z-index: 11; }
.frame-decor-bottom { position: absolute; bottom: 0; left: 0; width: 60px; height: 60px; border-bottom: 4px solid var(--color-gold); border-left: 4px solid var(--color-gold); z-index: 11; }

.hero-image { width: 100%; height: auto; display: block; border-radius: 8px; }

.image-glow {
    position: absolute; top: 10%; left: 10%; width: 110%; height: 110%; background-color: var(--color-gold);
    filter: blur(100px); z-index: 0; pointer-events: none; animation: breatheGlow 4s ease-in-out infinite alternate;
}
@keyframes breatheGlow { 0% { transform: scale(1); opacity: 0.15; } 100% { transform: scale(1.05); opacity: 0.35; } }

/* --- Secciones Generales --- */
.section-padding { padding: 6rem 0; }
.section-header { text-align: center; margin-bottom: 4rem; }
.section-title { font-family: var(--font-heading); font-size: 2.8rem; color: var(--color-ink); }
.divider { width: 60px; height: 4px; background-color: var(--color-red); margin: 1rem auto; border-radius: 2px; }
.section-subtitle { color: var(--color-gray); font-size: 1.1rem; max-width: 600px; margin: 0 auto; }

/* --- Candidatos Grid & Biografías --- */
.candidates-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.candidate-card { 
    background: var(--color-white); border-radius: 12px; overflow: hidden; 
    box-shadow: var(--shadow-md); transition: transform 0.3s ease; 
    display: flex; flex-direction: column;
}
.candidate-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }

/* Brillo en las fotos de los candidatos */
.photo-shine { position: relative; width: 100%; overflow: hidden; border-bottom: 4px solid var(--color-gold);}
.photo-shine img { width: 100%; height: auto; display: block; transition: transform 0.5s ease; }
.candidate-card:hover .photo-shine img { transform: scale(1.02); }

.photo-shine::after {
    content: ''; position: absolute; top: 0; left: -100%; width: 50%; height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.4) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg); animation: sweepShineImage 5s infinite; pointer-events: none; z-index: 10;
}

.candidate-info { padding: 2.5rem; text-align: left; flex: 1; }
.candidate-name { font-family: var(--font-heading); font-size: 1.8rem; margin-bottom: 0.5rem; text-align: center;}
.candidate-role { display: block; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 1.5rem; text-align: center;}

/* Estilo para el párrafo de la biografía */
.candidate-biography {
    color: var(--color-gray);
    font-size: 1rem;
    line-height: 1.7;
    text-align: justify;
}

/* --- Logros Grid --- */
.achievements-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.achievement-card { 
    background: var(--color-white); padding: 2rem; border-radius: 12px; 
    border-top: 4px solid var(--color-red); box-shadow: var(--shadow-md); transition: all 0.3s ease; 
}
.achievement-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-top-color: var(--color-gold); }
.achievement-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.achievement-card h4 { font-size: 1.3rem; margin-bottom: 1rem; color: var(--color-ink); }
.achievement-list { list-style-type: none; padding-left: 0; }
.achievement-list li { position: relative; padding-left: 1.5rem; margin-bottom: 0.5rem; color: var(--color-gray); font-size: 0.95rem; }
.achievement-list li::before { content: '✔'; position: absolute; left: 0; color: var(--color-red); font-weight: bold; }

/* Galería Grid */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; }
.gallery-item { border-radius: 8px; overflow: hidden; box-shadow: var(--shadow-md); }
.gallery-item img { width: 100%; height: auto; display: block; border-radius: 8px; transition: transform 0.3s ease; }
.gallery-item:hover img { transform: scale(1.05); }
.placeholder-img { height: 200px; background-color: #d1d5db; display: flex; align-items: center; justify-content: center; color: #6b7280; }

/* --- Footer --- */
.main-footer { background-color: var(--color-ink); color: var(--color-white); padding: 4rem 0 2rem; }
.footer-container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 2rem; }
.footer-logo { text-align: left; }
.campaign-logo-footer { height: 60px; width: auto; object-fit: contain; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));}
.footer-info { text-align: right; }
.main-footer p { font-size: 0.95rem; margin-bottom: 0.5rem; }
.footer-subtext { color: #9ca3af; font-size: 0.85rem !important; }

/* --- Animaciones Scroll (Reveal) --- */
.reveal-on-scroll { opacity: 0; transform: translateY(40px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.reveal-on-scroll.is-visible { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.2s; }

/* =======================================================
   REGLAS RESPONSIVAS
   ======================================================= */
@media (max-width: 1024px) {
    .container { padding: 0 1.5rem; }
    .hero-title { font-size: 3.5rem; }
    .hero-container { grid-template-columns: 1fr 0.8fr; gap: 3rem; }
    .candidates-grid { gap: 2rem; }
    .section-title { font-size: 2.2rem; }
}

@media (max-width: 768px) {
    .header-container { flex-direction: column; justify-content: center; height: auto; padding: 1rem 0; gap: 10px; }
    #main-header.scrolled .header-container { height: auto; }
    .logo-link { flex-direction: column; text-align: center; gap: 5px; }
    .logo-text { align-items: center; }
    
    .desktop-nav { margin-top: 5px; flex-wrap: wrap; justify-content: center; gap: 5px;}
    .nav-link { padding: 0.5rem 0.8rem; font-size: 0.9rem; }
    
    .hero-section { padding-top: 190px; padding-bottom: 40px; }
    .hero-container { grid-template-columns: 1fr; text-align: center; gap: 3rem; }
    .hero-content { align-items: center; }
    .hero-title { font-size: 2.8rem; }
    .typewriter-container { justify-content: center; font-size: 1.5rem; height: auto; margin-bottom: 1rem;}
    .hero-description { font-size: 1.1rem; }
    .hero-image-wrapper { max-width: 90%; margin: 0 auto; }
    
    .candidates-grid { grid-template-columns: 1fr; max-width: 600px; margin: 0 auto; }
    
    .footer-container { flex-direction: column; text-align: center; gap: 2rem;}
    .footer-logo { text-align: center; }
    .footer-info { text-align: center; }
}

@media (max-width: 480px) {
    .hero-title { font-size: 2.3rem; }
    .btn-primary { padding: 1rem 2rem; font-size: 1rem; width: 100%;}
    .badge-campaign { padding: 0.5rem 1.5rem; font-size: 0.8rem; }
    .new-period-badge { font-size: 0.75rem; text-align: center; }
}