/* UNTDF 2.16.0: aviso flotante y ritmo de lectura. */
.untdf-floating-notice[hidden] { display: none !important; }
.untdf-floating-notice {
    position: fixed;
    right: max(20px, env(safe-area-inset-right));
    bottom: max(20px, env(safe-area-inset-bottom));
    width: min(320px, calc(100vw - 32px));
    max-height: min(440px, 65vh);
    overflow: auto;
    z-index: 90;
    background: #fff;
    color: #424242;
    border: 1px solid #e5e5e5;
    border-top: 4px solid var(--untdf-rojo, #be1c1d);
    border-radius: 18px 0 26px 0;
    box-shadow: 0 8px 32px #0003;
}
.untdf-floating-notice__link { display: block; padding: 22px 48px 22px 22px; color: inherit; text-decoration: none; }
.untdf-floating-notice__title { display: block; font-size: 20px; font-weight: 700; line-height: 1.15; overflow-wrap: anywhere; }
.untdf-floating-notice__text { display: block; margin-top: 10px; font-size: 15px; line-height: 1.4; white-space: pre-line; overflow-wrap: anywhere; }
.untdf-floating-notice__cta { display: block; margin-top: 16px; font-size: 14px; font-weight: 700; color: #a5191b; }
.untdf-floating-notice__cta span { display: inline-block; transition: transform .18s ease; }
.untdf-floating-notice__link:hover .untdf-floating-notice__cta span { transform: translateX(4px); }
.untdf-floating-notice__image { display: block; width: 100%; max-height: 130px; object-fit: cover; margin-bottom: 14px; border-radius: 8px; }
.untdf-floating-notice__close { position: absolute; top: 4px; right: 4px; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; background: #fff; color: #555; font: inherit; font-size: 28px; cursor: pointer; border-radius: 50%; }
.untdf-floating-notice__close:hover { background: #f0f0f0; }
.untdf-floating-notice :focus-visible { outline: 3px solid #145b7a; outline-offset: -3px; }
@media (max-width: 600px) {
    .untdf-floating-notice { right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); width: min(290px, calc(100vw - 32px)); max-height: 45vh; }
    .untdf-floating-notice__image { max-height: 90px; }
}

/* Solo enlaces de texto: los botones, imágenes y tarjetas conservan su diseño. */
:is(.page-internal__content, .section-page__card, .institute-page__entry-content, .claustro-page__content, .single-news__content, .single-story__content, .single-event__content, .editor-styles-wrapper) :is(p, li, dd, td, th) a:not([class]):not(:has(img)) {
    color: #145b7a;
    font-weight: 600;
    letter-spacing: normal;
    text-decoration: none;
    border-bottom: 0;
    background-image: linear-gradient(currentColor, currentColor);
    background-position: 0 100%;
    background-size: 0 1px;
    background-repeat: no-repeat;
    transition: background-size .18s ease;
}
:is(.page-internal__content, .section-page__card, .institute-page__entry-content, .claustro-page__content, .single-news__content, .single-story__content, .single-event__content, .editor-styles-wrapper) :is(p, li, dd, td, th) a:not([class]):not(:has(img))::after {
    content: "\00a0↗";
    font-size: .78em;
}
:is(.page-internal__content, .section-page__card, .institute-page__entry-content, .claustro-page__content, .single-news__content, .single-story__content, .single-event__content, .editor-styles-wrapper) :is(p, li, dd, td, th) a:not([class]):not(:has(img)):is(:hover, :focus-visible) {
    background-size: 100% 1px;
}
:is(.page-internal__content, .section-page__card, .institute-page__entry-content, .claustro-page__content, .single-news__content, .single-story__content, .single-event__content, .editor-styles-wrapper) a:focus-visible { outline: 2px solid #145b7a; outline-offset: 3px; }

/* Reducir el espacio anterior a los encabezados sin comprimir sus líneas. */
:is(.page-internal__content, .section-page__card, .institute-page__entry-content, .claustro-page__content, .single-news__content, .single-story__content, .single-event__content, .editor-styles-wrapper) :is(h2, h3, h4, h5, h6):not([class]),
:is(.page-internal__content, .section-page__card, .institute-page__entry-content, .claustro-page__content, .single-news__content, .single-story__content, .single-event__content, .editor-styles-wrapper) .wp-block-heading {
    margin-top: 1em;
    margin-bottom: .45em;
    line-height: 1.12;
}
:is(.page-internal__content, .section-page__card, .institute-page__entry-content, .claustro-page__content, .single-news__content, .single-story__content, .single-event__content) > :is(h1, h2, h3, h4, h5, h6):first-child { margin-top: 0; }
@media (prefers-reduced-motion: reduce) {
    .untdf-floating-notice__cta span,
    :is(.page-internal__content, .section-page__card, .institute-page__entry-content, .claustro-page__content, .single-news__content, .single-story__content, .single-event__content, .editor-styles-wrapper) a { transition: none !important; }
}
