/* =========================================================
   EBOOKS
   Biblioteca digital · Lujo · Transformación
========================================================= */

.ebooks-page {
    --ebooks-black: #070607;
    --ebooks-deep: #120d10;
    --ebooks-pink: #ef559a;
    --ebooks-pink-soft: #f89ac1;
    --ebooks-gold: #d7b46e;
    --ebooks-ivory: #f5eee8;

    width: 100%;
    max-width: 100%;

    overflow-x: hidden;

    background: var(--ebooks-black);
    color: #ffffff;
}

.ebooks-page.ebook-modal-open {
    overflow: hidden;
}

.ebooks-page .header--inner {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

/* HERO */

.ebooks-hero {
    position: relative;

    min-height: 100svh;

    display: flex;
    align-items: flex-end;

    overflow: hidden;
    isolation: isolate;

    background: #070607;
}

.ebooks-hero__image {
    position: absolute;
    inset: 0;
    z-index: -5;

    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center;

    filter:
        contrast(1.04)
        brightness(0.7)
        saturate(0.82);

    animation: ebooksHeroZoom 16s ease-in-out infinite alternate;
}

@keyframes ebooksHeroZoom {
    to {
        transform: scale(1.055);
    }
}

.ebooks-hero__overlay {
    position: absolute;
    inset: 0;
    z-index: -4;

    background:
        linear-gradient(
            0deg,
            rgba(7, 6, 7, 0.98) 0%,
            rgba(7, 6, 7, 0.18) 55%,
            rgba(7, 6, 7, 0.48) 100%
        ),
        linear-gradient(
            90deg,
            rgba(7, 6, 7, 0.84),
            transparent 70%
        ),
        radial-gradient(
            circle at 78% 24%,
            rgba(215, 180, 110, 0.16),
            transparent 32%
        );
}

.ebooks-hero__glow {
    position: absolute;
    inset: -20%;
    z-index: -3;

    background:
        radial-gradient(
            circle at 20% 30%,
            rgba(239, 85, 154, 0.12),
            transparent 26%
        ),
        radial-gradient(
            circle at 82% 68%,
            rgba(215, 180, 110, 0.12),
            transparent 30%
        );

    filter: blur(30px);

    animation: ebooksGlow 10s ease-in-out infinite alternate;
}

@keyframes ebooksGlow {
    to {
        transform: translate3d(3%, -2%, 0) scale(1.08);
    }
}

.ebooks-particles {
    position: absolute;
    inset: 0;
    z-index: -1;

    pointer-events: none;
}

.ebooks-particles span {
    position: absolute;

    width: 4px;
    height: 4px;

    border-radius: 50%;

    background: var(--ebooks-gold);

    box-shadow: 0 0 14px rgba(215, 180, 110, 0.7);

    opacity: 0;

    animation: ebooksParticle 8s ease-in-out infinite;
}

.ebooks-particles span:nth-child(1) {
    top: 24%;
    left: 15%;
}

.ebooks-particles span:nth-child(2) {
    top: 38%;
    left: 72%;
    animation-delay: 1.5s;
}

.ebooks-particles span:nth-child(3) {
    top: 68%;
    left: 84%;
    animation-delay: 3s;
}

.ebooks-particles span:nth-child(4) {
    top: 78%;
    left: 28%;
    animation-delay: 4.5s;
}

.ebooks-particles span:nth-child(5) {
    top: 18%;
    left: 90%;
    animation-delay: 6s;
}

@keyframes ebooksParticle {
    0%,
    100% {
        opacity: 0;
        transform: translateY(15px) scale(0.7);
    }

    45% {
        opacity: 0.85;
    }

    65% {
        opacity: 0.3;
        transform: translateY(-24px) scale(1.1);
    }
}

.ebooks-hero__content {
    position: relative;
    z-index: 3;

    width: min(90%, 1450px);

    margin: 0 auto;
    padding: 145px 0 76px;
}

.ebooks-kicker {
    margin-bottom: 12px;

    color: var(--ebooks-gold);

    font-size: 0.61rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.ebooks-hero__title {
    max-width: 1100px;

    font-family: var(--font-title);
    font-size: clamp(4.8rem, 8.8vw, 9.2rem);
    font-weight: 400;
    line-height: 0.87;
    letter-spacing: -0.055em;
}

.ebooks-hero__title em {
    position: relative;

    color: var(--ebooks-pink-soft);

    font-weight: 400;
    font-style: italic;
}

.ebooks-hero__title em::after {
    content: "";

    position: absolute;
    right: -0.03em;
    bottom: -0.02em;
    left: -0.03em;

    height: 2px;

    background: var(--ebooks-gold);

    transform: rotate(-1deg);
}

.ebooks-hero__description {
    max-width: 610px;

    margin-top: 27px;

    color: rgba(255, 255, 255, 0.68);

    font-size: 0.9rem;
    line-height: 1.75;
}

.ebooks-link {
    width: fit-content;

    display: inline-flex;
    align-items: center;
    gap: 12px;

    margin-top: 25px;
    padding-bottom: 6px;

    border-bottom: 1px solid rgba(255, 255, 255, 0.46);

    font-size: 0.56rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.ebooks-link:hover {
    color: var(--ebooks-pink-soft);
    border-color: var(--ebooks-pink-soft);
}

/* INTRO */

.ebooks-intro {
    width: min(88%, 1180px);

    margin: 0 auto;
    padding: 110px 0 115px;

    text-align: center;
}

.ebooks-intro h2 {
    font-family: var(--font-title);
    font-size: clamp(3.4rem, 6.7vw, 7.3rem);
    font-weight: 400;
    line-height: 0.91;
    letter-spacing: -0.055em;
}

.ebooks-intro h2 em {
    position: relative;

    color: var(--ebooks-pink-soft);

    font-weight: 400;
    font-style: italic;
}

.ebooks-intro h2 em::after {
    content: "";

    position: absolute;
    right: -0.04em;
    bottom: -0.03em;
    left: -0.04em;

    height: 2px;

    background: var(--ebooks-gold);

    transform: rotate(-1deg);
}

.ebooks-intro__copy {
    max-width: 620px;

    margin: 28px auto 0;

    color: rgba(255, 255, 255, 0.59);

    line-height: 1.75;
}

/* COLLECTION */

.ebooks-collection {
    padding: 82px 5% 112px;

    background:
        radial-gradient(
            circle at 14% 16%,
            rgba(239, 85, 154, 0.08),
            transparent 28%
        ),
        linear-gradient(
            180deg,
            #0c090b,
            #070607
        );
}

.ebooks-collection__heading {
    width: min(100%, 1320px);

    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 36px;

    margin: 0 auto 58px;
}

.ebooks-collection__heading h2 {
    max-width: 820px;

    font-family: var(--font-title);
    font-size: clamp(3rem, 5vw, 5.4rem);
    font-weight: 400;
    line-height: 0.96;
    letter-spacing: -0.045em;
}

.ebooks-collection__count {
    padding-bottom: 8px;

    border-bottom: 1px solid rgba(215, 180, 110, 0.45);

    color: rgba(255, 255, 255, 0.44);

    font-size: 0.5rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.ebooks-grid {
    width: min(100%, 1240px);

    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(28px, 4vw, 65px);
    align-items: end;

    margin: 0 auto;
}

.ebook-card {
    min-width: 0;

    text-align: center;
}

.ebook-card--glow {
    transform: translateY(22px) rotate(-1.2deg);
}

.ebook-card--drama {
    transform: translateY(-15px);
}

.ebook-card--reinas {
    transform: translateY(35px) rotate(1.2deg);
}

.ebook-card__cover {
    position: relative;

    width: min(100%, 310px);
    aspect-ratio: 2 / 3;

    margin: 0 auto;

    overflow: hidden;

    border: 0;

    background: #111111;

    cursor: pointer;

    box-shadow:
        0 32px 75px rgba(0, 0, 0, 0.48),
        0 0 0 1px rgba(255, 255, 255, 0.08);

    transform-style: preserve-3d;

    transition:
        transform 0.55s ease,
        box-shadow 0.55s ease;
}

.ebook-card__cover::before {
    content: "";

    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 3;

    width: 7px;

    background:
        linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.18),
            rgba(0, 0, 0, 0.36)
        );

    pointer-events: none;
}

.ebook-card__cover:hover {
    transform:
        translateY(-14px)
        rotateY(-4deg)
        rotateX(2deg);

    box-shadow:
        0 48px 100px rgba(0, 0, 0, 0.58),
        0 0 38px rgba(239, 85, 154, 0.09),
        0 0 0 1px rgba(215, 180, 110, 0.28);
}

.ebook-card__cover img {
    width: 100%;
    height: 100%;

    object-fit: cover;
}

.ebook-card__shine {
    position: absolute;
    top: -30%;
    left: -85%;
    z-index: 4;

    width: 42%;
    height: 165%;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(255, 255, 255, 0.25),
            transparent
        );

    filter: blur(5px);

    transform: rotate(16deg);

    transition: left 0.8s ease;

    pointer-events: none;
}

.ebook-card__cover:hover .ebook-card__shine {
    left: 145%;
}

.ebook-card__content {
    max-width: 340px;

    margin: 27px auto 0;
}

.ebook-card__content > p {
    color: var(--ebooks-gold);

    font-size: 0.48rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.ebook-card__content h3 {
    margin-top: 10px;

    font-family: var(--font-title);
    font-size: clamp(1.8rem, 2.8vw, 2.8rem);
    font-weight: 400;
    line-height: 1.02;
}

.ebook-card__button {
    display: inline-flex;
    align-items: center;
    gap: 12px;

    margin-top: 17px;
    padding-bottom: 6px;

    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.35);

    background: transparent;
    color: #ffffff;

    font-size: 0.5rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;

    cursor: pointer;
}

.ebook-card__button span {
    color: var(--ebooks-pink-soft);
}

.ebook-card__button:hover {
    color: var(--ebooks-pink-soft);
    border-color: var(--ebooks-pink-soft);
}

/* STATEMENT */

.ebooks-statement {
    width: min(88%, 1180px);

    margin: 0 auto;
    padding: 120px 0 130px;

    text-align: center;
}

.ebooks-statement__line {
    width: 1px;
    height: 76px;

    margin: 0 auto 30px;

    background:
        linear-gradient(
            transparent,
            var(--ebooks-gold)
        );
}

.ebooks-statement h2 {
    font-family: var(--font-title);
    font-size: clamp(3.6rem, 7vw, 7.7rem);
    font-weight: 400;
    line-height: 0.9;
    letter-spacing: -0.055em;
}

.ebooks-statement h2 em {
    position: relative;

    color: var(--ebooks-pink-soft);

    font-weight: 400;
    font-style: italic;
}

.ebooks-statement h2 em::after {
    content: "";

    position: absolute;
    right: -0.04em;
    bottom: -0.03em;
    left: -0.04em;

    height: 2px;

    background: var(--ebooks-gold);

    transform: rotate(-1deg);
}

/* CTA */

.ebooks-contact {
    background:
        radial-gradient(
            circle at 78% 28%,
            rgba(239, 85, 154, 0.15),
            transparent 35%
        ),
        linear-gradient(
            180deg,
            #110c0f,
            #070607
        );
}

.ebooks-contact .contact__background-text {
    color: rgba(215, 180, 110, 0.045);
}

.ebooks-contact .contact__eyebrow {
    color: var(--ebooks-gold);
}

.ebooks-contact .contact__button {
    border-color: rgba(239, 85, 154, 0.5);
}

.ebooks-contact .contact__button span {
    color: var(--ebooks-gold);
}

/* MODALS */

.ebook-modal {
    position: fixed;
    inset: 0;
    z-index: 9000;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 24px;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
        opacity 0.35s ease,
        visibility 0.35s ease;
}

.ebook-modal.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.ebook-modal__backdrop {
    position: absolute;
    inset: 0;

    background: rgba(3, 3, 3, 0.92);

    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.ebook-modal__window {
    position: relative;
    z-index: 2;

    width: min(100%, 980px);
    max-height: 88svh;

    display: grid;
    grid-template-columns: 0.8fr 1.2fr;

    overflow-y: auto;

    border: 1px solid rgba(215, 180, 110, 0.28);
    border-radius: 18px;

    background:
        radial-gradient(
            circle at 90% 10%,
            rgba(239, 85, 154, 0.11),
            transparent 30%
        ),
        linear-gradient(
            145deg,
            #171013,
            #090809 70%
        );

    box-shadow:
        0 42px 120px rgba(0, 0, 0, 0.68);

    transform: translateY(24px) scale(0.97);

    transition: transform 0.4s ease;
}

.ebook-modal.is-open .ebook-modal__window {
    transform: translateY(0) scale(1);
}

.ebook-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 5;

    width: 40px;
    height: 40px;

    display: grid;
    place-items: center;

    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;

    background: rgba(7, 6, 7, 0.74);
    color: #ffffff;

    font-size: 1.65rem;
    line-height: 1;

    cursor: pointer;
}

.ebook-modal__cover {
    min-height: 600px;

    padding: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-right: 1px solid rgba(255, 255, 255, 0.08);

    background:
        radial-gradient(
            circle at 50% 25%,
            rgba(215, 180, 110, 0.11),
            transparent 34%
        );
}

.ebook-modal__cover img {
    width: min(100%, 280px);
    max-height: 520px;

    object-fit: contain;

    box-shadow: 0 30px 75px rgba(0, 0, 0, 0.48);
}

.ebook-modal__content {
    display: flex;
    flex-direction: column;
    justify-content: center;

    padding: 65px 58px 58px;
}

.ebook-modal__content h2 {
    max-width: 580px;

    font-family: var(--font-title);
    font-size: clamp(2.7rem, 4.5vw, 4.8rem);
    font-weight: 400;
    line-height: 0.96;
    letter-spacing: -0.045em;
}

.ebook-modal__content > p:not(.ebooks-kicker) {
    max-width: 560px;

    margin-top: 19px;

    color: rgba(255, 255, 255, 0.66);

    font-size: 0.84rem;
    line-height: 1.7;
}

.ebook-modal__content ul {
    display: grid;
    gap: 9px;

    margin-top: 22px;
    padding: 0;

    list-style: none;
}

.ebook-modal__content li {
    position: relative;

    padding-left: 17px;

    color: rgba(255, 255, 255, 0.72);

    font-size: 0.78rem;
    line-height: 1.5;
}

.ebook-modal__content li::before {
    content: "✦";

    position: absolute;
    top: 0.08em;
    left: 0;

    color: var(--ebooks-gold);

    font-size: 0.68em;
}

.ebook-modal__action {
    width: fit-content;

    display: inline-flex;
    align-items: center;
    gap: 14px;

    margin-top: 28px;
    padding: 12px 19px;

    border: 1px solid rgba(239, 85, 154, 0.56);
    border-radius: 999px;

    color: #ffffff;

    font-size: 0.54rem;
    font-weight: 600;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.ebook-modal__action span {
    color: var(--ebooks-gold);
}

.ebook-modal__action:hover {
    background: rgba(239, 85, 154, 0.1);
    border-color: var(--ebooks-pink-soft);
}

/* TABLET */

@media (max-width: 1050px) {

    .ebooks-grid {
        gap: 28px;
    }

    .ebook-card__cover {
        width: min(100%, 270px);
    }

    .ebook-modal__window {
        grid-template-columns: 0.85fr 1.15fr;
    }

    .ebook-modal__cover {
        min-height: 540px;

        padding: 32px;
    }

    .ebook-modal__content {
        padding: 58px 40px 45px;
    }
}

/* MÓVIL */

@media (max-width: 720px) {

    .ebooks-page {
        overflow-x: hidden;
    }

    .ebooks-hero {
        min-height: 100svh;
        height: 100svh;
    }

    .ebooks-hero__image {
        object-position: 56% center;
    }

    .ebooks-hero__content {
        width: 100%;

        padding: 102px 20px 36px;
    }

    .ebooks-kicker {
        margin-bottom: 9px;

        font-size: 0.49rem;
        letter-spacing: 0.17em;
    }

    .ebooks-hero__title {
        font-size: clamp(3.2rem, 13vw, 4.8rem);
        line-height: 0.9;
    }

    .ebooks-hero__description {
        max-width: 310px;

        margin-top: 18px;

        font-size: 0.79rem;
        line-height: 1.62;
    }

    .ebooks-link {
        margin-top: 19px;

        font-size: 0.5rem;
    }

    .ebooks-intro {
        width: 100%;

        padding: 65px 20px 72px;
    }

    .ebooks-intro h2 {
        max-width: 335px;

        margin: 0 auto;

        font-size: clamp(2.6rem, 10.5vw, 4rem);
        line-height: 0.96;
    }

    .ebooks-intro__copy {
        max-width: 320px;

        margin-top: 20px;

        font-size: 0.8rem;
        line-height: 1.62;
    }

    .ebooks-collection {
        padding: 52px 18px 72px;
    }

    .ebooks-collection__heading {
        display: block;

        margin-bottom: 38px;
    }

    .ebooks-collection__heading h2 {
        max-width: 330px;

        font-size: clamp(2.4rem, 9.3vw, 3.2rem);
        line-height: 1;
    }

    .ebooks-collection__count {
        display: inline-block;

        margin-top: 18px;
    }

    .ebooks-grid {
        grid-template-columns: 1fr;
        gap: 70px;
    }

    .ebook-card,
    .ebook-card--glow,
    .ebook-card--drama,
    .ebook-card--reinas {
        transform: none;
    }

    .ebook-card__cover {
        width: min(82vw, 290px);
    }

    .ebook-card__content {
        margin-top: 23px;
    }

    .ebook-card__content h3 {
        max-width: 320px;

        margin-inline: auto;

        font-size: clamp(1.9rem, 8vw, 2.7rem);
    }

    .ebooks-statement {
        width: 100%;

        padding: 76px 20px 84px;
    }

    .ebooks-statement__line {
        height: 52px;
    }

    .ebooks-statement h2 {
        font-size: clamp(2.8rem, 11vw, 4.2rem);
        line-height: 0.93;
    }

    .ebooks-contact.contact--cta {
        padding: 44px 20px 48px;
    }

    .ebooks-contact .contact__title {
        max-width: 325px;

        margin: 0 auto 22px;

        font-size: clamp(2rem, 8vw, 2.7rem);
        line-height: 1.02;
    }

    .ebooks-contact .contact__button {
        min-width: 170px;
        height: 42px;

        padding: 0 17px;

        font-size: 0.52rem;
    }

    .ebook-modal {
        padding: 12px;
    }

    .ebook-modal__window {
        width: 100%;
        max-height: 91svh;

        display: block;

        border-radius: 14px;
    }

    .ebook-modal__cover {
        min-height: 0;

        padding: 35px 50px 24px;

        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .ebook-modal__cover img {
        width: min(100%, 190px);
        max-height: 285px;
    }

    .ebook-modal__content {
        padding: 30px 22px 28px;
    }

    .ebook-modal__content h2 {
        padding-right: 20px;

        font-size: clamp(2.1rem, 9vw, 3rem);
        line-height: 1;
    }

    .ebook-modal__content > p:not(.ebooks-kicker) {
        margin-top: 14px;

        font-size: 0.78rem;
        line-height: 1.58;
    }

    .ebook-modal__content ul {
        gap: 7px;

        margin-top: 17px;
    }

    .ebook-modal__content li {
        font-size: 0.72rem;
    }

    .ebook-modal__action {
        margin-top: 21px;

        padding: 10px 16px;

        font-size: 0.5rem;
    }
}

@media (max-width: 390px) {

    .ebooks-hero__content {
        padding: 94px 18px 30px;
    }

    .ebooks-hero__title {
        font-size: clamp(2.9rem, 12.5vw, 4.2rem);
    }

    .ebook-card__cover {
        width: min(84vw, 270px);
    }

    .ebook-modal__cover {
        padding-inline: 42px;
    }

    .ebook-modal__cover img {
        max-height: 250px;
    }
}

@media (prefers-reduced-motion: reduce) {

    .ebooks-hero__image,
    .ebooks-hero__glow,
    .ebooks-particles span {
        animation: none !important;
    }
}


/* =========================================================
   EBOOKS — CARRUSEL DE LIBROS EN MÓVIL
========================================================= */

@media (max-width: 720px) {

    .ebooks-collection {
        padding-right: 0;
        padding-left: 0;
        overflow: hidden;
    }

    .ebooks-collection__heading {
        width: calc(100% - 40px);
        margin-right: auto;
        margin-left: auto;
    }

    .ebooks-grid {
        width: 100%;

        display: flex;
        align-items: flex-start;
        gap: 14px;

        overflow-x: auto;
        overflow-y: hidden;

        margin: 0;
        padding:
            8px
            20px
            34px;

        scroll-snap-type: x mandatory;
        scroll-padding-left: 20px;

        scrollbar-width: none;

        -webkit-overflow-scrolling: touch;
    }

    .ebooks-grid::-webkit-scrollbar {
        display: none;
    }

    .ebook-card,
    .ebook-card--glow,
    .ebook-card--drama,
    .ebook-card--reinas {
        flex: 0 0 min(78vw, 300px);

        width: min(78vw, 300px);
        min-width: 0;

        margin: 0;

        transform: none;

        scroll-snap-align: center;
    }

    .ebook-card__cover {
        width: 100%;
        max-width: none;
    }

    .ebook-card__content {
        min-height: 145px;

        margin-top: 21px;
        padding-inline: 5px;
    }

    .ebook-card__content > p {
        font-size: 0.43rem;
    }

    .ebook-card__content h3 {
        font-size: clamp(1.75rem, 7vw, 2.35rem);
    }

    .ebook-card__button {
        margin-top: 14px;
    }
}

.ebooks-swipe-hint {
    display: none;
}

@media (max-width: 720px) {

    .ebooks-swipe-hint {
        width: calc(100% - 40px);

        display: flex;
        align-items: center;
        justify-content: space-between;

        margin: 2px auto 0;

        color: rgba(255, 255, 255, 0.45);

        font-size: 0.45rem;
        letter-spacing: 0.13em;
        text-transform: uppercase;
    }

    .ebooks-swipe-hint span {
        color: var(--ebooks-gold);
        font-size: 1rem;
    }
}




/* =========================================================
   AVISO PARA DESLIZAR EL CARRUSEL DE EBOOKS
========================================================= */

.ebooks-swipe-hint {
    display: none;
}

@media (max-width: 720px) {

    .ebooks-swipe-hint {
        width: calc(100% - 40px);

        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 18px;

        margin: 4px auto 0;
        padding: 12px 0 0;

        border-top: 1px solid rgba(255, 255, 255, 0.12);

        color: rgba(255, 255, 255, 0.62);

        font-size: 0.47rem;
        font-weight: 600;
        line-height: 1.4;
        letter-spacing: 0.13em;
        text-transform: uppercase;
    }

    .ebooks-swipe-hint i {
        color: var(--ebooks-gold);

        font-size: 1.25rem;
        font-style: normal;

        animation: ebookSwipeArrow 1.4s ease-in-out infinite;
    }

    @keyframes ebookSwipeArrow {
        0%,
        100% {
            transform: translateX(0);
            opacity: 0.55;
        }

        50% {
            transform: translateX(7px);
            opacity: 1;
        }
    }
}


/* =========================================================
   EBOOKS MÓVIL — LIBROS MÁS PEQUEÑOS + AVISO MÁS CERCA
========================================================= */

@media (max-width: 720px) {

    .ebooks-grid {
        gap: 12px;

        /* Reducimos el espacio inferior del carrusel */
        padding:
            6px
            20px
            12px;
    }

    .ebook-card,
    .ebook-card--glow,
    .ebook-card--drama,
    .ebook-card--reinas {
        /* Antes era aproximadamente 78vw / 300px */
        flex: 0 0 min(68vw, 255px);

        width: min(68vw, 255px);
    }

    .ebook-card__cover {
        width: 100%;
        max-width: 255px;
    }

    .ebook-card__content {
        min-height: 125px;

        margin-top: 16px;
        padding-inline: 3px;
    }

    .ebook-card__content > p {
        font-size: 0.4rem;
        line-height: 1.4;
    }

    .ebook-card__content h3 {
        margin-top: 7px;

        font-size: clamp(1.55rem, 6.4vw, 2.05rem);
        line-height: 1.02;
    }

    .ebook-card__button {
        margin-top: 11px;

        font-size: 0.46rem;
    }

    .ebooks-swipe-hint {
        width: calc(100% - 40px);

        /* Lo acercamos mucho más a los libros */
        margin: 0 auto;
        padding-top: 8px;

        font-size: 0.43rem;
    }
}

@media (max-width: 390px) {

    .ebook-card,
    .ebook-card--glow,
    .ebook-card--drama,
    .ebook-card--reinas {
        flex-basis: min(66vw, 235px);
        width: min(66vw, 235px);
    }

    .ebook-card__cover {
        max-width: 235px;
    }

    .ebooks-swipe-hint {
        padding-top: 6px;
    }
}