/* Media and text: rounded photo filling one half, text in the other. */
.lc-media-text {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
}

.lc-media-text-image {
    align-self: stretch;
    min-height: 24rem;
    overflow: hidden;
    border-radius: 1.25rem;
}

.lc-media-text-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lc-media-text-image-right .lc-media-text-image {
    order: 2;
}

/* Video: fills the media side like an image; YouTube letterboxes vertical videos (Shorts). */
.lc-media-text-video {
    background: #000;
}

.lc-media-text-video iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.lc-media-text-body {
    padding-block: 1rem;
}

.lc-media-text-body p {
    margin: 0 0 1rem;
    color: var(--leguma-muted, #676767);
    font-size: 1rem;
    line-height: 1.75;
}

/* A heading (or, without one, the first paragraph) as the lead statement. */
.lc-media-text-body > :is(h2, h3, p):first-child {
    margin: 0 0 1rem;
    color: var(--leguma-text, #222222);
    font-size: clamp(1.4rem, 2.4vw, 1.875rem);
    font-weight: 800;
    line-height: 1.25;
}

/* Plain intro: the first paragraph is body text like the rest. */
.lc-media-text-plain .lc-media-text-body > p:first-child {
    margin-bottom: 1rem;
    color: var(--leguma-muted, #676767);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.75;
}

/* Highlights as chips with a green check. */
.lc-media-text-body ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1.5rem 0 0;
    padding: 0;
    list-style: none;
}

.lc-media-text-body li {
    display: inline-flex;
    gap: 0.4rem;
    align-items: center;
    margin: 0;
    padding: 0.45rem 0.85rem 0.45rem 0.6rem;
    color: var(--leguma-text, #222222);
    background: var(--leguma-surface-hover, #f6f6f6);
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 600;
}

.lc-media-text-body li .lc-icon {
    flex-shrink: 0;
    width: 1.1rem;
    height: 1.1rem;
    color: var(--leguma-secondary-dark, #778f00);
}

/* Buttons in a row under the text. */
.lc-media-text-body .lc-button-simple {
    display: inline-flex;
    margin: 1.75rem 0.5rem 0 0;
}

@media (max-width: 64rem) {
    .lc-media-text {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.5rem;
    }

    .lc-media-text-image,
    .lc-media-text-image-right .lc-media-text-image {
        order: 0;
        min-height: 0;
        aspect-ratio: 4 / 3;
    }

    .lc-media-text-body {
        padding-block: 0;
    }
}

/* Small badges (e.g. certificates) in a row under the text. */
.lc-media-text-body .lc-media-text-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.lc-media-text-badges img {
    display: block;
    width: auto;
    height: 4.5rem;
    border-radius: 0.5rem;
}

/* A bold first paragraph under the heading reads as a subheading. */
.lc-media-text-body p > strong:only-child {
    color: var(--leguma-text, #222222);
}

/* Document card (e.g. a certificate): page thumbnail and a label, opens in the lightbox. */
.lc-media-text-body a.lc-media-text-document {
    display: inline-flex;
    gap: 1rem;
    align-items: center;
    margin-top: 1.5rem;
    padding: 0.75rem 1.25rem 0.75rem 0.75rem;
    color: var(--leguma-text, #222222);
    background: var(--leguma-surface, #ffffff);
    border: 1px solid var(--leguma-border, #e4e4e4);
    border-radius: 1rem;
    text-decoration: none;
    transition: border-color var(--leguma-transition, 160ms ease), box-shadow var(--leguma-transition, 160ms ease);
}

.lc-media-text-body a.lc-media-text-document:hover {
    border-color: var(--leguma-secondary, #9dbe00);
    box-shadow: 0 0.75rem 2rem rgb(0 0 0 / 8%);
}

.lc-media-text-document img {
    display: block;
    width: 4rem;
    height: auto;
    border: 1px solid var(--leguma-border, #e4e4e4);
    border-radius: 0.25rem;
}

.lc-media-text-document strong {
    display: block;
    font-weight: 700;
}

.lc-media-text-document small {
    color: var(--leguma-muted, #676767);
    font-size: 0.8125rem;
}
