/* =========================================
   LANDING EBOOK (page-ebook.php)
   Figma: Adriana's Immigration free Ebook / v5
   ========================================= */

.landing-ebook {
    /* --- Tokens (Figma variables) --- */
    --le-surface: #fdf9f3;
    --le-surface-high: #fefcf9;
    --le-surface-soft: rgba(205, 198, 186, 0.25);
    --le-on-surface: #08202e;
    --le-on-surface-tinted: #08466c;
    --le-on-surface-soft: #858585;
    --le-primary: #e73329;
    --le-primary-hover: #bc2a21;
    --le-stroke: #858585;
    --le-stroke-tinted: #bc2a21;
    --le-chip-bg: #cedae2;
    --le-secondary-500: #08466c;
    --le-secondary-300: #6b90a7;
    --le-shadow: 0 6px 32px rgba(205, 198, 186, 0.4);

    /* Forma DJR Display / Gibson (Adobe Fonts) con fallback a las fuentes del tema */
    --le-font-display: 'forma-djr-display', 'Forma DJR Display', var(--font-heading);
    --le-font-sans: 'canada-type-gibson', 'Gibson', var(--font-body);

    --le-margin: 60px;
    --le-max: 1320px;
    --le-header-offset: 156px;

    background: var(--le-surface);
    color: var(--le-on-surface);
    font-family: var(--le-font-sans);
    overflow-x: clip;
}

/* Header sólido desde el inicio (el hero es oscuro y el menú no se lee sobre él) */
.page-template-page-ebook .site-header:not(.is-scrolled) .main-header {
    background: var(--white);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.landing-ebook h1,
.landing-ebook h2,
.landing-ebook h3,
.landing-ebook p,
.landing-ebook ul {
    margin: 0;
}

.landing-ebook ul {
    padding: 0;
    list-style: none;
}

/* --- Tipografía compartida --- */
.ebook-heading-xl {
    font-family: var(--le-font-display);
    font-weight: 900;
    font-size: 64px;
    line-height: 1.1;
    text-transform: uppercase;
    color: var(--le-on-surface);
    text-box: trim-both cap alphabetic;
}

.ebook-heading-l {
    font-family: var(--le-font-sans);
    font-weight: 500;
    font-size: 40px;
    line-height: 1.1;
    color: var(--le-on-surface);
}

/* --- Botón --- */
.ebook-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    height: 60px;
    min-width: 144px;
    padding: 12px 32px;
    border: 0;
    border-radius: 8px;
    background: var(--le-primary);
    color: #fff;
    font-family: var(--le-font-sans);
    font-weight: 600;
    font-size: 24px;
    line-height: 1.25;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.ebook-btn:hover,
.ebook-btn:focus-visible {
    background: var(--le-primary-hover);
    color: #fff;
}

.ebook-btn:active {
    transform: scale(0.98);
}

.ebook-btn__icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.ebook-btn--sm {
    gap: 8px;
    height: 52px;
    min-width: 128px;
    padding: 12px 24px;
    font-size: 18px;
    line-height: normal;
}

.ebook-btn--block {
    width: 100%;
}

/* =========================================
   HERO
   ========================================= */
.ebook-hero {
    position: relative;
    overflow: hidden;
    background: var(--le-surface);
    padding: calc(var(--le-header-offset) + 40px) var(--le-margin) 40px;
}

.ebook-hero__bg {
    position: absolute;
    left: 50%;
    top: -21px;
    width: max(1494px, 104%);
    height: calc(100% + 42px);
    transform: translateX(-50%);
    filter: blur(12px);
}

.ebook-hero__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ebook-hero__bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(252, 252, 252, 0) 57.046%, var(--le-surface) 90.844%),
        rgba(8, 70, 108, 0.25);
}

.ebook-hero__inner {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: var(--le-max);
    min-height: 680px;
    margin: 0 auto;
}

.ebook-hero__content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 28px;
    flex: 1 1 0;
    min-width: min(792px, 100%);
    color: #fff;
}

.ebook-hero__eyebrow {
    font-weight: 500;
    font-size: 28px;
    line-height: 1.1;
}

.ebook-hero__eyebrow strong {
    font-weight: 600;
}

.ebook-hero__title {
    font-family: var(--le-font-display);
    font-weight: 900;
    font-size: 96px;
    line-height: 1;
    color: #fff;
    text-box: trim-both cap alphabetic;
}

.ebook-hero__subtitle {
    padding: 0 8px;
    font-size: 20px;
    line-height: 1.32;
}

.ebook-hero__actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
}

.ebook-hero__microcopy {
    padding: 0 8px;
    font-size: 18px;
    line-height: 1.32;
}

.ebook-hero__media {
    flex: 1 1 0;
    min-width: 0;
    max-width: 512px;
    aspect-ratio: 512 / 680;
}

/* Como en Figma: la imagen se estira para llenar el recuadro (fill) */
.ebook-hero__media img {
    width: 100%;
    height: 100%;
    object-fit: fill;
    filter: drop-shadow(0 0 64px #fff);
}

/* =========================================
   FORMULARIO
   ========================================= */
.ebook-form {
    position: relative;
    overflow: hidden;
    padding: 40px var(--le-margin);
    scroll-margin-top: var(--le-header-offset);
}

.ebook-form__inner {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 44px;
    max-width: var(--le-max);
    margin: 0 auto;
    padding: 28px;
}

.ebook-form__deco {
    position: absolute;
    pointer-events: none;
}

.ebook-form__deco--documents {
    top: 67px;
    left: calc(50% - 1114.5px);
    width: 1047px;
    height: 698px;
    object-fit: cover;
    transform: rotate(180deg);
}

.ebook-form__deco--stack {
    top: 159px;
    left: calc(50% + 71px);
    width: 818px;
    height: 545px;
    object-fit: contain;
}

.ebook-form__header {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    text-align: center;
}

.ebook-form__subtitle {
    font-size: 20px;
    line-height: 1.32;
}

.ebook-form__card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 40px;
    width: 100%;
    max-width: 592px;
    padding: 28px;
    background: var(--le-surface-high);
    border-top: 4px solid var(--le-stroke-tinted);
    border-radius: 32px;
    box-shadow: var(--le-shadow);
}

.ebook-form__card-header {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.ebook-form__card-header > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.ebook-form__card-header::after {
    content: '';
    position: absolute;
    left: -28px;
    right: -28px;
    bottom: -17px;
    border-top: 1px solid rgba(133, 133, 133, 0.25);
}

.ebook-form__card-title {
    font-weight: 500;
    font-size: 28px;
    line-height: 1.1;
    color: var(--le-on-surface-tinted);
}

.ebook-form__card-subtitle {
    font-size: 14px;
    line-height: 1.32;
    color: var(--le-on-surface-soft);
}

.ebook-form__chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: var(--le-chip-bg);
    flex-shrink: 0;
}

.ebook-form__fields,
.ebook-form__card .wpcf7-form {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.ebook-form__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px 16px;
}

.ebook-field {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ebook-field__label {
    padding: 0 8px;
    font-size: 12px;
    line-height: 1.4;
    color: var(--le-on-surface);
}

.ebook-form__card input[type="text"],
.ebook-form__card input[type="email"],
.ebook-form__card input[type="tel"] {
    width: 100%;
    height: 52px;
    padding: 12px;
    border: 1px solid var(--le-stroke);
    border-radius: 8px;
    background: #fff;
    font-family: var(--le-font-sans);
    font-size: 14px;
    line-height: 1.32;
    color: var(--le-on-surface);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ebook-form__card input::placeholder {
    color: var(--le-on-surface-soft);
}

.ebook-form__card input[type="text"]:focus,
.ebook-form__card input[type="email"]:focus,
.ebook-form__card input[type="tel"]:focus {
    outline: none;
    border-color: var(--le-on-surface-tinted);
    box-shadow: 0 0 0 3px rgba(8, 70, 108, 0.15);
}

.ebook-form__consent {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    line-height: 1.25;
    color: var(--le-on-surface);
    cursor: pointer;
}

.ebook-form__consent input[type="checkbox"] {
    appearance: none;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    margin: 12px 16px;
    border: 1.2px solid #090909;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    display: grid;
    place-content: center;
}

.ebook-form__consent input[type="checkbox"]:checked {
    background: var(--le-on-surface);
    border-color: var(--le-on-surface);
}

.ebook-form__consent input[type="checkbox"]:checked::after {
    content: '';
    width: 6px;
    height: 11px;
    margin-top: -2px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.ebook-form__consent input[type="checkbox"]:focus-visible {
    outline: 2px solid var(--le-on-surface-tinted);
    outline-offset: 2px;
}

/* Idioma de la guía (radio de CF7 "guide_lang"): dos opciones lado a lado */
.ebook-lang {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.ebook-lang legend {
    margin-bottom: 12px;
}

.ebook-lang .wpcf7-radio {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.ebook-lang .wpcf7-list-item {
    margin: 0;
}

.ebook-lang label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 52px;
    padding: 0 12px;
    border: 1px solid var(--le-stroke);
    border-radius: 8px;
    background: #fff;
    font-family: var(--le-font-sans);
    font-size: 14px;
    font-weight: 600;
    color: var(--le-on-surface);
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ebook-lang input[type="radio"] {
    appearance: none;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin: 0;
    border: 1.2px solid #090909;
    border-radius: 50%;
    background: #fff;
    display: grid;
    place-content: center;
    cursor: pointer;
}

.ebook-lang input[type="radio"]:checked::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--le-on-surface-tinted);
}

.ebook-lang input[type="radio"]:focus-visible {
    outline: 2px solid var(--le-on-surface-tinted);
    outline-offset: 2px;
}

.ebook-lang label:has(input:checked) {
    border-color: var(--le-on-surface-tinted);
    box-shadow: 0 0 0 3px rgba(8, 70, 108, 0.15);
}

.ebook-form__divider {
    width: 100%;
    margin: 0;
    border: 0;
    border-top: 1px solid rgba(133, 133, 133, 0.25);
}

/* --- Contact Form 7 (markup generado) --- */
.ebook-form__card .wpcf7-form-control-wrap {
    display: block;
}

.ebook-form__card .wpcf7-list-item {
    margin: 0;
}

.ebook-form__consent label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

/* main.css fija el checkbox de CF7 a 18px con !important */
.ebook-form__consent .wpcf7-acceptance input[type="checkbox"] {
    width: 24px !important;
    height: 24px !important;
    margin: 12px 16px !important;
}

.ebook-form__card input.ebook-btn {
    width: 100%;
}

.ebook-form__card .wpcf7-spinner {
    display: none;
}

.ebook-form__card .wpcf7-not-valid-tip {
    margin-top: 6px;
    padding: 0 8px;
    font-size: 12px;
    color: var(--le-primary-hover);
}

.ebook-form__card .wpcf7-not-valid {
    border-color: var(--le-primary-hover) !important;
}

.ebook-form__card .wpcf7 form .wpcf7-response-output {
    margin: 0;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.32;
}

/* =========================================
   FEATURES (Encuentra en este e-book)
   ========================================= */
.ebook-features {
    padding: 60px var(--le-margin);
}

.ebook-features__inner {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 44px;
    max-width: var(--le-max);
    margin: 0 auto;
}

.ebook-features__deco {
    position: absolute;
    top: -1px;
    bottom: -1px;
    left: calc(50% - 497px);
    z-index: 1;
    height: calc(100% + 2px);
    width: auto;
    aspect-ratio: 1179 / 4096;
    object-fit: cover;
    pointer-events: none;
}

.ebook-features__title {
    text-align: center;
}

.ebook-features__body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    width: 100%;
    max-width: 713px;
}

.ebook-features__list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.ebook-features__item {
    display: flex;
    align-items: center;
    gap: 32px;
    padding: 24px 32px;
    border-radius: 16px;
    background: var(--le-surface-soft);
}

.ebook-features__check {
    display: flex;
    justify-content: flex-end;
    width: 128px;
    flex-shrink: 0;
}

.ebook-features__text {
    font-weight: 600;
    font-size: 28px;
    line-height: 1.1;
}

.ebook-features__disclaimer {
    font-size: 12px;
    line-height: 1.25;
    color: var(--le-on-surface-soft);
    text-align: center;
}

/* =========================================
   BANNER (Informarte es gratis)
   ========================================= */
.ebook-banner {
    padding: 45.5px var(--le-margin);
}

.ebook-banner__card {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    max-width: var(--le-max);
    min-height: 329px;
    margin: 0 auto;
    padding: 28px;
    border-radius: 16px;
    background: linear-gradient(180deg, var(--le-secondary-500), var(--le-secondary-300));
    isolation: isolate;
}

.ebook-banner__flag {
    position: absolute;
    left: 72.77%;
    top: calc(50% + 65.12px);
    width: 1197.837px;
    height: 798.558px;
    transform: translate(-50%, -50%) rotate(-15deg);
    mix-blend-mode: soft-light;
    pointer-events: none;
}

.ebook-banner__flag img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ebook-banner__media {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 160px;
    pointer-events: none;
}

.ebook-banner__media img {
    position: absolute;
    right: 0;
    top: -28.56%;
    width: 77.83%;
    height: auto;
    filter: drop-shadow(0 0 64px #fff);
}

.ebook-banner__content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    padding: 28px 32px;
}

.ebook-banner__title {
    font-family: var(--le-font-display);
    font-weight: 900;
    text-transform: uppercase;
    color: #fff;
    text-box: trim-both cap alphabetic;
}

.ebook-banner__title span {
    display: block;
}

.ebook-banner__title-top {
    font-size: 64px;
    line-height: 1.1;
}

.ebook-banner__title-big {
    font-size: 96px;
    line-height: 1;
}

/* =========================================
   NEXT STEP + BENEFICIOS
   ========================================= */
.ebook-next {
    padding: 67.5px var(--le-margin);
}

.ebook-next__inner {
    display: flex;
    flex-direction: column;
    gap: 32px;
    max-width: var(--le-max);
    margin: 0 auto;
}

.ebook-next__blurb {
    display: flex;
    align-items: stretch;
    gap: 24px;
}

.ebook-next__media {
    flex: 1 1 0;
    min-width: 0;
    height: 469px;
    overflow: hidden;
    border-radius: 16px;
}

.ebook-next__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.ebook-next__content {
    flex: 1 1 0;
    max-width: 592px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 24px;
    padding: 28px;
}

.ebook-next__text {
    font-size: 18px;
    line-height: 1.32;
}

.ebook-next__benefits {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
}

.ebook-next__benefit {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    min-height: 184px;
    padding: 24px 16px;
    border-radius: 16px;
    background: var(--le-surface-high);
    box-shadow: var(--le-shadow);
    font-size: 18px;
    line-height: 1.32;
    text-align: center;
}

.ebook-next__benefit img {
    width: 52px;
    height: 52px;
}

/* =========================================
   CTA (Las leyes están cambiando)
   ========================================= */
.ebook-cta {
    position: relative;
    overflow: hidden;
    padding: 40px var(--le-margin);
}

.ebook-cta__bg {
    position: absolute;
    left: 50%;
    top: 50%;
    width: max(1466px, 102%);
    height: 825px;
    transform: translate(-50%, -50%);
    filter: blur(6.5px);
}

.ebook-cta__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ebook-cta__bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, #fff 0%, rgba(255, 255, 255, 0) 42.512%);
}

.ebook-cta__inner {
    position: relative;
    display: flex;
    justify-content: center;
    gap: 28px;
    max-width: var(--le-max);
    min-height: 640px;
    margin: 0 auto;
}

.ebook-cta__content {
    flex: 1 1 0;
    max-width: 592px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 24px;
}

.ebook-cta__text {
    font-size: 18px;
    line-height: 1.32;
}

.ebook-cta__note {
    font-size: 12px;
    line-height: 1.25;
    color: var(--le-on-surface-soft);
}

.ebook-cta__media {
    flex: 1 1 0;
    align-self: center;
    max-width: 592px;
    min-width: 0;
    aspect-ratio: 592 / 640;
}

/* Como en Figma: la imagen se estira para llenar el recuadro (fill) */
.ebook-cta__media img {
    width: 100%;
    height: 100%;
    object-fit: fill;
    filter: drop-shadow(0 0 64px #fff);
}

/* =========================================
   FAQ
   ========================================= */
.ebook-faq {
    padding: 133px var(--le-margin);
}

.ebook-faq__inner {
    display: flex;
    gap: 32px;
    max-width: var(--le-max);
    margin: 0 auto;
}

.ebook-faq__title {
    flex-shrink: 0;
    max-width: 288px;
}

.ebook-faq__list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ebook-faq__item {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 28px;
    border-radius: 16px;
    background: var(--le-surface-soft);
}

.ebook-faq__question {
    font-weight: 600;
    font-size: 20px;
    line-height: 1.28;
    color: var(--le-on-surface);
}

.ebook-faq__answer {
    font-size: 18px;
    line-height: 1.32;
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 1200px) {
    .ebook-hero__content {
        min-width: 0;
    }

    .ebook-hero__title {
        font-size: 80px;
    }

    .ebook-features__deco {
        display: none;
    }

    .ebook-next__benefits {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1024px) {
    .landing-ebook {
        --le-margin: 32px;
    }

    .ebook-heading-xl {
        font-size: 48px;
    }

    .ebook-hero__title {
        font-size: 64px;
    }

    .ebook-hero__content {
        flex-grow: 1.5;
    }

    .ebook-hero__eyebrow {
        font-size: 22px;
    }

    .ebook-form__deco--stack {
        display: none;
    }

    .ebook-banner__media {
        left: 30%;
    }

    .ebook-faq {
        padding-block: 80px;
    }
}

@media (max-width: 768px) {
    .landing-ebook {
        --le-margin: 16px;
        --le-header-offset: 162px;
    }

    .ebook-heading-xl {
        font-size: 32px;
        text-align: center;
    }

    .ebook-heading-l {
        font-size: 32px;
    }

    .ebook-btn {
        height: 60px;
        padding: 12px 24px;
        font-size: 18px;
    }

    .ebook-btn--sm {
        height: 52px;
        font-size: 16px;
    }

    /* Hero */
    .ebook-hero__bg {
        left: -546px;
        transform: none;
        width: 1494px;
        height: 841px;
    }

    .ebook-hero__inner {
        flex-direction: column;
        min-height: 0;
        gap: 16px;
    }

    .ebook-hero__content {
        align-items: center;
        gap: 28px;
        text-align: center;
    }

    .ebook-hero__eyebrow {
        font-size: 18px;
    }

    .ebook-hero__title {
        font-size: 44px;
    }

    .ebook-hero__subtitle {
        font-size: 18px;
    }

    .ebook-hero__actions {
        align-items: center;
    }

    .ebook-hero__microcopy {
        font-size: 16px;
    }

    .ebook-hero__media {
        width: 100%;
        max-width: 369px;
        aspect-ratio: 369 / 436;
        flex: none;
    }

    /* Form */
    .ebook-form__inner {
        padding: 0;
    }

    .ebook-form__header {
        gap: 16px;
    }

    .ebook-form__subtitle {
        font-size: 18px;
    }

    .ebook-form__deco--documents {
        top: 176px;
        left: -292px;
        width: 955px;
        height: 637px;
    }

    .ebook-form__card {
        padding: 24px;
    }

    .ebook-form__card-header::after {
        left: -24px;
        right: -24px;
    }

    .ebook-form__card-title {
        font-size: 20px;
    }

    .ebook-form__consent input[type="checkbox"],
    .ebook-form__consent .wpcf7-acceptance input[type="checkbox"] {
        margin: 12px 8px 12px 0 !important;
    }

    /* Features */
    .ebook-features {
        padding-block: 40px;
    }

    .ebook-features__item {
        gap: 32px;
    }

    .ebook-features__check {
        width: 36px;
    }

    .ebook-features__text {
        font-size: 18px;
    }

    .ebook-features__body .ebook-btn {
        width: 100%;
        max-width: 350px;
    }

    /* Banner (Figma móvil: título a todo el ancho, laptop grande abajo a la derecha) */
    .ebook-banner {
        padding-block: 40px;
    }

    .ebook-banner__card {
        min-height: 204px;
        padding: 24px;
    }

    .ebook-banner__flag {
        left: 71%;
        top: calc(50% + 25px);
        width: 586px;
        height: 391px;
    }

    .ebook-banner__media {
        left: 0;
    }

    .ebook-banner__media img {
        top: 24px;
        right: auto;
        left: 20.52%;
        width: 102.67%;
    }

    .ebook-banner__content {
        z-index: 1;
        width: 100%;
        padding: 0;
    }

    /* 40px / 52px a 401px de ancho; escala con la pantalla (ancho útil = 100vw - 80px) */
    .ebook-banner__title-top {
        font-size: min(calc((100vw - 80px) * 0.1246), 48px);
        line-height: 1.1;
    }

    .ebook-banner__title-big {
        font-size: min(calc((100vw - 80px) * 0.162), 64px);
        line-height: 1;
    }

    .ebook-banner .ebook-btn--sm {
        font-size: 18px;
    }

    /* Next step */
    .ebook-next {
        padding-block: 40px;
    }

    .ebook-next__blurb {
        flex-direction: column;
    }

    .ebook-next__media {
        flex: none;
        height: 256px;
    }

    .ebook-next__content {
        max-width: none;
        align-items: center;
        padding: 22px 24px;
        text-align: center;
    }

    .ebook-next__content .ebook-btn {
        width: 100%;
    }

    .ebook-next__benefits {
        grid-template-columns: 1fr;
    }

    .ebook-next__benefit {
        min-height: 133px;
    }

    /* CTA */
    .ebook-cta__bg {
        top: 14px;
        left: -438px;
        width: 1278px;
        height: 719px;
        transform: none;
    }

    .ebook-cta__inner {
        flex-direction: column;
        align-items: center;
        min-height: 0;
    }

    .ebook-cta__content {
        align-items: center;
        text-align: center;
    }

    .ebook-cta__content {
        flex: none;
    }

    .ebook-cta__media {
        width: 100%;
        max-width: 370px;
        aspect-ratio: 1;
        flex: none;
    }

    /* FAQ */
    .ebook-faq {
        padding-block: 40px;
    }

    .ebook-faq__inner {
        flex-direction: column;
    }

    .ebook-faq__title {
        max-width: none;
        text-align: center;
    }

    .ebook-faq__item {
        padding: 24px;
    }

    .ebook-faq__question {
        font-size: 18px;
    }

    .ebook-faq__answer {
        font-size: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ebook-btn {
        transition: none;
    }
}

/* =========================================
   MODAL "Obtén tu consulta gratis" (descarga directa; template-parts/landing-ebook/consult-modal.php)
   Misma tarjeta que la landing de consulta gratuita (estilos de page-consulta-gratis.php, .agenda__form-wrap).
   Va fuera de .landing-ebook: no hereda sus tokens ni sus fuentes.
   ========================================= */

.ebook-modal {
    width: calc(100% - 32px);
    max-width: 680px;
    max-height: calc(100dvh - 32px);
    margin: auto;
    padding: 0;
    border: 0;
    background: transparent;
    overflow: auto;
    overscroll-behavior: contain;
}

.ebook-modal::backdrop {
    background: rgba(8, 32, 46, 0.6);
    backdrop-filter: blur(4px);
}

.ebook-modal[open] {
    animation: ebook-modal-in 0.2s ease-out;
}

:root:has(.ebook-modal[open]) {
    overflow: hidden;
}

@keyframes ebook-modal-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
}

.ebook-modal__card {
    position: relative;
    background: #fff;
    border-radius: 40px;
    padding: 28px 24px;
    box-shadow: 0 14px 40px 0 rgba(0, 0, 0, 0.25);
    font-family: 'Montserrat', sans-serif;
}

.ebook-modal__close {
    position: absolute;
    top: 18px;
    right: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #f7f7f7;
    color: #333;
    cursor: pointer;
    transition: background 0.2s;
}

.ebook-modal__close:hover {
    background: #ececec;
}

.ebook-modal__note {
    margin: 4px 36px 18px;
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
    color: #000;
}

/* --- Contact Form 7 (como la landing) --- */
.ebook-modal .wpcf7-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0;
    padding: 0;
}

.ebook-modal .wpcf7-form > p {
    display: flex;
    gap: 12px;
    margin: 0;
}

.ebook-modal .wpcf7-form > p:last-of-type {
    display: block;
}

.ebook-modal .wpcf7-form-control-wrap {
    display: block;
    flex: 1;
    min-width: 0;
}

.ebook-modal .wpcf7-form input.wpcf7-form-control:not([type="submit"]):not([type="checkbox"]) {
    /* Más específico que la regla global de main.css (input.wpcf7-form-control:not(…):not(…):not(…)) */
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #555;
    background-color: #f7f7f7;
    box-shadow: none;
    transition: border-color 0.15s;
}

.ebook-modal .wpcf7-form input.wpcf7-form-control:not([type="submit"]):not([type="checkbox"]):focus {
    outline: none;
    border-color: #2083ce;
    box-shadow: none;
}

.ebook-modal .wpcf7-form input.wpcf7-form-control.wpcf7-not-valid {
    border-color: #fa0000;
}

.ebook-modal .wpcf7-acceptance {
    display: block !important;
    width: 100% !important;
}

.ebook-modal .wpcf7-acceptance .wpcf7-list-item {
    position: relative;
    display: flex;
    width: 100%;
    margin: 0;
    padding: 10px 12px;
    background: #fafafa;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
}

/* Desvanecido al pie de la caja del consentimiento (se lee completo desplazándolo) */
.ebook-modal .wpcf7-acceptance .wpcf7-list-item::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 28px;
    background: linear-gradient(to bottom, transparent, #fafafa);
    border-radius: 0 0 8px 8px;
    pointer-events: none;
}

.ebook-modal .wpcf7-acceptance label {
    gap: 10px;
    width: 100%;
}

.ebook-modal .wpcf7-acceptance input[type="checkbox"] {
    width: 16px !important;
    min-width: 16px;
    height: 16px !important;
    margin-top: 2px !important;
    accent-color: #2083ce;
}

.ebook-modal .wpcf7-acceptance .wpcf7-list-item-label {
    display: block;
    max-height: 68px;
    padding-right: 4px;
    overflow-y: auto;
    font-size: 10.5px;
    font-weight: 400;
    line-height: 1.55;
    color: #666;
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
}

.ebook-modal .wpcf7-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 14px 28px;
    border: 0;
    border-radius: 50px;
    background: #fa0000;
    color: #fff !important;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.5px;
    box-shadow: none;
    transition: background 0.2s, transform 0.15s;
}

.ebook-modal .wpcf7-submit:hover {
    background: #d40000;
    transform: translateY(-2px);
    box-shadow: none;
}

.ebook-modal .wpcf7-spinner {
    display: none;
}

.ebook-modal .wpcf7-form.submitting .wpcf7-spinner {
    position: static;
    display: inline-block;
    margin-left: 8px;
}

.ebook-modal .wpcf7-not-valid-tip {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    color: #fa0000;
}

.ebook-modal .wpcf7-response-output {
    margin: 8px 0 0 !important;
    padding: 12px 16px !important;
    border: 0 !important;
    font-size: 12px !important;
    font-weight: 600;
}

.ebook-modal .wpcf7-response-output[aria-hidden="true"] {
    display: none;
}

@media (max-width: 768px) {
    .ebook-modal__card {
        border-radius: 24px;
        padding: 24px 20px;
    }

    .ebook-modal__note {
        font-size: 16px;
    }

    .ebook-modal .wpcf7-form > p {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .ebook-modal__card {
        border-radius: 20px;
        padding: 20px 16px;
    }

    .ebook-modal__close {
        top: 12px;
        right: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ebook-modal[open] {
        animation: none;
    }
}
