/*
Theme Name: Tanzarena 2027
Author: WebMultiMedia
Description: Schlankes Classic-Theme als Basis für das individuelle Tanzarena-Design.
Version: 0.10.41
Requires at least: 6.2
Requires PHP: 7.4
Text Domain: tanzarena27
*/

/* Webfonts taken from the existing site; Oxygen is served locally. */
@font-face {
    font-family: 'Arquitecta';
    src: url('assets/fonts/arquitecta.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
/* latin-ext */
@font-face {
  font-family: 'Oxygen';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(assets/fonts/oxygen-400-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Oxygen';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(assets/fonts/oxygen-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Oxygen';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(assets/fonts/oxygen-700-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Oxygen';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(assets/fonts/oxygen-700-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}


:root {
    color-scheme: light;
    --corner-radius: 4px; /* Small controls. */
    --panel-heading-height: 5rem; /* Equal bar height; independent of row descriptions. */
    --caret-size: 1rem;
    --detail-text-inset: calc(1.25rem + 1px); /* Nimbus bar padding plus its border. */
    --panel-radius: 12px; /* All tiles, content panels and breadcrumb banners. */
    --panel-transition: .4s ease-in-out;
    --color-accent: #cf2027;
    --border-color: #dedede;
    --nav-gap: 0px;
    --nav-background: #f6f6f6;
    --nav-color: #505050;
    --nav-active-background: #fff;
    --footer-divider-color: #c9c9c9;
}
* { box-sizing: border-box; }
body { display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; margin: 0; color: #222; background: #fff; font: 1rem/1.6 'Oxygen', sans-serif; }
button, input, select, textarea { font: inherit; }
a { color: inherit; text-underline-offset: .2em; }
img { max-width: 100%; height: auto; }
.site-header, .site-main, .site-footer { width: min(72rem, calc(100% - 2rem)); margin-inline: auto; }
.site-main { flex: 1; padding-block: 2rem; overflow-wrap: anywhere; }
.site-brand { display: flex; flex-direction: column; align-items: center; gap: .5rem; padding: 2rem 0 1.75rem; }
.site-logo { display: block; width: min(360px, 75vw); }
.site-logo img { display: block; width: 100%; height: auto; }
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav--primary { border-bottom: 1px solid var(--border-color); }
.primary-menu { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--nav-gap); }
.primary-menu > li { display: flex; margin: 0 0 -1px; }
.primary-menu > li + li { margin-left: -1px; }
.primary-menu a {
    display: flex; align-items: center; justify-content: center; width: 100%;
    padding: .85rem .5rem .75rem; border: 1px solid var(--border-color); border-radius: var(--panel-radius) var(--panel-radius) 0 0;
    background: var(--nav-background); color: var(--nav-color); font: 400 clamp(1.25rem, 2.15vw, 1.7rem)/1.2 'Arquitecta', sans-serif;
    text-decoration: none; white-space: nowrap; transition: background-color .15s, color .15s;
}
.primary-menu a:hover { background: var(--nav-active-background); color: var(--color-accent); }
.primary-menu .current-menu-item > a,
.primary-menu .current-menu-ancestor > a {
    border-bottom-color: var(--nav-active-background); background: var(--nav-active-background); color: var(--color-accent);
}
.site-footer { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: .6rem 1rem; padding: 1.25rem 0; margin-top: 1rem; border-top: 1px solid var(--border-color); color: #626262; font-size: .8rem; }
.site-footer__identity { display: inline-flex; align-items: baseline; justify-content: center; flex-wrap: wrap; gap: .35rem .75rem; }
.site-nav--footer { padding-inline-start: .75rem; border-inline-start: 1px solid var(--footer-divider-color); }
.footer-menu { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 0; }
.footer-menu li + li { padding-left: .75rem; margin-left: .75rem; border-left: 1px solid var(--footer-divider-color); }
.footer-menu a, .site-credit a { text-decoration: none; }
.footer-menu a:hover, .site-credit a:hover { color: var(--color-accent); text-decoration: underline; }
.footer-menu .current-menu-item > a:not([href*="#"]),
.footer-menu a[aria-current="page"]:not([href*="#"]),
.footer-menu a[aria-current="location"] { color: #222; font-weight: 700; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: .2em; }

.page-content { /* max-width: 52rem;*/ padding: 2rem; }
.page-content--aligned-title { padding-top: 0; }
/* Plain WordPress pages share the H1/content edge with the panel overviews. */
.page-content--plain { padding: 0; text-align: left; }
.page-content h1 { margin: 0 0 1.5rem; font-size: clamp(1.75rem, 3vw, 2.25rem); line-height: 1.25; }
.page-content__body p { margin-top: 0; }
.skip-link { position: absolute; top: 0; left: -10000px; padding: .75rem 1rem; background: #fff; color: #222; z-index: 1000; }
.skip-link:focus { left: 1rem; }
:focus-visible { outline: 3px solid #1759b0; outline-offset: 4px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Main categories: the CMS controls titles, colours, images and order. */
.category-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}
.category-panel {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: var(--panel-radius);
    background: #fff;
}
.category-panel__title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    margin: 0;
    padding: .25rem 1.25rem;
    border-bottom: 0;
    background: var(--category-color);
    color: var(--category-foreground, #fff);
    font-size: clamp(1.25rem, 2.2vw, 1.65rem);
    font-weight: 700;
    line-height: 1.25;
    height: var(--panel-heading-height);
    min-height: var(--panel-heading-height);
    transition: all var(--panel-transition);
}
.category-panel__link { display: block; height: 100%; text-decoration: none; }
.category-panel__link:hover .category-panel__title,
.category-panel__link:focus-visible .category-panel__title { background: #fff; color: var(--category-hover-color, var(--category-color)); }
.category-panel__link:focus-visible { outline-offset: -4px; }
.category-panel__arrow { display: block; flex-shrink: 0; width: var(--caret-size); height: var(--caret-size); }
.category-panel__arrow path, .course-area-banner__caret path { stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; }
.category-panel__meta { display: inline-flex; align-items: center; flex-shrink: 0; gap: .6rem; margin-left: auto; padding-left: .75rem; }
.category-panel__count { white-space: nowrap; font-size: .6em; font-weight: 400; }
.category-panel__summary { margin: 0; padding: 1rem 1.25rem 1.25rem; font-size: .925rem; line-height: 1.65; }
.category-grid--subcategories { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.category-grid--subcategories .category-panel { display: flex; flex-direction: column; }
.category-grid--subcategories .category-panel__link { display: block; flex: none; height: auto; }
.category-grid--subcategories .category-panel__title { flex: none; min-width: 0; height: var(--panel-heading-height); min-height: var(--panel-heading-height); border-bottom: 0; background: var(--category-color); color: var(--category-foreground, #fff); }
.category-grid--subcategories .category-panel__title > span:first-child { min-width: 0; }
.category-grid--subcategories .category-panel__link:hover .category-panel__title,
.category-grid--subcategories .category-panel__link:focus-visible .category-panel__title { background: #fff; color: var(--category-hover-color, var(--category-color)); }
.course-area-banner { display: flex; align-items: center; min-height: var(--panel-heading-height); margin-bottom: 2rem; padding: .75rem var(--detail-text-inset); border-radius: var(--panel-radius); background: var(--category-color); color: var(--category-foreground, #fff); }
.course-area-banner__title { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem 1rem; margin: 0; font-size: clamp(1.25rem, 2.2vw, 1.65rem); line-height: 1.25; }
.course-area-banner__title a { text-decoration: none; }
.course-area-banner__title a:hover { text-decoration: underline; }
.course-area-banner__caret { display: block; flex-shrink: 0; width: var(--caret-size); height: var(--caret-size); }
.course-area-intro { margin: -0.5rem 0 2rem;  }
.category-panel__media {
    border-bottom: 1px solid var(--border-color, #dedede);
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #f2f2f2;
    /* Separate fade from image scaling to avoid WebKit layer changes at the end. */
    opacity: 1;
    isolation: isolate;
    transform: translateZ(0);
    will-change: opacity;
    transition: opacity var(--panel-transition);
}
.category-panel__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 1;
    transform: translateZ(0) scale(1);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    will-change: transform;
    transition: transform var(--panel-transition);
}
.category-panel:hover .category-panel__media,
.category-panel:focus-within .category-panel__media { opacity: .8; }
.category-panel:hover .category-panel__image,
.category-panel:focus-within .category-panel__image { transform: translateZ(0) scale(1.05); }
@media (max-width: 899px) {
    .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .primary-menu { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .primary-menu > li { margin-bottom: 0; }
    .primary-menu > li:nth-child(3n + 1) { margin-left: 0; }
    .primary-menu > li:nth-child(n + 4) { margin-top: -1px; }
    .primary-menu a { font-size: 1.5rem; }
    .primary-menu .current-menu-item > a { border-bottom-color: var(--border-color); }
}
@media (max-width: 599px) {
    .category-grid { grid-template-columns: minmax(0, 1fr); }
    .site-brand { padding-block: 1.5rem; }
    .primary-menu a { font-size: 1.25rem; padding-inline: .25rem; }
    .course-area-banner { padding: .75rem 1rem; }
}
@media (prefers-reduced-motion: reduce) {
    .primary-menu a, .category-panel__title, .category-panel__media, .category-panel__image { transition: none; }
    .category-panel:hover .category-panel__image,
    .category-panel:focus-within .category-panel__image { transform: none; }
}

.course-category-info { margin-bottom: 2rem; }
.course-category-slogan { font-size: 1.25rem; font-weight: 700; }
.nimbus-course-frame { display: block; width: 100%; min-height: 900px; min-height: max(900px, 85vh); border: 0; background: #fff; }

/* Team overview: the same panels, colours and Safari-safe hover as TANZkurse. */
.team-page-title { margin: 0 0 1.5rem; font-size: clamp(1.75rem, 3vw, 2.25rem); line-height: 1.25; }
.team-page-intro { /* max-width: 52rem;*/ margin-bottom: 2rem; }
.team-grid { align-items: start; }
.team-card__trigger[aria-expanded="true"] .team-card__title { background: var(--category-color); color: var(--category-foreground, #fff); }
.team-card__arrow { transition: transform var(--panel-transition); }
.team-card__trigger[aria-expanded="true"] .team-card__arrow { transform: rotate(90deg); }
.team-card__placeholder { display: block; width: 50%; height: 85%; margin: 8% auto 0; color: #d1d1d1; }
.team-detail { grid-column: 1 / -1; min-width: 0; overflow: hidden; border: 1px solid var(--border-color); border-radius: var(--panel-radius); background: #fff; scroll-margin-top: 1.5rem; }
.team-detail[hidden], .team-detail__close[hidden] { display: none; }
.team-detail__header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 1.25rem; background: var(--category-color); color: var(--category-foreground, #fff); }
.team-detail__header h2 { margin: 0; font-size: clamp(1.4rem, 2.5vw, 1.9rem); line-height: 1.3; }
.team-detail__header h2:focus { outline: none; }
.team-detail__close { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 44px; height: 44px; padding: 0; border: 1px solid currentColor; border-radius: var(--corner-radius); color: #fff; background: transparent; font-size: 2rem; line-height: 1; cursor: pointer; }
.team-detail__close:hover { background: rgba(255,255,255,.15); }
.team-detail__body { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 2rem; padding: 1.5rem; }
.team-detail__body--text { grid-template-columns: minmax(0, 1fr); }
.team-detail__text { min-width: 0; /* max-width: 48rem;*/ }
.team-detail__text p { margin: 0 0 .85rem; }
.team-detail__text ul { margin: 1.25rem 0 .5rem; padding-left: 1.25rem; }
.team-detail__text > :first-child { margin-top: 0; }
.team-detail__text > :last-child { margin-bottom: 0; }
.team-detail__categories { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; }
.team-detail__categories a { display: block; padding: .3rem .75rem; border: 1px solid var(--category-color); border-radius: var(--corner-radius); text-decoration: none; font-size: .85rem; }
.team-detail__categories a:hover { text-decoration: underline; }
.team-detail__photos { display: grid; align-content: start; gap: 1rem; }
.team-detail__photos img { display: block; width: 100%; height: auto; border-radius: var(--corner-radius); }
@media (max-width: 599px) {
    .team-detail__body { grid-template-columns: minmax(0, 1fr); padding: 1rem; gap: 1.5rem; }
    .team-detail__header { padding: .65rem 1rem; }
}
@media (prefers-reduced-motion: reduce) {
    .team-card__arrow { transition: none; }
}

.team-detail__text h3 { margin: 1.5rem 0 .5rem; font-size: 1.05rem; line-height: 1.4; font-weight: 700; }
.team-detail__text h3:first-child { margin-top: 0; }

/* TANZinfos uses the same expanding grid as the team. */
.info-grid { align-items: stretch; }
.info-card__summary { display: flex; flex-direction: column; gap: 1rem; padding: 1rem 1.25rem; }
.info-card__summary p { margin: 0; font-size: calc(.95rem + 2px); }
.info-card__more { display: inline-flex; align-items: center; gap: .5rem; color: var(--category-color); font-size: .85rem; font-weight: 700; }
.info-card__placeholder { display: block; height: 100%; width: 100%; padding: 15%; color: var(--category-color); opacity: .55; }
.info-links { margin-top: 1.5rem; padding: 1rem; border: 1px solid var(--border-color); border-radius: var(--panel-radius); background: #fafafa; }
.info-links h3 { margin: 0 0 .75rem; }
.info-links__body p { margin: 0 0 .6rem; }
.info-links__body p:last-child { margin-bottom: 0; }
.info-links__body a { display: block; padding: .65rem .85rem; border: 1px solid var(--border-color); border-radius: var(--corner-radius); background: #fff; text-decoration: none; overflow-wrap: anywhere; }
.info-links__body a:hover { border-color: var(--category-color); text-decoration: underline; }

.info-card__trigger { display: flex; flex-direction: column; }
.info-card .category-panel__media { flex-shrink: 0; }
.info-card__summary { flex: 1; }
.info-card__more { margin-top: auto; }

.info-card { display: flex; }
.info-card__trigger { flex: 1; width: 100%; height: auto; }

/* Entry photos open their own Fancybox gallery; overview tiles keep navigation. */
.team-detail__photos .photo-lightbox-link { display: block; overflow: hidden; border-radius: var(--corner-radius); cursor: zoom-in; }
.photo-gallery-button { display: inline-block; padding: .5rem .85rem; border: 1px solid var(--category-color); border-radius: var(--corner-radius); text-decoration: none; font-size: .9rem; }
.photo-gallery-button:hover { text-decoration: underline; }
.fancybox__container { font-family: 'Oxygen', sans-serif; }

/* All three team photos, displayed 10% smaller within their column. */
.team-detail:not(.info-detail) .team-detail__photos { width: 90%; justify-self: center; }

.info-links__hint { margin: -.25rem 0 1rem; color: #626262; font-size: .85rem; }

/* Event and travel detail pages keep the same content and galleries as info panels. */
.course-category-content { padding: 0 var(--detail-text-inset) 1rem; }
.course-category-info, .course-category-text { padding: 0; }

/* Editable WordPress introduction below the course overview. */
.course-home-description { margin-top: 2rem; padding: 2rem; }
.course-home-description > * { /* max-width: 52rem;*/ }
.course-home-description h2 { margin: 0 0 1rem; font-size: clamp(1.4rem, 2.5vw, 1.8rem); line-height: 1.3; }
.course-home-description > :first-child { margin-top: 0; }
.course-home-description > :last-child { margin-bottom: 0; }

/* Nimbus provides these three separate fields; empty fields stay empty. */
.category-panel__copy { padding: 1rem 1.25rem 1.25rem; font-size: .925rem; line-height: 1.65; }
.category-panel__teaser { margin: 0 0 .75rem; font-weight: 700; }
.category-panel__copy > :last-child { margin-bottom: 0; }
.category-panel__description > :first-child { margin-top: 0; }
.category-panel__description > :last-child { margin-bottom: 0; }
.category-panel__description h3, .category-panel__description h4 { font-size: 1.05rem; line-height: 1.4; }

/* Coupon form fills the expanded info panel; overview images stay unchanged. */
.nimbus-coupon { width: 100%; min-width: 0; }
.nimbus-coupon__frame { display: block; width: 100%; height: clamp(1100px, 150vh, 1600px); border: 0; background: #fff; }
.nimbus-coupon__fallback { margin: 0; padding: 1rem 1.5rem 1.5rem; font-size: .9rem; }
.nimbus-coupon__fallback a { font-weight: 700; text-decoration: underline; }
@media (max-width: 599px) {
    .nimbus-coupon__frame { height: 1600px; }
    .nimbus-coupon__fallback { padding: 1rem; }
}

/* All detail text shares the parent inset, including TANZplausch. */

/* Independent, named Fancybox galleries in expanded TANZinfos entries. */
.info-gallery { padding: 1.5rem; }
.info-gallery h3 { margin: 0 0 1rem; }
.info-gallery__images { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.info-gallery__images a { display: block; min-width: 0; border-radius: var(--panel-radius); overflow: hidden; }
.info-gallery__images img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
@media (max-width: 899px) { .info-gallery__images { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 599px) { .info-gallery { padding: 1rem; } .info-gallery__images { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Contact content images share the site-wide panel rounding. */
.page-content--aligned-title .page-content__body img {
    border-radius: var(--panel-radius);
}

/* Event content photos sit to the right; the overview photo is not repeated. */
.course-category-info--with-photos { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: start; gap: 2rem; }
.course-category-info--with-photos .course-category-text { min-width: 0; }
.course-category-info--with-photos .team-detail__photos img { border-radius: var(--panel-radius); }
@media (max-width: 599px) { .course-category-info--with-photos { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; } }

/* TANZinfos content photos use the same rounding as event panels. */
.info-detail .team-detail__photos img { border-radius: var(--panel-radius); }

/* Contact image lives in the native page content, beside the address text. */
.page-content--aligned-title .page-content__body { display: flow-root; }
.page-content--aligned-title .page-content__body > p:first-child img {
    float: right;
    width: 45%;
    max-width: 450px;
    height: auto;
    margin: 0 0 1.5rem 2rem;
}
.page-content--aligned-title .page-content__body > p:first-child:has(img) > strong:first-child + br { display: none; }
.page-content--aligned-title .ta27-location { clear: both; }
@media (max-width: 599px) {
    .page-content--aligned-title .page-content__body > p:first-child img { float: none; display: block; width: 100%; max-width: 450px; margin: 0 0 1.5rem; }
}

/* Optional downloads: automatic width and file type in the frame legend. */
.event-documents { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 1rem; margin: 0 0 2rem; }
.event-document { flex: 0 0 auto; width: max-content; min-width: 0; max-width: 100%; margin: 0; padding: 0 1rem .85rem; border: 1px solid var(--border-color); border-radius: var(--panel-radius); color: inherit; }
.event-document legend { width: auto; max-width: 100%; margin: 0; padding: 0 .4rem; font-size: .85rem; font-weight: 400; line-height: 1.4; }
.event-document__link { display: flex; gap: .75rem; align-items: center; padding-top: .5rem; color: inherit; text-decoration: underline; font-weight: 700; overflow-wrap: anywhere; }
.event-document__link span { min-width: 0; }
.event-document svg { flex: 0 0 1.5rem; width: 1.5rem; height: 1.5rem; }
.event-document:focus-within { outline: 2px solid #1759b0; outline-offset: 3px; }

/* Limited rich text in editorial short descriptions, without extra outer spacing. */
.ta27-short-copy > :first-child { margin-top: 0; }
.ta27-short-copy > :last-child { margin-bottom: 0; }
.ta27-short-copy p { margin: 0 0 .65em; }
.ta27-short-copy :is(ul, ol) { margin: .4em 0 .65em; padding-inline-start: 1.4em; }
.ta27-short-copy li + li { margin-top: .15em; }

.category-panel__teaser.ta27-short-copy { font-weight: 400; }

/* Compact content-image panels; full images remain available in Fancybox. */
:is(.course-category-info--with-photos, .info-detail) .team-detail__photos .photo-lightbox-link {
    display: inline-flex;
    justify-self: start;
    width: auto;
    max-width: 100%;
    align-items: center;
    justify-content: center;
    border: 1px solid #dedede;
    border-radius: var(--panel-radius);
    background: #fafafa;
}
:is(.course-category-info--with-photos, .info-detail) .team-detail__photos img {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: contain;
    border-radius: var(--panel-radius);
}

/* Align Nimbus bar edges with the breadcrumb, and all three text starting points. */
.course-category-content > .nimbus-course-frame {
    width: calc(100% + var(--detail-text-inset) + var(--detail-text-inset));
    margin-inline: calc(0px - var(--detail-text-inset));
}
.site-main > .course-area-intro { padding-inline: var(--detail-text-inset); }

/* Quiet platform links at the right edge, level with the centred logo. */
.site-brand { position: relative; }
.header-social { position: absolute; top: calc(50% + 2px); right: 0; transform: translateY(-50%); display: flex; align-items: center; gap: .25rem; }
.header-social a { display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; color: #777; text-decoration: none; border-radius: var(--corner-radius); }
.header-social a:hover { color: #222; }
.header-social svg { display: block; width: 1.15rem; height: 1.15rem; }
@media (max-width: 599px) {
    .site-logo { width: min(360px, calc(100% - 5rem)); }
    .header-social { top: 50%; flex-direction: column; gap: 0; }
}

/* Native voucher order: open fieldsets, matching the site's panel rounding. */
.coupon-order { width: 100%; min-width: 0; padding: 1rem; }
.coupon-order fieldset { min-width: 0; margin: 0 0 1.25rem; padding: 1.25rem; border: 1px solid var(--border-color); border-radius: var(--panel-radius); }
.coupon-order legend { max-width: 100%; padding: 0 .5rem; font-size: 1.15rem; font-weight: 700; line-height: 1.4; }
.coupon-order__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.5rem; }
.coupon-order__field, .coupon-order__field--full { min-width: 0; }
.coupon-order__field--full { grid-column: 1 / -1; }
.coupon-order__field > label { display: block; margin-bottom: .4rem; }
.coupon-order :is(input:not([type="radio"]):not([type="hidden"]), select, textarea) { display: block; width: 100%; min-width: 0; min-height: 3rem; padding: .65rem .85rem; border: 1px solid #b8b8b8; border-radius: var(--panel-radius); background: #fff; color: #222; box-shadow: none; }
.coupon-order textarea { min-height: 8rem; resize: vertical; }
.coupon-order :is(input, select, textarea, button, a):focus-visible { outline: 2px solid var(--category-color, #4c7cbd); outline-offset: 3px; }
.coupon-order [aria-invalid="true"] { border-color: #b42222 !important; }
.coupon-order__payments { display: flex; flex-wrap: wrap; gap: 1rem 2rem; }
.coupon-order__payments label { display: inline-flex; align-items: center; gap: .6rem; cursor: pointer; }
.coupon-order__payments input { flex: 0 0 auto; width: 1.15rem; height: 1.15rem; margin: 0; accent-color: var(--category-color, #4c7cbd); }
.coupon-order .coupon-order__finish { display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; margin-bottom: 0; }
.coupon-order__legal { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.5rem; font-size: .95rem; }
.coupon-order__legal a { display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; text-decoration: underline; white-space: nowrap; }
.coupon-order__legal svg { flex: 0 0 auto; }
.coupon-order .coupon-order__required { margin: 0; font-size: .85rem; color: #626262; }
.coupon-order__submit { display: inline-flex; align-items: center; justify-content: center; align-self: flex-end; gap: .75rem; max-width: 100%; padding: .8rem 1.25rem; border: 1px solid transparent; border-radius: var(--panel-radius); background: var(--category-color, #4c7cbd); color: #17232d; font-weight: 700; cursor: pointer; }
.coupon-order__submit:hover { filter: brightness(.92); }
.coupon-order__notice { margin: 0 0 1.5rem; padding: 1rem; border: 1px solid; border-radius: var(--panel-radius); }
.coupon-order__notice p { margin: .4rem 0 0; }
.coupon-order__notice--success { border-color: #90b09b; background: #f0f7f2; color: #245235; }
.coupon-order__notice--error { border-color: #c88d8d; background: #fff5f5; color: #8c1d1d; }
.coupon-order .coupon-order__error { margin: .35rem 0 0; color: #a31e1e; font-size: .9rem; }
@media (max-width: 599px) {
    .coupon-order fieldset { padding: 1rem; }
    .coupon-order__grid { grid-template-columns: minmax(0, 1fr); }
    .coupon-order__payments { flex-direction: column; }
    .coupon-order__legal { gap: .75rem; font-size: .9rem; }
}

/* Normalize macOS/iOS selects to the same height as the native order inputs. */
.coupon-order :is(input:not([type="radio"]):not([type="hidden"]), select) { height: 3rem; line-height: 1.5; }
.coupon-order select {
    -webkit-appearance: none;
    appearance: none;
    padding-right: 2.75rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 5h10l-5 6z' fill='%23505050' stroke='%23505050' stroke-width='.5' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .85rem center;
    background-size: 1rem;
}
