Files
laraundfelix/resources/css/widgets.css
LarsandClaude Opus 5.5 d89d4bdc70
CI Feature / test (push) Successful in 39s
Deploy Test / test (push) Successful in 32s
Deploy Test / deploy (push) Successful in 28s
Verlängere den Markenstrich im Editorial-Einstieg.
Der kurze Strich lag unter dem ersten Wort der letzten Zeile und wirkte
wie die Hervorhebung eines einzelnen Wortes. Er läuft jetzt als Linie
unter der Überschrift.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 07:15:11 +01:00

837 lines
19 KiB
CSS

/*
* Widget-Ansichten (Designiteration 1). Jede Regel verwendet Bedeutungswerte und richtet sich nach der Slotbreite
* (Container „slot“), nicht nach dem Fenster. Markenakzente (Unterstreichung, Strahlen) stammen aus
* resources/views/components/brand und sind dekorativ.
*/
.widget {
color: var(--color-text);
}
.widget > :last-child,
.widget .prose > :last-child {
margin-bottom: 0;
}
/* Überschrift */
.widget-heading h1,
.widget-heading h2 {
max-width: 22ch;
}
/* ------------------------------------------------------------------------------------------------
* Einstieg (Hero)
* Varianten: standard (Text | Bild), highlight (Markenfläche), stage (Markenbühne), editorial (textbetont).
* ---------------------------------------------------------------------------------------------- */
.hero {
--hero-focus: 50% 50%;
position: relative;
display: grid;
gap: var(--space-6);
align-items: center;
}
.hero-copy > :is(h1, h2) {
font-size: clamp(2.125rem, 1.2rem + 4.4cqi, 4rem);
line-height: 1.05;
letter-spacing: -0.025em;
max-width: 15ch;
margin: 0;
text-wrap: balance;
}
/* Markenstrich unter der Überschrift: kurze gelbe Unterstreichung, kein Hervorheben einzelner Wörter. */
.hero-mark {
width: clamp(5.5rem, 4rem + 6cqi, 9rem);
height: 0.9rem;
margin: var(--space-3) 0 var(--space-5);
}
.hero .lede {
max-width: 48ch;
margin: 0;
font-size: clamp(1.125rem, 1rem + 0.6cqi, 1.3125rem);
}
.hero-actions {
display: flex;
flex-wrap: wrap;
gap: var(--space-3);
margin-top: var(--space-6);
}
.hero-copy {
position: relative;
min-width: 0;
}
.hero-figure {
position: relative;
margin: 0;
}
.hero-image {
display: block;
width: 100%;
height: 100%;
object-fit: cover;
object-position: var(--hero-focus);
}
.hero-figure .hero-image {
aspect-ratio: 4 / 3;
border-radius: var(--radius-panel);
}
.hero-rays {
position: absolute;
width: clamp(2.75rem, 2rem + 3cqi, 4.5rem);
pointer-events: none;
}
/* Standard: Bild mit grüner Fläche als Versatz und Signalstrahlen an der Ecke. */
.hero-standard .hero-figure::before {
content: '';
position: absolute;
inset: 1.25rem -1.25rem -1.25rem 1.25rem;
z-index: -1;
border-radius: var(--radius-panel);
background: var(--lf-green-tint);
}
.hero-standard .hero-rays {
top: -2.25rem;
left: -1.75rem;
transform: rotate(-18deg);
}
@container slot (min-width: 48rem) {
.hero-standard.hero-with-image {
grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
gap: clamp(2.5rem, 6cqi, 5rem);
}
}
/* Hervorgehoben: dunkle Markenfläche mit gelben Akzenten. */
.hero-highlight {
padding: clamp(1.75rem, 6cqi, 4rem);
border-radius: var(--radius-panel);
background: var(--lf-navy);
--color-text: #f4f6f8;
--color-heading: var(--lf-white);
--color-link: var(--lf-white);
--color-link-hover: var(--lf-yellow);
--color-focus: var(--lf-yellow);
--color-border-strong: rgb(255 255 255 / 60%);
--color-action-secondary-text: var(--lf-white);
color: var(--color-text);
overflow: hidden;
}
.hero-highlight .hero-rays {
top: clamp(1rem, 3cqi, 2rem);
right: clamp(1rem, 4cqi, 2.5rem);
}
.hero-highlight .hero-figure .hero-image {
aspect-ratio: 16 / 10;
}
@container slot (min-width: 48rem) {
.hero-highlight.hero-with-image {
grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
gap: clamp(2rem, 5cqi, 4rem);
}
}
/* Editorial: großer Text, Beschreibung und Schaltflächen nebeneinander, Bild als breites Band darunter. */
.hero-editorial {
gap: var(--space-7);
}
.hero-editorial .hero-copy > :is(h1, h2) {
font-size: clamp(2.375rem, 1.2rem + 5.6cqi, 5rem);
max-width: 18ch;
}
.hero-editorial .hero-figure .hero-image {
aspect-ratio: 16 / 9;
}
/* Abgesetzter Markenstrich: liest sich als Abschluss der Überschrift, nicht als Hervorhebung eines Wortes. */
.hero-editorial .hero-mark {
width: clamp(9rem, 32cqi, 20rem);
margin-top: var(--space-5);
}
@container slot (min-width: 56rem) {
.hero-editorial .hero-copy {
display: grid;
grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
column-gap: clamp(2rem, 6cqi, 5rem);
align-items: end;
}
.hero-editorial .hero-copy > :is(h1, h2),
.hero-editorial .hero-mark {
grid-column: 1 / -1;
}
.hero-editorial .hero-actions {
margin-top: 0;
justify-content: flex-end;
}
.hero-editorial .hero-figure .hero-image {
aspect-ratio: 21 / 9;
}
}
/*
* Markenbühne: Bild über die volle Breite, Text auf einer hellen Tafel (Kontrast unabhängig vom Motiv).
* Schmal: Bild oben im festen Format, Tafel überlappt den unteren Bildrand. Breit (ab 56rem): Bild füllt die Bühne,
* die Tafel steht im Grundraster links oder rechts. Feste Formate verhindern Layoutverschiebungen beim Laden.
*/
.hero-stage {
display: block;
}
.hero-stage .hero-media {
position: relative;
aspect-ratio: 4 / 3;
overflow: hidden;
background: var(--lf-green-tint);
}
.hero-stage .hero-frame {
position: relative;
z-index: 1;
padding-inline: var(--gutter);
}
.hero-stage.hero-with-image .hero-frame {
margin-top: -3.5rem;
}
.hero-stage .hero-copy {
--color-text: var(--lf-ink);
--color-heading: var(--lf-navy);
--color-link: var(--lf-navy);
--color-focus: var(--lf-focus);
--color-border-strong: var(--lf-navy);
--color-action-secondary-text: var(--lf-navy);
color: var(--color-text);
background: var(--lf-cream);
border-radius: var(--radius-panel);
padding: clamp(1.5rem, 1rem + 3cqi, 3rem);
box-shadow: 0 18px 40px rgb(3 37 81 / 12%);
}
.hero-stage .hero-rays {
top: -1.6rem;
right: 1.5rem;
}
/* Ohne Bild: Markenbühne als ruhige Fläche. */
.hero-stage:not(.hero-with-image) .hero-copy {
box-shadow: none;
}
@container slot (min-width: 56rem) {
.hero-stage.hero-with-image {
display: grid;
min-height: clamp(30rem, 72svh, 46rem);
}
.hero-stage .hero-media {
position: absolute;
inset: 0;
aspect-ratio: auto;
}
.hero-stage.hero-with-image .hero-frame {
display: grid;
align-items: center;
justify-items: end;
margin-top: 0;
padding-block: clamp(3rem, 6cqi, 5.5rem);
padding-inline: var(--frame-inset);
}
.hero-stage.hero-text-left .hero-frame {
justify-items: start;
}
.hero-stage .hero-copy {
width: min(36rem, 46%);
}
.hero-stage .hero-rays {
top: -2.25rem;
right: auto;
left: -2rem;
transform: rotate(-18deg);
}
}
/* Randlos (SectionRenderer: section-bleed): keine Begrenzung, Abstand nach unten bleibt für die Tafel. */
.section-bleed {
padding-block: 0;
}
.section-bleed .page-section-inner {
width: 100%;
}
/* Schmal: Abstand unter der Tafel bis zum nächsten Abschnitt. */
@container slot (max-width: 55.99rem) {
.section-bleed .hero-stage .hero-frame {
padding-bottom: clamp(2rem, 8cqi, 3.5rem);
}
}
/* Nicht randlos (Markenbühne in schmaleren Abschnitten oder Rastern): Bild mit runden Ecken. */
.page-section:not(.section-bleed) .hero-stage .hero-media {
border-radius: var(--radius-panel);
}
.page-section:not(.section-bleed) .hero-stage .hero-frame {
padding-inline: clamp(0.75rem, 4cqi, 2.5rem);
}
/* Fließtext */
.widget-prose .prose p {
margin: 0 0 var(--space-4);
}
/* ------------------------------------------------------------------------------------------------
* Bild und Text. Varianten: image_left, image_right. Stufen: schmal (gestapelt), ab 36rem nebeneinander,
* ab 56rem Bild betont. Formate über Einstellung: Quer-, Hochformat, Quadrat, Original.
* ---------------------------------------------------------------------------------------------- */
.image-text {
--image-focus: 50% 50%;
--image-ratio: 4 / 3;
display: grid;
gap: var(--space-6);
}
.image-format-portrait {
--image-ratio: 4 / 5;
}
.image-format-square {
--image-ratio: 1 / 1;
}
.image-text-figure {
position: relative;
margin: 0;
}
/* Versetzte Markenfläche hinter dem Bild, auf der Außenseite des Textes. */
.image-text-figure::before {
content: '';
position: absolute;
inset: 0.6rem -0.6rem -0.6rem 0.6rem;
z-index: -1;
border-radius: var(--radius-panel);
background: var(--lf-yellow-tint);
}
@container slot (min-width: 36rem) {
.image-text-figure::before {
inset: 1rem 1rem -1rem -1rem;
}
.image-text-right .image-text-figure::before {
inset: 1rem -1rem -1rem 1rem;
}
}
.scope-dark .image-text-figure::before,
.scope-accent .image-text-figure::before {
background: rgb(255 255 255 / 12%);
}
.image-text-figure img {
display: block;
width: 100%;
aspect-ratio: var(--image-ratio);
object-fit: cover;
object-position: var(--image-focus);
border-radius: var(--radius-panel);
}
.image-format-original .image-text-figure img {
aspect-ratio: auto;
}
.image-text-copy > :first-child {
margin-top: 0;
}
.image-text-copy h1,
.image-text-copy h2 {
font-size: clamp(1.75rem, 1.2rem + 2.4cqi, 2.75rem);
line-height: 1.1;
max-width: 20ch;
margin: 0;
text-wrap: balance;
}
.image-text-mark {
width: 5rem;
height: 0.75rem;
margin: var(--space-3) 0 var(--space-5);
}
.image-text-copy .prose {
font-size: clamp(1.0625rem, 1rem + 0.25cqi, 1.1875rem);
}
@container slot (min-width: 36rem) {
.image-text {
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
align-items: center;
gap: clamp(2rem, 5cqi, 4rem);
}
.image-text-right > .image-text-figure {
order: 2;
}
.image-text-no-image {
grid-template-columns: minmax(0, 1fr);
}
}
@container slot (min-width: 56rem) {
.image-text-left {
grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
}
.image-text-right {
grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
}
.image-text-no-image {
grid-template-columns: minmax(0, 1fr);
}
}
/* ------------------------------------------------------------------------------------------------
* Redaktionelle Karten. Varianten: Raster (cards-grid), kompakte Liste (cards-compact),
* erste Karte hervorgehoben (cards-featured). Die ganze Karte ist über den Titellink klickbar.
* ---------------------------------------------------------------------------------------------- */
.cards {
--card-surface: var(--lf-cream);
display: grid;
grid-template-columns: repeat(auto-fill, minmax(min(15rem, 100%), 1fr));
gap: var(--grid-gap);
list-style: none;
padding: 0;
margin: 0;
}
.section-bg-light .cards,
.scope-dark .cards,
.scope-accent .cards,
.section-bg-image .cards {
--card-surface: var(--lf-white);
}
.card {
position: relative;
display: flex;
flex-direction: column;
background: var(--card-surface);
border-radius: var(--radius-card);
overflow: hidden;
color: var(--lf-ink);
--color-text: var(--lf-ink);
--color-text-muted: var(--lf-ink-muted);
--color-heading: var(--lf-navy);
--color-link: var(--lf-navy);
--color-focus: var(--lf-focus);
}
.card-media {
aspect-ratio: 3 / 2;
overflow: hidden;
background: var(--lf-green-tint);
}
.card-image {
display: block;
width: 100%;
height: 100%;
object-fit: cover;
}
.card-body {
display: grid;
gap: var(--space-2);
padding: var(--space-5);
}
.card-title {
font-size: clamp(1.1875rem, 1.1rem + 0.4cqi, 1.375rem);
line-height: 1.2;
margin: 0;
}
.card-title a {
color: inherit;
text-decoration: none;
}
/* Gestreckter Link: die ganze Karte ist klickbar, ein einziger Tabstopp. */
.card-title a::after {
content: '';
position: absolute;
inset: 0;
border-radius: inherit;
}
.card-linked:hover .card-title a {
text-decoration: underline;
text-decoration-thickness: 2px;
text-underline-offset: 0.2em;
}
.card-linked:has(a:focus-visible) {
outline: 3px solid var(--color-focus);
outline-offset: 3px;
}
.card-title a:focus-visible {
outline: none;
}
.card p {
margin: 0;
color: var(--color-text-muted);
}
/* Karte ohne Bild: gelbe Markenkante oben. */
.cards-grid .card:not(.card-with-image),
.cards-featured .card:not(.card-with-image) {
box-shadow: inset 0 5px 0 var(--lf-yellow);
}
/* Hervorgehoben: Die erste Karte nimmt die ganze Zeile ein, ab 44rem Bild neben dem Text. */
.cards-featured .card-lead {
grid-column: 1 / -1;
}
.cards-featured .card-lead .card-title {
font-size: clamp(1.5rem, 1.1rem + 1.8cqi, 2.25rem);
}
.cards-featured .card-lead .card-body {
padding: clamp(1.5rem, 4cqi, 3rem);
align-content: center;
}
@container slot (min-width: 44rem) {
.cards-featured .card-lead.card-with-image {
display: grid;
grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
}
.cards-featured .card-lead .card-media {
aspect-ratio: auto;
min-height: 20rem;
}
}
/* Kompakte Liste: redaktionelle Zeilen mit Trennlinie, Bild klein rechts. */
.cards-compact {
grid-template-columns: minmax(0, 1fr);
gap: 0;
}
.cards-compact .card {
flex-direction: row-reverse;
align-items: center;
gap: var(--space-4);
border-radius: 0;
background: transparent;
border-top: 1px solid var(--color-border);
color: var(--color-text);
--color-text: inherit;
--color-heading: inherit;
--color-link: inherit;
--color-text-muted: inherit;
overflow: visible;
}
.cards-compact .card:last-child {
border-bottom: 1px solid var(--color-border);
}
.cards-compact .card-body {
flex: 1;
padding: var(--space-4) 0;
}
.cards-compact .card p {
opacity: 0.88;
}
.cards-compact .card-media {
flex: none;
width: clamp(4.5rem, 18cqi, 6.5rem);
aspect-ratio: 1;
margin-block: var(--space-3);
border-radius: var(--radius-small);
}
/* ------------------------------------------------------------------------------------------------
* Programm- und Modulkarten. Inhalte aus den Fachdaten; die Markentafel trägt die Art (Programm, Modul).
* Stufen: schmal gestapelt; ab 40rem Slotbreite bei einer Karte Tafel neben dem Text; Liste in „compact“.
* ---------------------------------------------------------------------------------------------- */
.catalog-cards > h2 {
max-width: 22ch;
}
.catalog-list {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(min(17rem, 100%), 1fr));
gap: var(--grid-gap);
list-style: none;
padding: 0;
margin: var(--space-5) 0 0;
}
.catalog-cards > :first-child + .catalog-list,
.catalog-cards > .catalog-list:first-child {
margin-top: 0;
}
.catalog-card {
position: relative;
display: flex;
flex-direction: column;
background: var(--lf-white);
border: 1px solid var(--lf-line);
border-radius: var(--radius-card);
overflow: hidden;
color: var(--lf-ink);
--color-text: var(--lf-ink);
--color-text-muted: var(--lf-ink-muted);
--color-heading: var(--lf-navy);
--color-link: var(--lf-navy);
--color-focus: var(--lf-focus);
}
.catalog-card-visual {
position: relative;
display: flex;
align-items: flex-end;
min-height: 7rem;
padding: var(--space-4) var(--space-5);
background: var(--lf-navy);
border-bottom: 5px solid var(--lf-yellow);
}
/* Auf dunklen Flächen trägt Grün dunkel die Tafel, damit sie sich vom Abschnitt abhebt. */
.scope-dark .catalog-card-visual {
background: var(--lf-green-deep);
}
.catalog-card-visual span {
font-family: var(--font-display);
font-weight: 800;
font-size: 1.25rem;
color: var(--lf-white);
}
.catalog-card-rays {
position: absolute;
top: var(--space-4);
right: var(--space-5);
width: 2.75rem;
}
.catalog-card-body {
display: grid;
gap: var(--space-2);
align-content: start;
padding: var(--space-5);
}
.catalog-card-body h3 {
font-size: clamp(1.25rem, 1.15rem + 0.5cqi, 1.5rem);
line-height: 1.2;
margin: 0;
}
.catalog-card-body h3 a {
color: inherit;
text-decoration: none;
}
.catalog-card-linked h3 a::after {
content: '';
position: absolute;
inset: 0;
}
.catalog-card-linked:hover h3 a {
text-decoration: underline;
text-decoration-thickness: 2px;
text-underline-offset: 0.2em;
}
.catalog-card-linked:has(a:focus-visible) {
outline: 3px solid var(--color-focus);
outline-offset: 3px;
}
.catalog-card-linked h3 a:focus-visible {
outline: none;
}
.catalog-card-body p {
margin: 0;
color: var(--color-text-muted);
}
/* Die Art steht in der Tafel; für Hilfsmittel bleibt sie im Text erhalten. */
.catalog-cards-standard .catalog-card-kind {
position: absolute;
width: 1px;
height: 1px;
overflow: hidden;
clip: rect(0 0 0 0);
white-space: nowrap;
}
.catalog-card-kind {
font-size: var(--text-small);
font-weight: 700;
color: var(--lf-green-deep);
margin: 0;
}
.catalog-cards[data-count='1'] .catalog-list {
grid-template-columns: minmax(0, 1fr);
}
@container slot (min-width: 40rem) {
.catalog-cards-standard[data-count='1'] .catalog-card {
display: grid;
grid-template-columns: minmax(12rem, 1fr) minmax(0, 2fr);
}
.catalog-cards-standard[data-count='1'] .catalog-card-visual {
border-bottom: 0;
border-right: 5px solid var(--lf-yellow);
min-height: 11rem;
}
.catalog-cards-standard[data-count='1'] .catalog-card-body {
align-content: center;
padding: var(--space-6);
}
}
.catalog-cards-compact .catalog-list {
grid-template-columns: minmax(0, 1fr);
gap: 0;
}
.catalog-cards-compact .catalog-card {
border-width: 1px 0 0;
border-radius: 0;
background: transparent;
color: var(--color-text);
--color-text: inherit;
--color-text-muted: inherit;
--color-heading: inherit;
--color-link: inherit;
border-color: var(--color-border);
overflow: visible;
}
.catalog-cards-compact .catalog-card:last-child {
border-bottom-width: 1px;
}
.catalog-cards-compact .catalog-card-body {
padding: var(--space-4) 0;
gap: var(--space-1);
}
.catalog-cards-compact .catalog-card-kind {
color: inherit;
opacity: 0.85;
}
.catalog-card-internal {
border-style: dashed;
}
/* Handlungsaufruf */
.cta {
position: relative;
background: var(--color-surface-subtle);
border-radius: var(--radius-panel);
padding: clamp(1.5rem, 5cqi, 3rem);
color: var(--lf-ink);
--color-heading: var(--lf-navy);
--color-text: var(--lf-ink);
--color-link: var(--lf-navy);
--color-focus: var(--lf-focus);
--color-action: var(--lf-green-deep);
--color-action-hover: #2f6407;
--color-action-text: var(--lf-white);
}
.section-bg-light .cta {
background: var(--lf-white);
}
.cta h2 {
font-size: clamp(1.5rem, 1.1rem + 2cqi, 2.25rem);
}
.cta p {
max-width: var(--measure);
}
.cta a {
margin-top: var(--space-2);
}
@container slot (max-width: 20rem) {
.cta a {
width: 100%;
}
}
/* Häufige Fragen */
.faq {
margin: 0;
}
.faq dt {
font-family: var(--font-display);
font-weight: 700;
font-size: 1.125rem;
color: var(--color-heading);
padding-top: var(--space-4);
border-top: 1px solid var(--color-border);
}
.faq dt:first-child {
border-top: 0;
padding-top: 0;
}
.faq dd {
margin: var(--space-2) 0 var(--space-4);
max-width: var(--measure);
}