/**
 * Mini Banners Hero para Creative Elements - estilos del front
 */
.zdhc {
    --zdhc-cols: 3;
    --zdhc-row: 260px;
    --zdhc-gap: 24px;
    --zdhc-r: 12px;
    --zdhc-pad: 36px;
    --zdhc-ov: #000;
    --zdhc-ov-o: .55;
    --zdhc-bg: #1a1a1a;
    --zdhc-light: #fff;
    --zdhc-dark: #111;
    --zdhc-btn-bg: #fff;
    --zdhc-btn-fg: #111;
    --zdhc-peek: 84%;
    --zdhc-ease: cubic-bezier(.2, .7, .2, 1);
    position: relative;
}

.zdhc *,
.zdhc *::before,
.zdhc *::after {
    box-sizing: border-box;
}

/* ---------------- Grilla ---------------- */

.zdhc-grid {
    display: grid;
    gap: var(--zdhc-gap);
    grid-auto-rows: var(--zdhc-row);
    grid-template-columns: repeat(var(--zdhc-cols), minmax(0, 1fr));
}

.zdhc-layout--free .zdhc-grid {
    grid-auto-flow: dense;
}

.zdhc-size--wide { grid-column: span 2; }
.zdhc-size--tall { grid-row: span 2; }
.zdhc-size--big { grid-column: span 2; grid-row: span 2; }

/* Bento: 1 grande a la izquierda, chicos a la derecha, el último ancho. */
.zdhc-layout--bento .zdhc-grid {
    grid-template-columns: 1.9fr 1fr 1fr;
}

.zdhc-layout--bento .zdhc-card:first-child {
    grid-row: span 2;
}

.zdhc-layout--bento.zdhc-count--2 .zdhc-grid { grid-template-columns: 1.6fr 1fr; }
.zdhc-layout--bento.zdhc-count--2 .zdhc-card:nth-child(2) { grid-row: span 2; }
.zdhc-layout--bento.zdhc-count--3 .zdhc-card:nth-child(n+2) { grid-column: span 2; }
.zdhc-layout--bento.zdhc-count--4 .zdhc-card:nth-child(4) { grid-column: span 2; }

/* Destacado: 1 grande y el resto apilado a su lado. */
.zdhc-layout--feature .zdhc-grid {
    grid-template-columns: 1.5fr 1fr;
}

.zdhc-layout--feature.zdhc-count--3 .zdhc-card:first-child { grid-row: span 2; }
.zdhc-layout--feature.zdhc-count--4 .zdhc-card:first-child { grid-row: span 3; }
.zdhc-layout--feature.zdhc-count--5 .zdhc-card:first-child,
.zdhc-layout--feature.zdhc-count--6 .zdhc-card:first-child { grid-row: span 2; }
.zdhc-layout--feature.zdhc-count--5 .zdhc-grid,
.zdhc-layout--feature.zdhc-count--6 .zdhc-grid { grid-template-columns: 1.6fr 1fr 1fr; }

/* ---------------- Banner ---------------- */

.zdhc-card {
    position: relative;
    min-width: 0;
    overflow: hidden;
    isolation: isolate;
    border-radius: var(--zdhc-r);
    background: var(--zdhc-bg);
    color: var(--zdhc-light);
    transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
    transition: transform .5s var(--zdhc-ease), box-shadow .4s ease;
    -webkit-mask-image: -webkit-radial-gradient(white, black);
}

.zdhc-theme--dark {
    color: var(--zdhc-dark);
}

.zdhc-media {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.zdhc-picture,
.zdhc-img,
.zdhc-video {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    transition: transform 1.2s var(--zdhc-ease);
}

.zdhc-video {
    opacity: 0;
    transition: opacity .6s ease, transform 1.2s var(--zdhc-ease);
}

.zdhc-video.is-playing {
    opacity: 1;
}

.zdhc-ph {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #2b2b2b, #4a4a4a);
}

/* Capa degradada desde el lado del texto. */
.zdhc-media::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    opacity: var(--zdhc-ov-o);
    background: linear-gradient(to top, var(--zdhc-ov) 0%, transparent 62%);
    transition: opacity .5s ease;
    pointer-events: none;
}

.zdhc-pos--top-left .zdhc-media::after {
    background: linear-gradient(to bottom, var(--zdhc-ov) 0%, transparent 62%);
}

.zdhc-pos--center .zdhc-media::after {
    background: var(--zdhc-ov);
    opacity: calc(var(--zdhc-ov-o) * .6);
}

.zdhc-theme--dark .zdhc-media::after {
    background: linear-gradient(to top, rgba(255, 255, 255, .9) 0%, transparent 60%);
}

.zdhc-theme--dark.zdhc-pos--top-left .zdhc-media::after {
    background: linear-gradient(to bottom, rgba(255, 255, 255, .9) 0%, transparent 60%);
}

.zdhc-theme--dark.zdhc-pos--center .zdhc-media::after {
    background: rgba(255, 255, 255, .7);
}

.zdhc-card:hover .zdhc-media::after {
    opacity: calc(var(--zdhc-ov-o) + .1);
}

/* ---------------- Texto ---------------- */

.zdhc-content {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    padding: var(--zdhc-pad);
    pointer-events: none;
}

.zdhc-pos--bottom-center .zdhc-content {
    align-items: center;
    text-align: center;
}

.zdhc-pos--center .zdhc-content {
    justify-content: center;
    align-items: center;
    text-align: center;
}

.zdhc-pos--top-left .zdhc-content {
    justify-content: flex-start;
}

.zdhc-copy {
    max-width: 30ch;
    transition: transform .5s var(--zdhc-ease);
}

.zdhc-card.is-big .zdhc-copy {
    max-width: 22ch;
}

.zdhc-eyebrow {
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    opacity: .85;
}

.zdhc-title {
    margin: 0;
    color: inherit;
    font-size: clamp(19px, 1.65vw, 26px);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -.01em;
}

.zdhc-card.is-big .zdhc-title {
    font-size: clamp(24px, 2.5vw, 38px);
}

.zdhc-text {
    margin: 10px 0 0;
    color: inherit;
    font-size: 15px;
    line-height: 1.5;
    opacity: .88;
}

/* Botón circular con flecha. */
.zdhc-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    margin: -54px 0 14px;
    border-radius: 50%;
    background: var(--zdhc-btn-bg);
    color: var(--zdhc-btn-fg);
    opacity: 0;
    transform: translateY(14px) scale(.6);
    transition: opacity .35s ease, transform .45s cubic-bezier(.3, 1.4, .5, 1), margin .45s var(--zdhc-ease);
}

.zdhc-card.is-big .zdhc-arrow {
    width: 48px;
    height: 48px;
    margin-top: -62px;
}

.zdhc-txt--arrow .zdhc-card:hover .zdhc-arrow,
.zdhc-txt--arrow .zdhc-card:focus-within .zdhc-arrow {
    margin-top: 0;
    opacity: 1;
    transform: none;
}

.zdhc-txt--lift .zdhc-arrow,
.zdhc-txt--reveal .zdhc-arrow,
.zdhc-txt--none .zdhc-arrow {
    margin-top: 0;
    opacity: 1;
    transform: none;
}

.zdhc-txt--lift .zdhc-card:hover .zdhc-copy {
    transform: translateY(-8px);
}

.zdhc-txt--lift .zdhc-card:hover .zdhc-arrow {
    transform: translateX(4px);
}

/* Texto con botón. */
.zdhc-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    padding: 11px 20px;
    border-radius: 999px;
    background: var(--zdhc-btn-bg);
    color: var(--zdhc-btn-fg);
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    transition: gap .3s ease, transform .3s ease;
}

.zdhc-card:hover .zdhc-btn {
    gap: 12px;
}

.zdhc-btn--square .zdhc-btn {
    border-radius: 0;
}

.zdhc-btn--link .zdhc-btn {
    padding: 0 0 4px;
    border-radius: 0;
    background: linear-gradient(currentColor, currentColor) left bottom / 100% 1.5px no-repeat;
    color: inherit;
}

/* Revelar: texto y botón aparecen al pasar el mouse. */
.zdhc-txt--reveal .zdhc-text,
.zdhc-txt--reveal .zdhc-btn,
.zdhc-txt--reveal .zdhc-arrow {
    max-height: 0;
    margin-top: 0;
    margin-bottom: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height .5s var(--zdhc-ease), opacity .4s ease, margin .5s var(--zdhc-ease);
}

.zdhc-txt--reveal .zdhc-card:hover .zdhc-text,
.zdhc-txt--reveal .zdhc-card:focus-within .zdhc-text {
    max-height: 9em;
    margin-top: 10px;
    opacity: .88;
}

.zdhc-txt--reveal .zdhc-card:hover .zdhc-btn,
.zdhc-txt--reveal .zdhc-card:focus-within .zdhc-btn {
    max-height: 60px;
    margin-top: 18px;
    opacity: 1;
}

.zdhc-txt--reveal .zdhc-card:hover .zdhc-arrow,
.zdhc-txt--reveal .zdhc-card:focus-within .zdhc-arrow {
    max-height: 60px;
    margin-bottom: 14px;
    opacity: 1;
}

/* Enlace que cubre todo el banner. */
.zdhc-link {
    position: absolute;
    inset: 0;
    z-index: 3;
    border-radius: inherit;
}

.zdhc-link:focus {
    outline: none;
}

.zdhc-link:focus-visible {
    outline: 3px solid var(--zdhc-btn-bg);
    outline-offset: -6px;
}

/* ---------------- Efectos de imagen ---------------- */

.zdhc-img--zoom .zdhc-card:hover .zdhc-img,
.zdhc-img--zoom .zdhc-card:hover .zdhc-video {
    transform: scale(1.06);
}

.zdhc-img--zoomrotate .zdhc-card:hover .zdhc-img,
.zdhc-img--zoomrotate .zdhc-card:hover .zdhc-video {
    transform: scale(1.1) rotate(1.5deg);
}

.zdhc-img--tilt .zdhc-card {
    transition: transform .25s ease-out, box-shadow .4s ease;
}

.zdhc-img--tilt .zdhc-card:hover {
    box-shadow: 0 24px 50px -20px rgba(0, 0, 0, .45);
}

.zdhc-img--tilt .zdhc-card:hover .zdhc-img {
    transform: scale(1.05);
}

/* Destello. */
.zdhc--shine .zdhc-card::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: -60%;
    z-index: 2;
    width: 40%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .28), transparent);
    transform: skewX(-18deg) translateX(0);
    pointer-events: none;
}

.zdhc--shine .zdhc-card:hover::before {
    transform: skewX(-18deg) translateX(420%);
    transition: transform 1s ease;
}

/* ---------------- Entrada ---------------- */

.zdhc[class*="zdhc-in--"] .zdhc-card {
    transition: transform .5s var(--zdhc-ease), box-shadow .4s ease, opacity .8s ease, translate .9s var(--zdhc-ease), scale .9s var(--zdhc-ease), clip-path 1.1s cubic-bezier(.77, 0, .18, 1);
    transition-delay: 0s, 0s, calc(var(--i, 0) * 90ms), calc(var(--i, 0) * 90ms), calc(var(--i, 0) * 90ms), calc(var(--i, 0) * 110ms);
}

.zdhc-in--up:not(.is-inview) .zdhc-card {
    opacity: 0;
    translate: 0 36px;
}

.zdhc-in--zoom:not(.is-inview) .zdhc-card {
    opacity: 0;
    scale: .92;
}

.zdhc-in--curtain:not(.is-inview) .zdhc-card {
    clip-path: inset(100% 0 0 0 round var(--zdhc-r));
}

.zdhc-in--curtain .zdhc-card {
    clip-path: inset(0 0 0 0 round var(--zdhc-r));
}

/* Indicador del carrusel móvil. */
.zdhc-dots {
    display: none;
}

.zdhc-empty {
    padding: 24px;
    border: 1px dashed #c8c8c8;
    color: #777;
    text-align: center;
    font-size: 14px;
}

/* En pantallas táctiles no hay hover: se muestra todo. */
@media (hover: none) {
    .zdhc-txt--arrow .zdhc-arrow {
        margin-top: 0;
        opacity: 1;
        transform: none;
    }

    .zdhc-txt--reveal .zdhc-text {
        max-height: 9em;
        margin-top: 10px;
        opacity: .88;
    }

    .zdhc-txt--reveal .zdhc-btn {
        max-height: 60px;
        margin-top: 18px;
        opacity: 1;
    }

    .zdhc-txt--reveal .zdhc-arrow {
        max-height: 60px;
        margin-bottom: 14px;
        opacity: 1;
    }
}

/* ---------------- Tablet ---------------- */

@media (max-width: 1024px) {
    .zdhc-layout--bento .zdhc-grid,
    .zdhc-layout--feature .zdhc-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .zdhc-layout--bento .zdhc-card,
    .zdhc-layout--feature .zdhc-card {
        grid-row: auto !important;
        grid-column: auto !important;
    }

    .zdhc-layout--bento .zdhc-card:first-child,
    .zdhc-layout--feature .zdhc-card:first-child {
        grid-column: span 2 !important;
        grid-row: span 2 !important;
    }

    .zdhc-layout--bento.zdhc-count--4 .zdhc-card:nth-child(4),
    .zdhc-layout--bento.zdhc-count--2 .zdhc-card:nth-child(2) {
        grid-column: span 2 !important;
    }
}

/* ---------------- Móvil ---------------- */

@media (max-width: 767px) {
    .zdhc {
        --zdhc-row: 380px;
        --zdhc-gap: 12px;
        --zdhc-pad: 22px;
    }

    .zdhc-title {
        font-size: 21px;
    }

    .zdhc-card.is-big .zdhc-title {
        font-size: 26px;
    }

    .zdhc-text {
        font-size: 14px;
    }

    /* Carrusel deslizable con el siguiente asomando. */
    .zdhc-mob--carousel .zdhc-grid {
        display: flex;
        gap: var(--zdhc-gap);
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scroll-snap-type: x mandatory;
        scroll-padding: 0 var(--zdhc-gap);
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 2px;
    }

    .zdhc-mob--carousel .zdhc-grid::-webkit-scrollbar {
        display: none;
    }

    .zdhc-mob--carousel .zdhc-card {
        flex: 0 0 var(--zdhc-peek);
        height: var(--zdhc-row);
        scroll-snap-align: start;
        grid-row: auto !important;
        grid-column: auto !important;
    }

    .zdhc-mob--carousel .zdhc-card:last-child {
        scroll-snap-align: end;
    }

    .zdhc-mob--carousel .zdhc-dots {
        display: block;
        position: relative;
        height: 3px;
        margin: 16px auto 0;
        width: 30%;
        max-width: 140px;
        border-radius: 3px;
        background: rgba(0, 0, 0, .12);
        overflow: hidden;
    }

    .zdhc-dots-bar {
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        width: var(--zdhc-thumb, 30%);
        border-radius: 3px;
        background: currentColor;
        opacity: .75;
        transform: translateX(var(--zdhc-pos, 0%));
        transition: transform .15s linear;
    }

    /* Columna. */
    .zdhc-mob--stack .zdhc-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .zdhc-mob--stack .zdhc-card {
        grid-row: auto !important;
        grid-column: auto !important;
    }

    .zdhc-mob--stack .zdhc-card.is-big {
        grid-row: span 1 !important;
        min-height: calc(var(--zdhc-row) * 1.2);
    }

    /* Grilla de 2 con el primero ancho. */
    .zdhc-mob--grid2 .zdhc-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        grid-auto-rows: calc(var(--zdhc-row) * .58);
    }

    .zdhc-mob--grid2 .zdhc-card {
        grid-row: auto !important;
        grid-column: auto !important;
    }

    .zdhc-mob--grid2 .zdhc-card:first-child {
        grid-column: span 2 !important;
        grid-row: span 2 !important;
    }

    .zdhc-mob--grid2 .zdhc-card:not(:first-child) {
        --zdhc-pad: 14px;
    }

    .zdhc-mob--grid2 .zdhc-card:not(:first-child) .zdhc-title {
        font-size: 16px;
    }

    .zdhc-mob--grid2 .zdhc-card:not(:first-child) .zdhc-text,
    .zdhc-mob--grid2 .zdhc-card:not(:first-child) .zdhc-btn {
        display: none;
    }

    .zdhc-mob--grid2 .zdhc-card:not(:first-child) .zdhc-arrow {
        width: 32px;
        height: 32px;
        margin-bottom: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .zdhc *,
    .zdhc *::before,
    .zdhc *::after,
    .zdhc .zdhc-card {
        transition-duration: .01ms !important;
        transition-delay: 0s !important;
    }
}
