@layer components {
    .featured-events { padding-bottom: clamp(48px, 7vw, 90px); }
    .featured-events__hero {
        display: grid;
        grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
        min-height: 240px;
        margin-block: 20px 32px;
        border: 1px solid var(--line);
        border-radius: 22px;
        overflow: hidden;
        background: var(--panel);
    }
    .featured-events__intro { align-self: center; padding: clamp(24px, 4vw, 56px); }
    .featured-events__intro h1 { font-size: clamp(35px, 4.4vw, 62px); font-weight: 650; letter-spacing: -.065em; line-height: 1.06; text-wrap: balance; }
    .featured-events__intro h1 span { color: var(--brand-red); }
    .featured-events__intro p { max-width: 46ch; margin-top: 18px; color: var(--muted); font-size: 15px; line-height: 1.7; }
    .featured-events__hero img { width: 100%; height: 100%; min-height: 0; object-fit: cover; object-position: center; }
    .featured-events__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: clamp(16px, 2vw, 28px); margin: 0; padding: 0; list-style: none; }
    .featured-events__grid > li { display: grid; min-width: 0; }
    .featured-events__empty { padding: 24px; border: 1px solid var(--line); border-radius: 16px; color: var(--muted); background: var(--panel); }
    .featured-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--panel); }
    .featured-card__poster { position: relative; display: grid; place-items: center; flex: none; aspect-ratio: 1; box-shadow: 0 1px var(--line); background: var(--subtle); color: var(--muted); font-size: 36px; }
    .featured-card__poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
    .featured-card__body { display: flex; flex-direction: column; flex: 1; gap: 18px; padding: clamp(15px, 1.7vw, 24px); overflow-wrap: anywhere; }
    .featured-card__format { display: inline-block; margin-bottom: 10px; padding: 4px 10px; border-radius: 20px; color: var(--accent); background: var(--subtle); font-size: 11px; font-weight: 750; }
    .featured-card h2 { font-size: clamp(18px, 1.6vw, 22px); font-weight: 750; letter-spacing: -.032em; line-height: 1.28; }
    .featured-card__secretariat { margin-top: 10px; color: var(--muted); font-size: 13px; }
    .featured-card__secretariat strong { color: var(--ink); }
    .featured-card__facts { display: grid; gap: 9px; margin: 18px 0 0; padding-top: 15px; border-top: 1px solid var(--line); font-size: 13px; line-height: 1.45; }
    .featured-card__facts div { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 8px; }
    .featured-card__facts dt { display: flex; gap: 7px; align-items: baseline; color: var(--muted); }
    .featured-card__facts dt i { width: 1.1em; flex: 0 0 1.1em; color: var(--accent); text-align: center; }
    .featured-card__facts dd { margin: 0; font-weight: 700; }
    .featured-card__actions { position: relative; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: auto; }
    .featured-card__preview { min-width: 0; }
    .featured-card__preview summary, .featured-card__course { display: inline-flex; gap: 8px; justify-content: center; align-items: center; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 24px; font-size: 12px; font-weight: 750; text-decoration: none; }
    .featured-card__preview summary { width: max-content; color: var(--ink); cursor: pointer; }
    .featured-card__preview summary::-webkit-details-marker { display: none; }
    .featured-card__preview summary:hover { border-color: var(--accent); }
    .featured-card__preview summary i { color: var(--accent); font-size: 10px; }
    .featured-card__preview[open] summary i { transform: rotate(180deg); }
    .featured-card__course { margin-inline-start: auto; border-color: transparent; color: var(--button-ink); background: var(--button); }
    .featured-card__course:hover { text-decoration: underline; text-underline-offset: 3px; }
    .featured-card__preview-content { position: absolute; inset-inline: 0; bottom: calc(100% + 10px); z-index: 1; max-height: min(24rem, 55vh); overflow: auto; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); box-shadow: var(--panel-shadow); }
    .featured-card__preview-content p { font-size: 13px; line-height: 1.65; white-space: pre-line; }
    .featured-card__preview-content .text-link { margin-top: 0; font-size: 12px; }
}

@layer responsive {
    @media (max-width: 1050px) {
        .featured-events__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    }
    @media (max-width: 700px) {
        .featured-events__hero { grid-template-columns: minmax(0, 1fr); min-height: auto; margin-bottom: 24px; border-radius: 18px; }
        .featured-events__hero img { aspect-ratio: 2.75; height: auto; }
        .featured-events__intro h1 { text-wrap: pretty; }
        .featured-events__intro p { margin-top: 12px; font-size: 14px; }
        .featured-events__grid { grid-template-columns: minmax(0, 1fr); }
    }
}
