:root {
    --primary-color: #d32f2f;
    --secondary-color: #ffffff;
    --accent-color: #ff5252;
    --dark-text: #212121;
    --light-text: #ffffff;
    --bg-color: #f0f0f0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: #f0f0f0;
    background-image: radial-gradient(#d32f2f 1px, transparent 1px);
    background-size: 22px 22px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 40px 20px;
}

/* ===== CONTENEDOR ===== */
.flyer-container {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(10px);
    width: 100%;
    max-width: 860px;
    border-radius: 30px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    overflow: hidden;
    position: relative;
    padding: 50px;
    z-index: 1;
}

/* Decoraciones */
.bg-shape {
    position: absolute;
    z-index: 0;
    border-radius: 50%;
}
.shape-1 {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    top: -30px;
    right: -30px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 30px rgba(211,47,47,0.4);
    z-index: 2; /* Para tapar la línea del header */
}
.shape-2 {
    width: 600px;
    height: 600px;
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
    bottom: -300px;
    left: -250px;
    opacity: 0.08;
    z-index: 0;
}

/* Logo dentro del círculo rojo */
.logo-circle-img {
    width: 240px; /* Más grande */
    height: 240px;
    object-fit: contain;
    mix-blend-mode: normal;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.4));
    transform: translate(-18px, 15px) scale(1.35); /* Zoom extra y ajuste de posición */
    transform-origin: center;
}


/* ===== HEADER ===== */
.header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
    border-bottom: 3px solid #f0f0f0;
    padding-bottom: 20px;
    position: relative;
    z-index: 1;
}

.party-name {
    font-size: 3rem;
    font-weight: 900;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 4px;
    text-align: center;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: center;
    margin-bottom: 45px;
}

.text-section {
    flex: 1.2;
    min-width: 280px;
}

.cargo-tag {
    font-size: 1.1rem;
    color: var(--primary-color);
    letter-spacing: 3px;
    font-weight: 800;
    margin-top: -20px;
    margin-bottom: 30px;
    text-align: center;
    width: 100%;
}

.slogan {
    font-size: 3.2rem;
    font-weight: 900;
    line-height: 1.05;
    color: var(--dark-text);
    margin-bottom: 20px;
    text-align: center;
    width: 100%;
}

.highlight {
    color: var(--primary-color);
}

.description {
    font-size: 1.05rem;
    color: #555;
    margin-bottom: 28px;
    line-height: 1.7;
}

.event-details {
    background: rgb(4 55 119 / 83%);
    border: 1px solid #192c8300;
    border-radius: 15px;
    box-shadow: 0 0 15px rgb(4 0 255 / 53%);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    padding: 20px 22px;
}

.detail {
    margin-bottom: 4px;
}

.detail strong {
    font-size: 0.95rem;
    color: #ffffff;
    display: block;
    margin-bottom: 2px;
}

.detail p {
    font-size: 0.85rem;
    color: #a0b8d0;
}

/* ===== FOTO CANDIDATO ===== */
.image-section {
    flex: 1;
    min-width: 260px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

.image-wrapper {
    position: relative;
    width: 100%;
    max-width: 360px;
    transform: scale(1.40) translateY(20px);
    transform-origin: bottom center;
}

.image-wrapper::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 15%;
    width: 70%;
    height: 20px;
    background: rgba(0,0,0,0.15);
    filter: blur(10px);
    border-radius: 50%;
    z-index: -1;
    animation: shadow-float 6s ease-in-out infinite;
}

.candidate-img {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 15px 30px rgba(211,47,47,0.2));
    -webkit-mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
    animation: float 6s ease-in-out infinite;
}

.candidate-name-overlay {
    position: absolute;
    bottom: -10px;
    left: 5%;
    transform: translateX(-50%);
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--primary-color);
    text-transform: uppercase;
    text-align: center;
    width: 100%;
    z-index: 10;
    text-shadow: 
        2px 2px 0px #ffffff, 
        -2px -2px 0px #ffffff, 
        2px -2px 0px #ffffff, 
        -2px 2px 0px #ffffff,
        0 4px 10px rgba(0,0,0,0.3);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50%       { transform: translateY(-12px); }
}

@keyframes shadow-float {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%       { transform: scale(0.85); opacity: 0.5; }
}

/* ===== MAPA LEAFLET ===== */
.map-section {
    background: #ffffff;
    padding: 30px;
    border-radius: 22px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    margin-bottom: 30px;
    border: 1px solid #eee;
}

.map-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 5px;
    text-align: center;
}

.map-sub {
    font-size: 0.85rem;
    color: #777;
    margin-bottom: 20px;
    line-height: 1.4;
    text-align: center;
}

#event-map {
    width: 100%;
    height: 300px;
    border-radius: 14px;
    overflow: hidden;
    border: 2px solid #f0f0f0;
    box-shadow: 0 6px 25px rgba(0,0,0,0.15);
}

/* Popup del mapa: fondo claro */
.leaflet-popup-content-wrapper {
    border-radius: 12px !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15) !important;
}

.leaflet-control-zoom a {
    border-radius: 8px !important;
}

.leaflet-control-zoom a:hover {
    background: var(--primary-color) !important;
    color: #fff !important;
}

.map-footer-row {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-top: 16px;
    gap: 12px;
}

.coords-text {
    font-size: 0.8rem;
    color: #999;
    letter-spacing: 1px;
}

.cta-button {
    display: inline-block;
    padding: 13px 28px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: var(--light-text);
    text-decoration: none;
    font-weight: 800;
    font-size: 0.95rem;
    border-radius: 50px;
    box-shadow: 0 8px 20px rgba(211,47,47,0.3);
    transition: all 0.3s;
    letter-spacing: 0.5px;
}

.cta-button:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(211,47,47,0.5);
}

/* ===== FOOTER ===== */
.footer {
    text-align: center;
    padding-top: 22px;
    border-top: 2px dashed #004aad;
    color: #888;
    font-weight: 600;
    font-size: 1rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    body {
        padding: 0;
        background-image: none;
        background-color: #ffffff;
    }
    .map-footer-row {
        display: none;
    }
    .flyer-container { 
        padding: 25px 15px; 
        border-radius: 0;
        box-shadow: none;
        min-height: 100vh;
    }
    .header { 
        flex-direction: column; 
        gap: 12px; 
        text-align: center; 
    }
    .party-name { 
        font-size: 2rem; 
    }
    .main-title { 
        font-size: 1.6rem; 
        text-align: center; 
    }
    .slogan { 
        font-size: 2rem; 
        text-align: center; 
    }
    .description { 
        text-align: center; 
        font-size: 0.95rem;
    }
    .main-content { 
        flex-direction: column; 
        gap: 20px; 
    }
    .text-section, .image-section {
        width: 100%;
        min-width: 100%;
    }
    .image-wrapper {
        transform: scale(1.1) translateY(10px);
        max-width: 300px;
        margin: 0 auto;
    }
    .event-details {
        padding: 18px 15px;
    }
    .map-section {
        padding: 15px;
    }
    #event-map {
        height: 240px;
    }
    .map-footer-row { 
        flex-direction: column; 
        text-align: center; 
    }
    .footer {
        font-size: 0.9rem;
    }
    .shape-1 {
        z-index: 0;
        opacity: 0.15;
        top: 270px;
        right: auto;
        left: 50%;
        transform: translate(-50%, -50%);
    }
}
