/* Shared by datosestudio, datostitulo and datostituloexecutive.
 * Keep each strip's existing palette, typography, icons and Bootstrap widths.
 * Only actual links/buttons receive action cues; CMS text links stay independent.
 */
.loyola-datos .loyola-datos__items {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    column-gap: 8px;
    row-gap: 16px;
}

.loyola-datos > .container {
    width: min(1320px, 96%);
}

/* Bootstrap clearfix pseudo-elements must not become extra flex items. */
.loyola-datos .loyola-datos__items::before,
.loyola-datos .loyola-datos__items::after {
    display: none;
}

.loyola-datos__items > [class*="col-"] {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding-left: 8px;
    padding-right: 8px;
}

.loyola-datos .caja {
    box-sizing: border-box;
    display: block;
    position: relative;
    flex: 1;
    width: 100%;
    min-width: 0;
    padding: 16px 4px 8px 4px;
    border: 0;
    border-radius: 4px;
    isolation: isolate;
    overflow-wrap: anywhere;
    text-align: center;
}

.loyola-datos .caja .imagen,
.loyola-datos .caja .prosa,
.loyola-datos .caja .destacado {
    display: block;
}

.loyola-datos .caja svg {
    width: 100%;
    height: auto;
    vertical-align: middle;
}

.loyola-datos .btn-datos-estudio {
    display: block;
    width: 100%;
    height: auto;
    align-self: flex-start;
    transition: filter 180ms ease;
}

.loyola-datos .caja img {
    max-width: 100%;
    height: auto;
}

.loyola-datos .loyola-datos__items > [class*="col-"] > :is(a, button) {
    display: flex;
    flex: 1;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: inherit;
    text-decoration: none;
    white-space: normal;
    appearance: none;
}

.loyola-datos .loyola-datos__items > [class*="col-"] > button {
    cursor: pointer;
}

/* Native links keep their destination, target, tracking ID and click handlers.
 * Stretch only the explicitly marked link inside a single-action card.
 */
.loyola-datos .caja:not(:has(a:not(.loyola-datos__link), button, input, select, textarea)) .loyola-datos__link::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: 4px;
}

.loyola-datos .caja a[href]:not([href=""]) {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

/* All cards share the same borderless resting state. The marker is attached to
 * the final text line: > navigates, while the window opens in-page content.
 */
.loyola-datos .loyola-datos__action-hint {
    display: none;
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.loyola-datos .loyola-datos__action-hint::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    border: 1px solid currentColor;
    border-radius: 4px;
    background: rgba(255, 255, 255, .32);
    box-shadow: 0 4px 12px rgba(0, 32, 91, .12);
    opacity: 0;
    transition: opacity 180ms ease;
}

.loyola-datos :is(a[href]:not([href=""]), button) > .caja,
.loyola-datos .caja:has(.loyola-datos__link[href]:not([href=""])):not(:has(a:not(.loyola-datos__link), button, input, select, textarea)) {
    cursor: pointer;
    transition: transform 180ms ease;
}

.loyola-datos :is(a[href]:not([href=""]), button) > .caja > .loyola-datos__action-hint,
.loyola-datos .caja:has(.loyola-datos__link[href]:not([href=""])):not(:has(a:not(.loyola-datos__link), button, input, select, textarea)) > .loyola-datos__action-hint {
    display: block;
}

/* Whole-card actions underline their final visible line. */
.loyola-datos :is(a[href]:not([href=""]), button) > .caja > :is(.prosa, .destacado):has(+ .loyola-datos__action-hint) {
    display: inline-block;
    position: relative;
    max-width: 100%;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

/* Navigation marker. Keeping it on the text pseudo-element makes it flow on
 * the same final line instead of occupying a separate row below the card.
 */
.loyola-datos a[href]:not([href=""]) > .caja > :is(.prosa, .destacado):has(+ .loyola-datos__action-hint)::after,
.loyola-datos .loyola-datos__link[href]:not([href=""])::after {
    content: none;
    position: absolute;
    left: 75%;
    bottom: 4px;
    margin-left: .42em;
    line-height: 1;
    color: inherit;
    font-weight: 700;
    text-decoration: none;
    transition: transform 180ms ease;
}

.loyola-datos .loyola-datos__link[href]:not([href=""]) {
    display: inline-block;
    position: relative;
}

/* Window marker for Bootstrap panels/modals, also aligned with the final text. */
.loyola-datos button > .caja > :is(.prosa, .destacado):has(+ .loyola-datos__action-hint)::after {
    content: none;
    position: absolute;
    bottom: 0;
    width: 15px;
    bottom: 3px;
    left: 75%;
    height: 15px;
    margin-left: .45em;
    background-color: currentColor;
    -webkit-mask: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3' y='4' width='18' height='16' rx='1.5' fill='none' stroke='black' stroke-width='1.8'/%3E%3Cpath d='M3 8h18M7 12h10M7 16h6' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
    mask: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3' y='4' width='18' height='16' rx='1.5' fill='none' stroke='black' stroke-width='1.8'/%3E%3Cpath d='M3 8h18M7 12h10M7 16h6' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
}

/* The card treatment appears only as interaction feedback. */
@media (hover: hover) and (pointer: fine) {
    .loyola-datos :is(a[href]:not([href=""]), button):hover > .btn-datos-estudio {
        filter: brightness(1.04);
    }

    .loyola-datos :is(a[href]:not([href=""]), button):hover > .caja,
    .loyola-datos .caja:has(.loyola-datos__link[href]:not([href=""])):not(:has(a:not(.loyola-datos__link), button, input, select, textarea)):hover {
        transform: translateY(-2px);
    }

    .loyola-datos :is(a[href]:not([href=""]), button):hover > .caja > .loyola-datos__action-hint::before,
    .loyola-datos .caja:has(.loyola-datos__link[href]:not([href=""])):not(:has(a:not(.loyola-datos__link), button, input, select, textarea)):hover > .loyola-datos__action-hint::before {
        opacity: .48;
    }

    .loyola-datos a[href]:not([href=""]):hover > .caja > :is(.prosa, .destacado):has(+ .loyola-datos__action-hint)::after,
    .loyola-datos .loyola-datos__link[href]:not([href=""]):hover::after {
        transform: translateX(2px);
    }
}

.loyola-datos .loyola-datos__items > [class*="col-"] > :is(a, button):focus-visible,
.loyola-datos .caja a:focus-visible {
    outline: 3px solid #00205b;
    outline-offset: 3px;
}

.loyola-datos .caja:not(:has(a:not(.loyola-datos__link), button, input, select, textarea)) .loyola-datos__link:focus-visible {
    outline: none;
}

.loyola-datos .caja:not(:has(a:not(.loyola-datos__link), button, input, select, textarea)) .loyola-datos__link:focus-visible::after {
    outline: 3px solid #00205b;
    outline-offset: 3px;
}

/* Preserve desktop column counts and centre incomplete rows. */
@media (min-width: 480px) and (max-width: 767px) {
    .loyola-datos .loyola-datos__items > [class*="col-"] {
        width: 50%;
    }
}

@media (max-width: 479px) {
    .loyola-datos > .container {
        width: 100%;
    }

    .loyola-datos .loyola-datos__items > [class*="col-"] {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .loyola-datos .btn-datos-estudio,
    .loyola-datos .caja,
    .loyola-datos .loyola-datos__action-hint::before,
    .loyola-datos a[href] > .caja > :is(.prosa, .destacado)::after,
    .loyola-datos .loyola-datos__link::after,
    .loyola-datos .loyola-datos__items > [class*="col-"] > :is(a, button) {
        transition: none;
        transform: none !important;
    }
}
