/* Dark highlight box (webinar-landing/highlight.php). */

.rd-wl-highlight-section {
    padding-bottom: var(--rd-spacing-x-huge);
}

/*
 * Three steps keyed to the box, not the viewport — the logged-in navigation takes ~250px at
 * the same window width. The text never drops below 320px; the certificate gives way instead:
 * full size (box ≥ 1000px), scaled to 75% (790–999px), stacked under the text (< 790px).
 */
.rd-wl-highlight-section > .rd-wl-container {
    container: wl-highlight / inline-size;
}

.rd-wl-highlight {
    display: grid;
    grid-template-columns: minmax(320px, 1fr) minmax(0, 459px);
    gap: var(--rd-spacing-lg);
    /* Figma: the certificate visual starts 865px into the 1440px box */
    padding: 0 calc(var(--rd-spacing-huge) + var(--rd-spacing-big)) 0 var(--rd-spacing-xx-lg);
    min-height: 367px;
    overflow: hidden;
    background: linear-gradient(115deg, var(--rd-wl-darkest), var(--rd-wl-accent-strong));
    color: var(--rd-font-light);
    border-radius: var(--rd-borderradius-border-lg);
    line-height: 1.2;
    letter-spacing: 0.01em; /* Figma 1% — percentage letter-spacing is not supported everywhere yet */
}

.rd-wl-highlight-content {
    align-self: center;
    padding-block: var(--rd-spacing-xx-lg);
}

.rd-wl-highlight-eyebrow {
    color: var(--rd-wl-accent-light);
    margin: 0 0 var(--rd-spacing-x-sm);
}

.rd-wl .rd-wl-highlight h2 {
    font-size: var(--rd-fontsize-8);
    font-weight: var(--rd-fontweights-open-sans-0);
    letter-spacing: 0.01em; /* Figma 1% — percentage letter-spacing is not supported everywhere yet */
    margin: 0 0 var(--rd-spacing-x-sm);
}

.rd-wl-highlight-content > p:not(.rd-wl-highlight-eyebrow) {
    margin: 0;
}

.rd-wl-highlight .rd-wl-checklist {
    margin-top: var(--rd-spacing-x-big);
}

.rd-wl-highlight .rd-wl-checklist li:last-child {
    margin-bottom: 0;
}

.rd-wl-main .rd-wl-highlight .rd-icon-check::before {
    width: 20px;
    height: 20px;
    margin: 0;
    background-color: var(--rd-wl-accent-light); /* Figma utility-brand-200 */
}

/* The visual is cut off by the bottom edge of the box. */
.rd-wl-highlight-image {
    align-self: end;
}

.rd-wl-highlight-image > img {
    display: block;
    width: 100%;
    height: auto;
}

/* Drawn sample certificate (certificate-visual.php), cut off by the bottom edge of the box. */

.rd-wl-highlight-image:has(.rd-wl-certificate) {
    align-self: stretch;
}

.rd-wl-certificate {
    position: relative;
    height: 100%;
}

.rd-wl-certificate-sheet,
.rd-wl-certificate-card {
    position: absolute;
    background: var(--rd-font-light);
    border-radius: var(--rd-wl-radius-sheet);
}

.rd-wl-certificate-sheet {
    top: 49px;
    left: 68px;
    width: 306px;
    height: 387px;
    opacity: 0.65;
    transform: rotate(7deg);
    box-shadow: var(--rd-wl-shadow-sheet);
}

.rd-wl-certificate-sheet + .rd-wl-certificate-sheet {
    top: 60px;
    left: 110px;
    opacity: 0.5;
    transform: rotate(14deg);
}

.rd-wl-certificate-card {
    top: 29px;
    left: 0;
    display: grid;
    align-content: start;
    gap: calc(var(--rd-spacing-md) + var(--rd-spacing-xxx-sm));
    width: 341px;
    height: 459px;
    box-sizing: border-box;
    padding: var(--rd-spacing-x-big);
    box-shadow: var(--rd-wl-shadow-certificate);
    color: var(--rd-wl-dark);
    line-height: normal;
    letter-spacing: 0;
}

.rd-wl-certificate-logos {
    display: flex;
    justify-content: end;
    align-items: center;
    gap: var(--rd-spacing-x-sm);
    height: 35px;
    padding-right: var(--rd-spacing-md);
}

.rd-wl-certificate-logos > span {
    width: 1px;
    height: 24px;
    background: var(--rd-gray-400);
}

.rd-wl-certificate-text {
    display: grid;
    gap: var(--rd-spacing-sm);
    color: var(--rd-gray-500);
    font-size: var(--rd-fontsize-3);
}

.rd-wl-certificate-text strong,
.rd-wl-certificate-credit b {
    color: var(--rd-wl-dark);
    font-weight: 800;
}

.rd-wl-certificate-text strong {
    font-size: var(--rd-fontsize-7);
}

.rd-wl-certificate-text b {
    color: var(--rd-wl-dark);
    font-size: var(--rd-fontsize-6);
}

.rd-wl-certificate-text span:last-child {
    line-height: 21px;
}

.rd-wl-certificate-credit {
    display: flex;
    align-items: center;
    gap: var(--rd-spacing-md);
    padding: var(--rd-spacing-md);
    background: var(--rd-wl-accent-soft);
    border-radius: var(--rd-wl-radius-panel);
    font-size: var(--rd-fontsize-6);
}

.rd-wl-certificate-credit > span {
    display: grid;
    place-items: center;
    align-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--rd-wl-accent-strong);
    color: var(--rd-font-light);
    font-size: var(--rd-fontsize-8);
    font-weight: 800;
    line-height: 24px;
}

.rd-wl-certificate-credit small {
    color: var(--rd-wl-accent-light);
    font-size: var(--rd-wl-fontsize-micro);
    font-weight: var(--rd-fontweights-open-sans-0);
    line-height: 11px;
    letter-spacing: 0.1em;
}

@media (max-width: 760px) {
    .rd-wl-highlight-section {
        padding-bottom: var(--rd-spacing-xxx-lg);
    }
}

/* Scaled: 40px insets, a 345px column for the 75% certificate, which stays cut off by the
   bottom edge however tall the text gets (anchored there instead of at the top). */
@container wl-highlight (max-width: 999px) {
    .rd-wl-highlight {
        grid-template-columns: minmax(320px, 1fr) 345px;
        padding-inline: var(--rd-spacing-lg);
    }

    .rd-wl-certificate {
        zoom: 0.75;
    }

    .rd-wl-certificate-card {
        top: auto;
        bottom: -120px;
    }

    .rd-wl-certificate-sheet {
        top: auto;
        bottom: -68px;
    }

    .rd-wl-certificate-sheet + .rd-wl-certificate-sheet {
        top: auto;
        bottom: -79px;
    }
}

@container wl-highlight (max-width: 789px) {
    .rd-wl-highlight {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
        min-height: 0;
        padding-inline: var(--rd-spacing-x-big);
        border-radius: var(--rd-borderradius-border-xl);
    }

    /* Figma mobile: 24px padding, 31px from the checklist to the certificate */
    .rd-wl-highlight-content {
        padding-block: var(--rd-spacing-x-big) 31px;
    }

    .rd-wl .rd-wl-highlight h2 {
        font-size: var(--rd-fontsize-8);
        line-height: 1.32;
    }

    .rd-wl-highlight-content > p:not(.rd-wl-highlight-eyebrow),
    .rd-wl-highlight .rd-wl-checklist {
        line-height: 1.35;
    }

    .rd-wl-highlight-image > img {
        max-width: 420px;
    }

    /* Show the top 230px of the certificate, 17px in from the padding (Figma mobile). */
    .rd-wl-highlight-image:has(.rd-wl-certificate) {
        height: 230px;
        margin-left: 17px;
    }

    /* Figma mobile is the desktop certificate scaled to 229px wide: 341px × 0.6736 —
       zoom keeps every font size, gap, radius and shadow in exactly that ratio. */
    .rd-wl-certificate {
        zoom: 0.6736;
    }

    .rd-wl-certificate-card {
        top: 0;
        bottom: auto;
    }

    .rd-wl-certificate-sheet {
        top: 20px;
        bottom: auto;
    }

    .rd-wl-certificate-sheet + .rd-wl-certificate-sheet {
        top: 31px;
        bottom: auto;
    }
}
