/* ============ Seiten aus Bloecken (Content/BlockRegistry, Pages/Shared/Blocks) ============
   Uebernommen aus MatCMS (Editor v2), Farben aus dem Branding der Schule (--schulio-*). Ein Abschnitt
   ist ein Band ueber die ganze Fensterbreite (auch aus main.container heraus), sein Inhalt bleibt in
   der Seitenbreite. */
body:has(.cms-blocks) { overflow-x: clip; }
.cms-blocks { margin-top: -2rem; margin-bottom: -2rem; }
.cms-blocks .el-section { position: relative; width: 100vw; margin-inline: calc(50% - 50vw); padding: 56px 0; }
.cms-blocks :is(.el-column, .el-inner) .el-section { width: auto; margin-inline: 0; }
.el-section.el-pad-none { padding: 0; }
.el-section.el-pad-s { padding: 28px 0; }
.el-section.el-pad-l { padding: 88px 0; }
.el-section.el-pad-xl { padding: 128px 0; }
.el-section.el-h-half { min-height: 50vh; display: flex; align-items: center; }
.el-section.el-h-screen { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; }
.el-section.el-h-half > .el-inner, .el-section.el-h-screen > .el-inner { width: 100%; }
.el-bg-alt { background: #f1f5f9; }
.el-bg-primary { background: var(--schulio-primary, #2d5fb8); color: var(--schulio-on-primary, #fff); }
.el-bg-dark { background: #0f172a; color: #e2e8f0; }
.el-bg-primary :is(h1, h2, h3, h4), .el-bg-dark :is(h1, h2, h3, h4),
.el-bg-primary .cms-body a, .el-bg-dark .cms-body a { color: inherit; }
.el-bg-primary :is(.el-hl, .el-kicker), .el-bg-dark :is(.el-hl, .el-kicker) { color: inherit; opacity: .85; }
.el-bg-image { background-size: cover; background-position: center; background-repeat: no-repeat; color: #fff; }
.el-bg-image :is(h1, h2, h3, h4) { color: #fff; }
.el-bg-image::before { content: ""; position: absolute; inset: 0; pointer-events: none; }
.el-bg-image.el-ov-light::before { background: rgba(0, 0, 0, .25); }
.el-bg-image.el-ov-medium::before { background: rgba(0, 0, 0, .45); }
.el-bg-image.el-ov-strong::before { background: rgba(0, 0, 0, .65); }
.el-bg-image > .el-inner { position: relative; }

.el-inner { max-width: 1120px; margin: 0 auto; padding: 0 1.5rem; box-sizing: border-box; }
.el-inner, .el-column { display: flex; flex-direction: column; gap: 18px; }
.el-inner.el-w-narrow { max-width: 820px; }
.el-inner.el-w-wide { max-width: 1400px; }
.el-column .el-inner { padding: 0; }
.el-align-left { text-align: left; }
.el-align-center { text-align: center; }
.el-align-right { text-align: right; }
.el-inner.el-align-center, .el-column.el-align-center { align-items: center; }
.el-inner.el-align-right, .el-column.el-align-right { align-items: flex-end; }
:is(.el-heading, .el-text, .el-image, .el-buttons).el-align-left { align-self: flex-start; }
:is(.el-heading, .el-text, .el-image, .el-buttons).el-align-center { align-self: center; }
:is(.el-heading, .el-text, .el-image, .el-buttons).el-align-right { align-self: flex-end; }
.el-inner > *, .el-column > * { max-width: 100%; }
/* Listen-Bausteine fuellen die Breite und bleiben linksbuendig, auch in einem zentrierten Abschnitt. */
.el-inner > :is(.el-cards, .el-gallery, .el-accordion, .el-downloads, .el-columns, .el-notice),
.el-column > :is(.el-cards, .el-gallery, .el-accordion, .el-downloads, .el-notice),
.mat-ed-child > :is(.el-cards, .el-gallery, .el-accordion, .el-downloads, .el-columns, .el-notice) { align-self: stretch; text-align: left; }

.el-heading :is(h1, h2, h3, h4) { margin: 0; color: var(--schulio-heading, inherit); line-height: 1.2; }
.el-heading h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.el-heading h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
.el-heading.el-size-s :is(h1, h2, h3, h4) { font-size: clamp(1.15rem, 2vw, 1.4rem); }
.el-heading.el-size-m :is(h1, h2, h3, h4) { font-size: clamp(1.45rem, 3vw, 2rem); }
.el-heading.el-size-l :is(h1, h2, h3, h4) { font-size: clamp(1.9rem, 4.2vw, 2.9rem); }
.el-heading.el-size-xl :is(h1, h2, h3, h4) { font-size: clamp(2.3rem, 6vw, 4.2rem); line-height: 1.08; }
.el-hl { color: var(--schulio-accent, var(--schulio-link)); }
.el-kicker { margin: 0 0 6px; font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--schulio-link); }

.el-text > :first-child { margin-top: 0; }
.el-text > :last-child { margin-bottom: 0; }
.el-text.el-size-s { font-size: .92em; }
.el-text.el-size-l { font-size: 1.15em; line-height: 1.7; }
.el-text.el-measure { max-width: 68ch; }

.el-image { margin: 0; }
.el-image img { display: block; width: 100%; height: auto; }
.el-image.el-isize-l { width: min(100%, 75%); }
.el-image.el-isize-m { width: min(100%, 50%); }
.el-image.el-isize-s { width: min(100%, 320px); }
.el-image.el-isize-xs { width: min(100%, 160px); }
.el-image.el-shape-rounded img { border-radius: 14px; }
.el-image.el-shape-circle img { border-radius: 50%; aspect-ratio: 1; object-fit: cover; }
.el-image.el-shape-square img { aspect-ratio: 1; object-fit: cover; }
.el-image.el-shape-landscape img { aspect-ratio: 16 / 9; object-fit: cover; }
.el-image figcaption { margin-top: 8px; font-size: .9em; opacity: .75; }

.el-buttons { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.el-buttons.el-stack-column { flex-direction: column; align-items: flex-start; }
.el-inner.el-align-center .el-buttons, .el-column.el-align-center .el-buttons, .el-buttons.el-align-center { justify-content: center; }
.el-inner.el-align-right .el-buttons, .el-column.el-align-right .el-buttons, .el-buttons.el-align-right { justify-content: flex-end; }
.el-btn { display: inline-flex; align-items: center; gap: 8px; padding: .7rem 1.3rem; border-radius: 999px; font-weight: 600; text-decoration: none;
    background: var(--schulio-action, #2d5fb8); color: var(--schulio-on-action, #fff); border: 2px solid var(--schulio-action, #2d5fb8); transition: filter .12s; }
.el-btn:hover { filter: brightness(1.08); text-decoration: none; }
.el-btn--outline { background: transparent; color: var(--schulio-action, #2d5fb8); }
/* Auf Schulfarbe: gefuellt in der Aktionsfarbe, umrandet in der Textfarbe der Schulfarbe (die kann hell ODER dunkel sein). */
.el-bg-primary .el-btn--outline { background: transparent; color: var(--schulio-on-primary, #fff); border-color: currentColor; }
.el-bg-primary .el-heading :is(h1, h2, h3, h4) { color: var(--schulio-on-primary, inherit); }
:is(.el-bg-dark, .el-bg-image) .el-btn { background: #fff; color: #0f172a; border-color: #fff; }
:is(.el-bg-dark, .el-bg-image) .el-btn--outline { background: transparent; color: #fff; }
:is(.el-bg-dark, .el-bg-image) .el-heading :is(h1, h2, h3, h4) { color: #fff; }
.el-btn-link { color: var(--schulio-link); font-weight: 600; text-decoration: none; }
.el-btn-link::after { content: " \2192"; }
.el-btn-link:hover { text-decoration: underline; text-underline-offset: 3px; }

.el-spacer { height: 32px; }
.el-spacer.el-space-s { height: 12px; }
.el-spacer.el-space-l { height: 64px; }
.el-spacer.el-space-xl { height: 112px; }
.el-spacer.el-line { position: relative; }
.el-spacer.el-line::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid currentColor; opacity: .18; }

.el-columns { display: grid; gap: 40px; align-items: start; width: 100%; }
.el-columns.el-gap-s { gap: 20px; }
.el-columns.el-gap-l { gap: 72px; }
.el-columns.el-valign-center { align-items: center; }
.el-columns.el-valign-bottom { align-items: end; }
.el-cols-50-50 { grid-template-columns: 1fr 1fr; }
.el-cols-33-67 { grid-template-columns: 1fr 2fr; }
.el-cols-67-33 { grid-template-columns: 2fr 1fr; }
.el-cols-25-75 { grid-template-columns: 1fr 3fr; }
.el-cols-75-25 { grid-template-columns: 3fr 1fr; }
.el-cols-33-33-33 { grid-template-columns: repeat(3, 1fr); }
.el-cols-25-25-25-25 { grid-template-columns: repeat(4, 1fr); }
.el-column { min-width: 0; }
.el-column.el-bg-alt, .el-column.el-bg-primary, .el-column.el-bg-dark { border-radius: 12px; }
.el-column.el-ipad-s { padding: 16px; }
.el-column.el-ipad-m { padding: 28px; }
.el-column.el-ipad-l { padding: 44px; }

.el-notice { border-radius: 12px; padding: 16px 20px; border-left: 5px solid #2563eb; background: #eff6ff; color: #0f172a; }
.el-notice--success { border-color: #16a34a; background: #f0fdf4; }
.el-notice--warning { border-color: #d97706; background: #fffbeb; }
.el-notice__title { margin: 0 0 4px; font-weight: 700; }
.el-notice .cms-body > :last-child { margin-bottom: 0; }

.el-downloads { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.el-downloads a { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border: 1px solid #e2e8f0; border-radius: 12px; background: #fff;
    color: #0f172a; text-decoration: none; transition: border-color .12s, box-shadow .12s; }
.el-downloads a:hover { border-color: var(--schulio-link); box-shadow: 0 4px 14px -8px rgba(15, 23, 42, .35); }
.el-dl-ext { flex: none; min-width: 46px; padding: 6px 0; border-radius: 8px; background: var(--schulio-primary, #2d5fb8); color: var(--schulio-on-primary, #fff);
    font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-align: center; }
.el-dl-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.el-dl-text small { color: #64748b; }
.el-dl-icon { flex: none; width: 22px; height: 22px; fill: none; stroke: var(--schulio-link); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.el-accordion { display: flex; flex-direction: column; gap: 8px; }
.el-accordion details { border: 1px solid #e2e8f0; border-radius: 12px; background: #fff; color: #0f172a; }
.el-accordion summary { cursor: pointer; padding: 14px 18px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.el-accordion summary::-webkit-details-marker { display: none; }
.el-accordion summary::after { content: "+"; font-size: 1.3rem; line-height: 1; color: var(--schulio-link); }
.el-accordion details[open] summary::after { content: "\2013"; }
.el-accordion .cms-body { padding: 0 18px 16px; }

.el-cards, .el-gallery { display: grid; gap: 20px; }
.el-grid-2 { grid-template-columns: repeat(2, 1fr); }
.el-grid-3 { grid-template-columns: repeat(3, 1fr); }
.el-grid-4 { grid-template-columns: repeat(4, 1fr); }
.el-card { display: flex; flex-direction: column; border: 1px solid #e2e8f0; border-radius: 14px; overflow: hidden; background: #fff; color: #0f172a; }
.el-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; }
.el-card__body { padding: 16px 18px 18px; }
.el-card h3 { margin: 0 0 6px; font-size: 1.1rem; }
.el-card h3 a { color: var(--schulio-link); text-decoration: none; }
.el-card h3 a:hover { text-decoration: underline; }
.el-card p { margin: 0; color: #475569; white-space: pre-line; }
.el-gallery figure { margin: 0; }
.el-gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; display: block; }
.el-gallery figcaption { margin-top: 6px; font-size: .88em; opacity: .75; }

.el-quote { margin: 0; padding: 8px 0 8px 22px; border-left: 4px solid var(--schulio-accent, var(--schulio-link)); font-size: 1.2em; font-style: italic; }
.el-quote p { margin: 0 0 8px; white-space: pre-line; }
.el-quote cite { font-size: .8em; font-style: normal; opacity: .75; }

@media (max-width: 900px) {
    .el-cols-25-25-25-25, .el-grid-3, .el-grid-4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
    .el-columns.el-mobile-stack, .el-columns.el-mobile-reverse { display: flex; flex-direction: column; gap: 28px; }
    .el-columns.el-mobile-reverse { flex-direction: column-reverse; }
    :is(.el-columns.el-mobile-stack, .el-columns.el-mobile-reverse) > :is(.el-column, .mat-ed-child > .el-column) { width: 100%; }
    .cms-blocks .el-section { padding: 40px 0; }
    .el-section.el-pad-s { padding: 22px 0; }
    .el-section.el-pad-l, .el-section.el-pad-xl { padding: 60px 0; }
    .el-image.el-isize-l, .el-image.el-isize-m { width: 100%; }
    .el-grid-2, .el-grid-3, .el-grid-4 { grid-template-columns: 1fr; }
    .el-inner { padding: 0 1rem; }
}
