/* ============================================================
   LATINIA POPUP · Figma node 19329:10048 · 890x500px
   Tokens extraídos directamente de Figma MCP
============================================================ */

#lp-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.72);
    z-index: 99999;
    align-items: center;
    justify-content: center;
}
#lp-overlay.lp-visible {
    display: flex;
    animation: lp-fade-in 0.3s ease;
}
@keyframes lp-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Popup: 890x500 · borde 6px #FC5D38 · radio 10px */
#lp-popup {
    position: relative;
    width: 890px;
    height: 500px;
    border: 6px solid #FC5D38;
    border-radius: 10px;
    overflow: hidden;
    background: #0d1b2a;
    flex-shrink: 0;
    animation: lp-scale-in 0.3s ease;
}
@keyframes lp-scale-in {
    from { transform: scale(0.92); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}

/* Imagen de fondo · left:-109 top:-68 w:1163 h:654 */
.lp-bg {
    position: absolute;
    left: -109px;
    top: -68px;
    width: 1163px;
    height: 654px;
    object-fit: cover;
    pointer-events: none;
    display: block;
}

/* Cerrar · left:834 top:16 · tamaño natural de la imagen */
.lp-close {
    position: absolute;
    right: 16px;
    top: 16px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10;
    display: block;
    opacity: 0.85;
    transition: opacity 0.2s;
}
.lp-close:hover { opacity: 1; }
.lp-close img { display: block; filter: brightness(0) invert(1); }

/* Badge WEBINAR · left:38 top:36 · 167x47 · #07BE97 · r:13 · 25px Medium */
.lp-badge {
    position: absolute;
    left: 38px;
    top: 36px;
    width: 167px;
    height: 47px;
    background: #07BE97;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 24px;
    color: #FFFFFF;
    line-height: 1;
}

/* Título · left:36 top:138 · w:500 · 45px Medium white lh:0.99 */
.lp-title {
    position: absolute;
    left: 36px;
    top: 138px;
    width: 500px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 45px;
    color: #FFFFFF;
    line-height: 0.99;
    margin: 0;
    padding: 0;
}

/* Subtítulo · left:36 top:251 · w:431 · 22px · #d9d9d9 · lh:1.239 */
.lp-subtitle {
    position: absolute;
    left: 36px;
    top: 251px;
    width: 431px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 400;
    font-size: 22px;
    color: #d9d9d9;
    line-height: 1.239;
    margin: 0;
    padding: 0;
}
.lp-subtitle strong {
    font-weight: 700;
    color: #d9d9d9;
}

/* Botón CTA · left:38 top:378 · 290x65 · #FC5D38 · r:54 · 30px · ls:-1.2px */
.lp-btn {
    position: absolute;
    left: 38px;
    top: 378px;
    width: 290px;
    height: 65px;
    background: #FC5D38;
    border-radius: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 0 20px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 100;
    font-size: 30px;
    color: #FFFFFF !important;
    letter-spacing: -1.2px;
    line-height: 1;
    text-decoration: none !important;
    box-sizing: border-box;
    transition: background 0.2s, transform 0.15s;
}
.lp-btn:hover {
    background: #e04c2a;
    color: #FFFFFF !important;
    transform: translateY(-1px);
}
.lp-btn svg { flex-shrink: 0; width: 22px; height: 22px; }

/* Badge fecha · top:318 left:489 right:57 h:50 · #07BE97 · r:13 */
.lp-date-bg {
    position: absolute;
    top: 318px;
    left: 489px;
    right: 57px;
    height: 50px;
    background: #07BE97;
    border-radius: 13px;
}
.lp-date-row {
    position: absolute;
    top: 318px;
    left: 489px;
    right: 57px;
    height: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
}
.lp-date-row img { width: 27px; height: 27px; flex-shrink: 0; }
.lp-date-text {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 23px;
    color: #fff8ff;
    line-height: 1;
    white-space: nowrap;
    margin: 0;
}

/* Badge hora · top:379 left:489 right:57 h:64 · #07BE97 · r:13 */
.lp-time-bg {
    position: absolute;
    top: 379px;
    left: 489px;
    right: 57px;
    height: 64px;
    background: #07BE97;
    border-radius: 13px;
}
.lp-time-row {
    position: absolute;
    top: 379px;
    left: 489px;
    right: 57px;
    height: 64px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
}
.lp-time-row img { width: 27px; height: 27px; flex-shrink: 0; }
.lp-time-text {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 100;
    font-size: 20px;
    color: #fff8ff;
    line-height: 1.4;
    margin: 0;
}

/* Responsive: rediseño completo del popup como columna en pantallas <760px.
   El desktop (>=760px) sigue usando posicionamiento absoluto con coordenadas fijas. */

/* La imagen de fondo (primer img del popup, aria-hidden) cubre todo el popup
   tanto en desktop como en móvil. Se aplica solo cuando se desactivan los
   estilos absolutos originales de .lp-bg (que fue eliminada del HTML). */
#lp-popup > img[aria-hidden='true'] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    display: block;
}

@media (max-width: 760px) {
    #lp-overlay {
        padding: 16px;
    }

    #lp-popup {
        width: 100%;
        max-width: 500px;
        height: auto;
        padding: 24px;
        display: flex;
        flex-direction: column;
        gap: 14px;
        animation: none;
    }

    /* Reset de todos los hijos absolutos al flujo normal.
       position: relative (no static) para que queden por encima de la imagen
       de fondo (que es absolute) en el orden de pintado. */
    .lp-badge,
    .lp-title,
    .lp-subtitle,
    .lp-btn,
    .lp-date-row,
    .lp-time-row {
        position: relative;
        left: auto;
        top: auto;
        right: auto;
        width: auto;
        height: auto;
        z-index: 1;
    }

    /* Los rectángulos verdes vacíos se reemplazan por el fondo del propio row */
    .lp-date-bg,
    .lp-time-bg {
        display: none;
    }

    .lp-date-row,
    .lp-time-row {
        background: #07BE97;
        border-radius: 13px;
        padding: 10px 14px;
    }

    .lp-close {
        top: 12px;
        right: 12px;
    }

    .lp-badge {
        align-self: flex-start;
        width: auto;
        padding: 0 16px;
        height: 38px;
        font-size: 18px;
    }

    .lp-title {
        font-size: 28px;
        line-height: 1.05;
    }

    .lp-subtitle {
        font-size: 15px;
    }

    .lp-btn {
        order: 10;
        width: 100%;
        height: 56px;
        font-size: 22px;
        padding: 0 16px;
        margin-top: 4px;
    }

    .lp-date-text {
        font-size: 17px;
    }

    .lp-time-text {
        font-size: 15px;
        line-height: 1.3;
    }
}
