:root {
    --primary-red: #D32F2F;
    --primary-red-dark: #B71C1C;
    --secondary-gold: #FFD700;
    --secondary-gold-light: #FFF8E1;
    --dark: #1A1A2E;
    --light: #FAFAFA;
    --gray: #6B7280;
    --gradient-hero: linear-gradient(135deg, #D32F2F 0%, #B71C1C 50%, #8B0000 100%);
    --gradient-gold: linear-gradient(135deg, #FFD700 0%, #FFA000 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--light);
    color: var(--dark);
    line-height: 1.6;                                                                                                                                                                                                                                                                                                                                                                                                                                               
    overflow-x: hidden;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

nav.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 30px rgba(0,0,0,0.15);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-red);
}

.logo-number {
    background: var(--gradient-gold);
    color: var(--dark);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 600;
    position: relative;
    transition: color 0.3s;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-red);
    transition: width 0.3s;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a:hover {
    color: var(--primary-red);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    background: var(--gradient-hero);
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.hero-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 8rem 2rem 4rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-text {
    color: white;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255,255,255,0.3);
}

.hero-badge i {
    color: var(--secondary-gold);
}

.hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: 4rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero h1 span {
    color: var(--secondary-gold);
    display: block;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    max-width: 500px;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}

.stat {
    text-align: center;
}

.stat-number {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--secondary-gold);
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--secondary-gold);
    color: var(--dark);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.5);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: var(--primary-red);
}

.hero-image {
    position: relative;
}

.hero-image-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.hero-image-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--secondary-gold);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    opacity: 0.3;
    animation: morph 8s ease-in-out infinite;
}

@keyframes morph {
    0%, 100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
    50% { border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%; }
}

.hero-image-placeholder {
    width: 100%;
    aspect-ratio: 3/4;
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

/* Candidate photo (replaces placeholder icon) */
.hero-image-placeholder img.candidate-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
    display: block;
    transition: transform 0.5s ease, filter 0.35s ease;
    filter: saturate(0.95) contrast(1.02);
}

.hero-image-placeholder img.candidate-photo:hover {
    transform: scale(1.02);
    filter: saturate(1.05) contrast(1.04);
}

.hero-image-placeholder i {
    font-size: 6rem;
    color: var(--gray);
    margin-bottom: 1rem;
}

.hero-image-placeholder span {
    color: var(--gray);
    font-weight: 600;
}

.floating-badge {
    position: absolute;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: float 3s ease-in-out infinite;
}

.floating-badge-1 {
    top: 10%;
    right: -20px;
    animation-delay: 0s;
}

.floating-badge-2 {
    /* movido hacia abajo para no solapar el nombre */
    bottom: -8%;
    left: -30px;
    animation-delay: 1.5s;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.floating-badge i {
    color: var(--primary-red);
    font-size: 1.5rem;
}

.floating-badge-text {
    font-weight: 700;
    color: var(--dark);
    font-size: 0.9rem;
}

.floating-badge-sub {
    font-size: 0.75rem;
    color: var(--gray);
}

/* About Section */
.about {
    padding: 6rem 2rem;
    background: white;
    position: relative;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-tag {
    display: inline-block;
    background: var(--secondary-gold-light);
    color: var(--primary-red);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    font-weight: 900;
    color: var(--dark);
    margin-bottom: 1rem;
}

.section-subtitle {
    color: var(--gray);
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-image {
    position: relative;
}

.about-image-frame {
    background: var(--gradient-hero);
    padding: 1rem;
    border-radius: 20px;
    transform: rotate(-3deg);
    transition: transform 0.3s;
}

.about-image-frame:hover {
    transform: rotate(0deg) scale(1.02);
}

.about-image-placeholder {
    background: white;
    aspect-ratio: 4/5;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--gray);
    position: relative;
    overflow: hidden; /* importante para que el video respete el border-radius */
}

/* Video / iframe de perfil */
.about-image-placeholder .about-video {
    width: 100%;
    height: 100%;
    position: relative;
}

.about-image-placeholder .profile-video {
    width: 100%;
    height: 100%;
    display: block;
    border: none;
    border-radius: inherit;
    object-fit: cover;
    position: relative;
    z-index: 2; /* garantizar que el media inyectado quede por encima si ambos están visibles */
}

/* fallback cuando no hay video local: poster + enlace */
.profile-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: linear-gradient(rgba(255,255,255,0.0), rgba(255,255,255,0.0));
    z-index: 1;
}

.profile-fallback img {
    width: 60%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.profile-drive-link {
    display: none; /* se mostrará solo si falla el video local */
    text-decoration: none;
    padding: 0.6rem 1rem;
}

/* Botón de activar sonido (overlay) */
.unmute-btn {
    position: absolute;
    right: 0.75rem;
    bottom: 0.75rem;
    z-index: 3;
    display: none; /* mostrado por JS cuando corresponda */
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    background: rgba(0,0,0,0.6);
    color: white;
    border: none;
    padding: 0.5rem 0.6rem;
    border-radius: 999px;
    cursor: pointer;
    transition: background .16s ease;
    backdrop-filter: blur(4px);
}
.unmute-btn:hover { background: rgba(0,0,0,0.75); }
.unmute-btn i { font-size: 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* en móvil reducimos el tamaño del poster */
@media (max-width: 480px) {
    .profile-fallback img { width: 80%; }
}

.about-image-placeholder i {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: var(--primary-red);
}

.about-content h3 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--dark);
}

.about-content p {
    margin-bottom: 1.5rem;
    color: var(--gray);
    font-size: 1.1rem;
    line-height: 1.8;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}

.value-card {
    background: var(--light);
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.value-card:hover {
    border-color: var(--primary-red);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(211, 47, 47, 0.1);
}

.value-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-hero);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
    font-size: 1.2rem;
}

.value-title {
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

/* Experience Section */
.experience {
    padding: 6rem 2rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.experience-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.experience-card {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.experience-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--gradient-hero);
}

.experience-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

.experience-icon {
    width: 60px;
    height: 60px;
    background: var(--secondary-gold-light);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--primary-red);
    font-size: 1.5rem;
}

.experience-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--dark);
}

.experience-card p {
    color: var(--gray);
    line-height: 1.7;
}

.experience-years {
    display: inline-block;
    background: var(--primary-red);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

/* Proposals Section */
.proposals {
    padding: 6rem 2rem;
    background: var(--dark);
    color: white;
    position: relative;
    overflow: hidden;
}

.proposals::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: var(--primary-red);
    border-radius: 50%;
    opacity: 0.1;
    filter: blur(100px);
}

.proposals .section-title {
    color: white;
}

.proposals .section-subtitle {
    color: rgba(255,255,255,0.7);
}

.vote-banner {
    background: var(--gradient-gold);
    color: var(--dark);
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
    overflow: hidden;
}

.vote-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(255,255,255,0.1) 10px,
        rgba(255,255,255,0.1) 20px
    );
    animation: shine 20s linear infinite;
}

@keyframes shine {
    0% { transform: translateX(-50%) translateY(-50%) rotate(0deg); }
    100% { transform: translateX(-50%) translateY(-50%) rotate(360deg); }
}

.vote-content {
    position: relative;
    z-index: 2;
}

.vote-banner h3 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.vote-number {
    font-size: 4rem;
    font-weight: 900;
    color: var(--primary-red);
    text-shadow: 2px 2px 0 rgba(0,0,0,0.1);
    display: inline-block;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.proposals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.proposal-card {
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 2rem;
    border-radius: 20px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.proposal-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-hero);
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 0;
}

.proposal-card:hover::before {
    opacity: 1;
}

.proposal-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-red);
}

.proposal-number {
    width: 50px;
    height: 50px;
    background: var(--secondary-gold);
    color: var(--dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.proposal-card h4 {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.proposal-card p {
    color: rgba(255,255,255,0.8);
    position: relative;
    z-index: 1;
    line-height: 1.7;
}

/* Contact Section */
.contact {
    padding: 6rem 2rem;
    background: white;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.contact-info h3 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--dark);
}

.contact-info > p {
    color: var(--gray);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--light);
    border-radius: 15px;
    transition: all 0.3s;
}

.contact-method:hover {
    background: var(--primary-red);
    color: white;
    transform: translateX(10px);
}

.contact-method:hover .contact-icon {
    background: white;
    color: var(--primary-red);
}

.contact-method:hover p {
    color: rgba(255,255,255,0.9);
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-red);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s;
}

.contact-method div strong {
    display: block;
    margin-bottom: 0.25rem;
}

.contact-method div p {
    color: var(--gray);
    font-size: 0.9rem;
    transition: color 0.3s;
}

.contact-form {
    background: var(--light);
    padding: 3rem;
    border-radius: 20px;
}

/* Alert / flash messages */
.alert {
    padding: 0.75rem 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    font-weight: 600;
}
.alert.success {
    background: rgba(34,197,94,0.12);
    color: #166534;
    border: 1px solid rgba(34,197,94,0.2);
}
.alert.error {
    background: rgba(239,68,68,0.08);
    color: #7f1d1d;
    border: 1px solid rgba(239,68,68,0.12);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-red);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Footer */
footer {
    background: var(--dark);
    color: white;
    padding: 3rem 2rem 1rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.footer-brand .logo-number {
    width: 35px;
    height: 35px;
    font-size: 1rem;
}

.footer-about p {
    color: rgba(255,255,255,0.7);
    line-height: 1.7;
}

.footer-links h4,
.footer-social h4 {
    font-family: 'Playfair Display', serif;
    margin-bottom: 1rem;
    color: var(--secondary-gold);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--secondary-gold);
}

.social-icons {
    display: flex;
    gap: 1rem;
}

.social-icons a {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s;
}

.social-icons a:hover {
    background: var(--primary-red);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 2rem;
    text-align: center;
    color: rgba(255,255,255,0.5);
}

/* Responsive */
@media (max-width: 968px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-cta {
        justify-content: center;
    }

    .hero-image {
        order: -1;
    }

    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .values-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-icons {
        justify-content: center;
    }

    .nav-links {
        display: none;
    }

    /* Ajuste: bajar la tarjeta flotante para evitar solapamiento con el nombre */
    .floating-badge-2 {
        bottom: 4%;
        left: -10px;
    }
}

/* Scroll animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}