/**
 * Eventos destacados: barra superior, pop-up, bloque de agenda, sello y CTA de ficha.
 *
 * Colores y tipografías del manual de marca de librosactivos.com.ar:
 * azul primario #476EC2, rojo de destacados #FC5154, blanco suave #F7FCFE,
 * títulos Merriweather, cuerpo Open Sans, botones Roboto 600 en pill.
 */

:root {
    --pl-featured-blue: #476EC2;
    --pl-featured-blue-dark: #3a5ca8;
    --pl-featured-red: #FC5154;
    --pl-featured-red-dark: #B4284B;
    --pl-featured-white: #F7FCFE;
    --pl-featured-ink: #1F1F1F;
    --pl-featured-ink-soft: #575757;
    --pl-featured-cream: #F7E8C7;
}

/* -------------------------------------------------------------------------
   Botones compartidos (pill del manual de marca)
   ------------------------------------------------------------------------- */
.pl-featured-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--pl-featured-red);
    color: var(--pl-featured-white) !important;
    font-family: Roboto, "Open Sans", sans-serif;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none !important;
    padding: 12px 24px;
    border: 0;
    border-radius: 50px;
    box-shadow: 0 6px 5px 0 rgba(8, 5, 6, 0.2);
    cursor: pointer;
    transition: filter 0.15s ease, transform 0.15s ease;
}

.pl-featured-cta-btn:hover,
.pl-featured-cta-btn:focus {
    filter: brightness(1.06);
    color: var(--pl-featured-white) !important;
}

.pl-featured-cta-btn:focus-visible {
    outline: 3px solid var(--pl-featured-blue);
    outline-offset: 2px;
}

/* El tema pinta todos los <button> de azul: hay que ganarle en los nuestros,
   si no el texto azul queda invisible sobre el fondo azul del tema. */
.pl-featured-ghost-btn,
button.pl-featured-ghost-btn,
.pl-featured-popup button.pl-featured-ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    background-image: none !important;
    color: var(--pl-featured-blue) !important;
    font-family: Roboto, "Open Sans", sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none !important;
    text-transform: none !important;
    padding: 11px 22px;
    border: 1px solid var(--pl-featured-blue) !important;
    border-radius: 50px !important;
    box-shadow: none !important;
    cursor: pointer;
}

.pl-featured-ghost-btn:hover,
.pl-featured-ghost-btn:focus,
button.pl-featured-ghost-btn:hover,
button.pl-featured-ghost-btn:focus {
    background: rgba(71, 110, 194, 0.08) !important;
    color: var(--pl-featured-blue) !important;
}

/* Lo mismo para el CTA cuando el tema estiliza enlaces y botones a su manera. */
a.pl-featured-cta-btn,
button.pl-featured-cta-btn {
    background: var(--pl-featured-red) !important;
    background-image: none !important;
    border: 0 !important;
    text-transform: none !important;
    line-height: 1.2;
}

.pl-featured-ghost-btn:focus-visible {
    outline: 3px solid var(--pl-featured-blue);
    outline-offset: 2px;
}

/* -------------------------------------------------------------------------
   A · Barra superior
   ------------------------------------------------------------------------- */
.pl-featured-banner {
    background: linear-gradient(100deg, #2f4f8f 0%, var(--pl-featured-blue) 55%, #9c2f38 100%);
    color: var(--pl-featured-white);
    font-family: "Open Sans", sans-serif;
    font-size: 15px;
    position: relative;
    z-index: 9999;
}

.pl-featured-banner[hidden] {
    display: none;
}

/* El header del tema es una sección sticky de Elementor (fixed): el banner no
   puede empujarla desde el flujo, así que la bajamos lo que mide el banner
   visible. El JS mantiene --pl-featured-banner-h al día durante el scroll. */
body.pl-featured-banner-on .element-sticky-header,
body.pl-featured-banner-on .elementor-sticky--active {
    transform: translateY(var(--pl-featured-banner-h, 0px));
    transition: transform 0.1s linear;
}

@media (prefers-reduced-motion: reduce) {
    body.pl-featured-banner-on .element-sticky-header,
    body.pl-featured-banner-on .elementor-sticky--active {
        transition: none;
    }
}

.pl-featured-banner__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.pl-featured-banner__flag {
    flex: 0 0 auto;
    font-family: Roboto, "Open Sans", sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    padding: 4px 9px;
}

.pl-featured-banner__text {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    line-height: 1.4;
}

.pl-featured-banner__title {
    color: var(--pl-featured-white) !important;
    font-weight: 700;
    text-decoration: none !important;
}

.pl-featured-banner__title:hover {
    text-decoration: underline !important;
}

.pl-featured-banner__meta {
    opacity: 0.9;
}

.pl-featured-banner__meta::before {
    content: " · ";
    opacity: 0.7;
}

.pl-featured-banner__urgency {
    color: var(--pl-featured-cream);
    font-weight: 600;
}

.pl-featured-banner__urgency::before {
    content: " — ";
    opacity: 0.7;
}

.pl-featured-banner__btn {
    flex: 0 0 auto;
    background: var(--pl-featured-white);
    color: #2f4f8f !important;
    font-family: Roboto, "Open Sans", sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
    padding: 8px 18px;
    border-radius: 50px;
    white-space: nowrap;
}

.pl-featured-banner__btn:hover {
    background: var(--pl-featured-cream);
}

.pl-featured-banner__btn:focus-visible,
.pl-featured-banner__close:focus-visible {
    outline: 3px solid var(--pl-featured-white);
    outline-offset: 2px;
}

.pl-featured-banner__close {
    flex: 0 0 auto;
    background: transparent;
    border: 0;
    color: rgba(255, 255, 255, 0.85);
    font-size: 24px;
    line-height: 1;
    padding: 2px 6px;
    cursor: pointer;
}

.pl-featured-banner__close:hover {
    color: #fff;
}

@media screen and (max-width: 782px) {
    .pl-featured-banner__inner {
        flex-wrap: wrap;
        gap: 10px;
        padding: 10px 15px;
    }

    .pl-featured-banner__text {
        flex: 1 1 100%;
        order: 3;
        font-size: 14px;
    }

    .pl-featured-banner__btn {
        order: 4;
    }
}

/* -------------------------------------------------------------------------
   B · Pop-up
   ------------------------------------------------------------------------- */
.pl-featured-popup {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.pl-featured-popup[hidden] {
    display: none;
}

.pl-featured-popup__scrim {
    position: absolute;
    inset: 0;
    background: rgba(9, 20, 35, 0.55);
    cursor: pointer;
}

.pl-featured-popup__card {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: var(--pl-featured-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 18px 50px rgba(8, 5, 6, 0.35);
    font-family: "Open Sans", sans-serif;
    animation: pl-featured-pop 0.26s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}

@keyframes pl-featured-pop {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pl-featured-popup__card {
        animation: none;
    }
}

.pl-featured-popup__art {
    height: 150px;
    background-color: var(--pl-featured-blue);
    background-size: cover;
    background-position: center top;
    position: relative;
    display: flex;
    align-items: flex-end;
    padding: 12px 16px;
}

/* Velo inferior para que el sello se lea sobre cualquier imagen. */
.pl-featured-popup__art::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 70px;
    background: linear-gradient(180deg, rgba(20, 34, 60, 0) 0%, rgba(20, 34, 60, 0.55) 100%);
    pointer-events: none;
}

.pl-featured-popup__flag,
.pl-featured-popup__close {
    position: relative;
    z-index: 1;
}

.pl-featured-popup__flag {
    font-family: Roboto, "Open Sans", sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #fff;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    padding: 4px 9px;
}

.pl-featured-popup__close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.pl-featured-popup__close:hover {
    background: rgba(0, 0, 0, 0.6);
}

.pl-featured-popup__close:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 2px;
}

.pl-featured-popup__body {
    padding: 18px 20px 22px;
}

.pl-featured-popup__title {
    font-family: Merriweather, Georgia, serif;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--pl-featured-ink);
    margin: 0 0 8px;
}

.pl-featured-popup__meta {
    font-size: 14px;
    color: var(--pl-featured-ink-soft);
    margin: 0 0 12px;
}

.pl-featured-popup__meta span + span::before {
    content: " · ";
}

.pl-featured-popup__urgency {
    font-size: 14px;
    font-weight: 600;
    color: var(--pl-featured-red-dark);
    background: #ffeced;
    border-radius: 4px;
    padding: 9px 12px;
    margin: 0 0 16px;
}

.pl-featured-popup__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* -------------------------------------------------------------------------
   C · Bloque destacado (agenda y shortcode)
   ------------------------------------------------------------------------- */
.pl-featured-block {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 0;
    background: var(--pl-featured-white);
    border: 1px solid rgba(252, 81, 84, 0.35);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(8, 5, 6, 0.1);
    margin: 0 0 24px;
}

.pl-featured-block__media {
    background: var(--pl-featured-blue);
    min-height: 200px;
    position: relative;
}

.pl-featured-block__img {
    width: 100%;
    height: 100%;
    /* Las placas de evento suelen llevar el título algo abajo del centro:
       encuadrar ahí en vez de en el borde superior. */
    object-fit: cover;
    object-position: center 38%;
    display: block;
}

.pl-featured-block__placeholder {
    width: 100%;
    height: 100%;
    min-height: 200px;
    background: linear-gradient(135deg, var(--pl-featured-blue) 0%, #5b8fd6 100%);
}

.pl-featured-block__body {
    padding: 20px 24px 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-family: "Open Sans", sans-serif;
}

/* El tema convierte los saltos de línea del markup en <br>, que parten el sello
   en dos renglones. Los anulamos dentro de nuestros badges. */
.pl-featured-block__flag br,
.pl-event-list-card__badge-featured br,
.pl-featured-popup__flag br,
.pl-featured-banner__flag br,
.pl-featured-single__flag br {
    display: none !important;
}

/* El tema fuerza svg { width: 100% }: los íconos de los sellos necesitan
   tamaño propio o el texto se parte en dos líneas. */
.pl-featured-block__flag svg,
.pl-event-list-card__badge-featured svg {
    width: 12px !important;
    height: 12px !important;
    flex: 0 0 auto;
    display: inline-block;
    vertical-align: middle;
}

.pl-featured-block__flag {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    gap: 6px;
    font-family: Roboto, "Open Sans", sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #fff;
    background: var(--pl-featured-red);
    border-radius: 4px;
    padding: 4px 9px;
}

.pl-featured-block__title {
    font-family: Merriweather, Georgia, serif;
    font-size: 24px;
    font-weight: 600;
    line-height: 1.2;
    margin: 0;
}

.pl-featured-block__title a {
    color: var(--pl-featured-ink) !important;
    text-decoration: none !important;
}

.pl-featured-block__title a:hover {
    color: var(--pl-featured-blue) !important;
}

.pl-featured-block__meta {
    font-size: 14px;
    color: var(--pl-featured-ink-soft);
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    align-items: center;
}

.pl-featured-block__free,
.pl-featured-block__price {
    font-family: Roboto, "Open Sans", sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 3px 9px;
    border-radius: 4px;
    background: #e6f4ef;
    color: #17795e;
}

.pl-featured-block__price {
    background: #F7E8C7;
    color: #8a6a2c;
}

.pl-featured-block__urgency {
    font-size: 15px;
    font-weight: 600;
    color: var(--pl-featured-red-dark);
    margin: 0;
}

.pl-featured-block__actions {
    margin: 6px 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

@media screen and (max-width: 767px) {
    .pl-featured-block {
        grid-template-columns: 1fr;
    }

    .pl-featured-block__media {
        min-height: 160px;
        max-height: 220px;
    }

    .pl-featured-block__body {
        padding: 16px 18px 20px;
    }

    .pl-featured-block__title {
        font-size: 20px;
    }
}

/* -------------------------------------------------------------------------
   D · Sello en la tarjeta del listado
   ------------------------------------------------------------------------- */
.pl-event-list-card--featured {
    border-color: rgba(252, 81, 84, 0.45) !important;
    box-shadow: 0 0 0 2px rgba(252, 81, 84, 0.18), 0 4px 14px rgba(8, 5, 6, 0.08);
}

.pl-event-list-card__badge-featured {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    gap: 5px;
    font-family: Roboto, "Open Sans", sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #fff;
    background: var(--pl-featured-red);
    border-radius: 4px;
    padding: 4px 8px;
    box-shadow: 0 2px 6px rgba(8, 5, 6, 0.25);
}

/* -------------------------------------------------------------------------
   E · Bloque de acción en la ficha
   ------------------------------------------------------------------------- */
/* Los márgenes laterales acompañan el padding de las secciones de la ficha
   (.pl-event-split y .pl-event-about: 40px en desktop, 24px y 20px al bajar). */
.pl-featured-single {
    background: linear-gradient(180deg, #ffeced 0%, var(--pl-featured-white) 100%);
    border: 1px solid rgba(252, 81, 84, 0.3);
    border-radius: 10px;
    padding: 18px 20px 20px;
    margin: 0 40px;
    font-family: "Open Sans", sans-serif;
}

@media screen and (max-width: 1024px) {
    .pl-featured-single {
        margin: 0 24px;
    }
}

@media screen and (max-width: 767px) {
    .pl-featured-single {
        margin: 0 20px;
    }
}

.pl-featured-single__flag {
    font-family: Roboto, "Open Sans", sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--pl-featured-red-dark);
    margin: 0 0 6px;
}

.pl-featured-single__title {
    font-family: Merriweather, Georgia, serif;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.25;
    color: var(--pl-featured-ink);
    margin: 0 0 14px;
}

.pl-featured-single__actions {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}
