/*
 * Site Template Main Stylesheet
 * Modernized and stable base design for TYPO3 site packages
 */

:root {
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.5rem;
    --space-6: 2rem;
    --space-7: 3rem;
    --space-8: 4rem;
    --radius-sm: 0.4rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.4rem;
    --shadow-sm: 0 4px 14px rgba(15, 23, 42, 0.13);
    --shadow-md: 0 12px 30px rgba(15, 23, 42, 0.18);
    --shadow-lg: 0 24px 48px rgba(15, 23, 42, 0.24);
    --container-width: 1680px;
    --header-height: 5rem;
    /* Background colors for full-width frames - override in TypoScript or site config */
    --background-color-2: #e5e7eb;
    --background-color-3: #f3f4f6;
    --background-color-4: #fef3c7;
    --background-color-5: #dbeafe;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: var(--font-base-size, 16px);
}

body {
    margin: 0;
    font-family: var(--font-primary, system-ui, sans-serif);
    color: var(--text-color, #1f2937);
    background: var(--bg-color, #ffffff);
    line-height: 1.65;
    font-weight: var(--font-weight-normal, 400);
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
    overflow-wrap: break-word;
    word-break: break-word;
}

main {
    min-height: 40vh;
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

a:hover {
    color: #f46d09;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0 0 var(--space-4);
    font-family: var(--font-headings, system-ui, sans-serif);
    font-weight: var(--font-weight-headings, 400);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

h1{
    color: #ffffff;
}

h2, h3{
    color: rgba(255, 255, 255, 0.95);
}

h4,h5,h6 {
    color: rgba(255, 255, 255, 0.9);
}

h1 {
    font-size: clamp(2.4rem, 6vw, 4.2rem);
}

h2 {
    font-size: clamp(1.8rem, 4vw, 3rem);
}

h3 {
    font-size: clamp(1.4rem, 2.8vw, 2rem);
}

p {
    margin: 0 0 var(--space-4);
}





.container {
    width: min(100% - 4rem, var(--container-width));
    margin-inline: auto;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin-inline: -0.75rem;
}

.row-3col > .col-3col {
    width: 100%;
    padding-inline: 0.75rem;
}

@media (min-width: 900px) {
    .row-3col > .col-3col {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
}

.col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6,
.col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 {
    width: 100%;
    padding-inline: 0.75rem;
}

@media (min-width: 900px) {
    .col-md-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
    .col-md-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
    .col-md-3 { flex: 0 0 25%; max-width: 25%; }
    .col-md-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .col-md-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
    .col-md-6 { flex: 0 0 50%; max-width: 50%; }
    .col-md-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
    .col-md-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
    .col-md-9 { flex: 0 0 75%; max-width: 75%; }
    .col-md-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
    .col-md-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
    .col-md-12 { flex: 0 0 100%; max-width: 100%; }
}

.text-start   { text-align: left; }
.text-center  { text-align: center; }
.text-end     { text-align: right; }
.text-justify { text-align: justify; }

/* ─── Content Element Alignment (TYPO3 header alignment field) ──────────── */
/* ce-align-* = full content element alignment                               */
.ce-align-left  { text-align: left; }
.ce-align-center { text-align: center; }
.ce-align-right { text-align: right; }

.ce-align-center img,
.ce-align-center figure { margin-inline: auto; }

.ce-align-right img,
.ce-align-right figure { margin-left: auto; }

/* ce-headline-* = header_position field (Ausrichtung in the backend)        */
.ce-headline-left   { text-align: left; }
.ce-headline-center { text-align: center; }
.ce-headline-right  { text-align: right; }

/* ─── Text & Medien / Textpic: Bild-Positionierung ─────────────────────── */
/* fluid_styled_content erzeugt:                                             */
/*   .ce-textpic .ce-{above|below|intext} .ce-{left|center|right}           */
/*   + .ce-nowrap für „kein Textumfluss"                                     */

/* Galerie-Grundstruktur */
.ce-gallery {
    display: block;
}

.ce-gallery .ce-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.ce-gallery .ce-column {
    flex: 1 1 auto;
}

.ce-gallery .ce-column img,
.ce-gallery .ce-column figure {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Zentrierte Galerie: .ce-outer/.ce-inner wrapper */
.ce-gallery .ce-outer {
    display: flex;
    justify-content: center;
}

.ce-gallery .ce-inner {
    display: inline-flex;
    flex-direction: column;
}

/* Bildrand */
.ce-gallery.ce-border .ce-column img {
    border: 2px solid var(--border-color);
    padding: 4px;
    border-radius: var(--radius-sm);
}

/* ── Oben / Unten (above / below) ─────────────────────────────────────── */
/* Galerie steht über oder unter dem Text — Ausrichtung per horizontal-Klasse */

.ce-textpic.ce-above .ce-gallery,
.ce-textpic.ce-below .ce-gallery {
    display: block;
    margin-bottom: var(--space-4);
}

.ce-textpic.ce-below .ce-gallery {
    margin-bottom: 0;
    margin-top: var(--space-4);
}

/* Horizontale Ausrichtung der Galerie */
.ce-textpic.ce-above.ce-left .ce-gallery,
.ce-textpic.ce-below.ce-left .ce-gallery {
    text-align: left;
}

.ce-textpic.ce-above.ce-center .ce-gallery,
.ce-textpic.ce-below.ce-center .ce-gallery {
    text-align: center;
}

.ce-textpic.ce-above.ce-right .ce-gallery,
.ce-textpic.ce-below.ce-right .ce-gallery {
    text-align: right;
}

.ce-textpic.ce-above.ce-right .ce-gallery .ce-row,
.ce-textpic.ce-below.ce-right .ce-gallery .ce-row {
    justify-content: flex-end;
}

/* ── Im Text (intext) mit Textumfluss ─────────────────────────────────── */

.ce-textpic.ce-intext {
    display: block;
}

/* Bild rechts vom Text — float */
.ce-textpic.ce-intext.ce-right .ce-gallery {
    float: right;
    margin: 0 0 var(--space-4) var(--space-5);
    max-width: 50%;
}

/* Bild links vom Text — float */
.ce-textpic.ce-intext.ce-left .ce-gallery {
    float: left;
    margin: 0 var(--space-5) var(--space-4) 0;
    max-width: 50%;
}

/* Clearfix nach dem Textelement */
.ce-textpic.ce-intext::after {
    content: "";
    display: table;
    clear: both;
}

/* ── Im Text ohne Umfluss (nowrap) ────────────────────────────────────── */
/* Bild und Text nebeneinander als flex */

.ce-textpic.ce-intext.ce-nowrap {
    display: flex;
    align-items: flex-start;
    gap: var(--space-5);
}

.ce-textpic.ce-intext.ce-nowrap.ce-right {
    flex-direction: row-reverse;
}

.ce-textpic.ce-intext.ce-nowrap.ce-left {
    flex-direction: row;
}

.ce-textpic.ce-intext.ce-nowrap .ce-gallery {
    flex: 0 0 auto;
    float: none;
    margin: 0;
    max-width: 50%;
}

.ce-textpic.ce-intext.ce-nowrap .ce-bodytext {
    flex: 1 1 auto;
    min-width: 0;
}

/* ── Responsive: ab 768px alle floats aufheben ────────────────────────── */
@media (max-width: 768px) {
    .ce-textpic.ce-intext.ce-right .ce-gallery,
    .ce-textpic.ce-intext.ce-left .ce-gallery {
        float: none;
        max-width: 100%;
        margin: 0 0 var(--space-4) 0;
    }

    .ce-textpic.ce-intext.ce-nowrap {
        flex-direction: column;
    }

    .ce-textpic.ce-intext.ce-nowrap .ce-gallery {
        max-width: 100%;
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-to-main {
    position: absolute;
    left: var(--space-2);
    top: -100px;
    z-index: 9999;
    background: var(--text-dark);
    color: #fff;
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-sm);
}

.skip-to-main:focus {
    top: var(--space-2);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: 0.875rem 1.5rem;
    min-height: 3rem; /* 48px touch target for ages 10-16 */
    border: 1px solid transparent;
    border-radius: 999px;
    font-weight: var(--font-weight-medium, 500);
    line-height: 1.2;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 10%, transparent 70%);
    opacity: 0;
    transform: scale(0);
    transition: opacity 0.4s, transform 0.5s;
    pointer-events: none;
    border-radius: inherit;
}

.btn:active::after {
    opacity: 1;
    transform: scale(2.5);
    transition: opacity 0s, transform 0s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-primary {
    color: #fff;
    background: linear-gradient(120deg, var(--primary-color), #f46d09);
    border-color: transparent;
}

.btn-primary:hover {
    color: #fff;
    background: linear-gradient(120deg, var(--primary-color), #e06008);
}

.btn-secondary {
    color: #fff;
    background: var(--secondary-color);
}

.btn-light {
    color: var(--text-dark);
    background: #fff;
    border-color: rgba(255, 255, 255, 0.7);
}

.btn-light:hover {
    color: var(--text-dark);
    background: var(--bg-light);
}

.btn-outline-light {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.8);
    background: transparent;
}

.btn-outline-light:hover {
    color: var(--text-dark);
    background: #fff;
}

.btn-lg {
    padding: 0.95rem 1.75rem;
}

.form-group {
    margin-bottom: var(--space-4);
}

.form-control {
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: #243B53;
    padding: 0.8rem 0.95rem;
    color: #e2e8f0;
    font-size: 1rem; /* ≥16px prevents iOS Safari auto-zoom on focus */
}

/* Prevent iOS zoom on all form inputs */
input, select, textarea {
    font-size: 1rem;
}

.form-control.error {
    border-color: var(--danger-color);
}

.announcement-bar {
    background: linear-gradient(120deg, var(--primary-color), var(--accent-color));
    color: #fff;
}

.announcement-bar-content {
    min-height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    flex-wrap: wrap;
    padding: 0.45rem 0;
    text-align: center;
}

.announcement-text {
    margin: 0;
    font-size: 0.9rem;
    color: #fff;
}

.announcement-link {
    color: #fff;
    font-weight: var(--font-weight-bold, 600);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.top-bar {
    background: var(--bg-dark);
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.875rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.top-bar-content,
.top-bar-left,
.top-bar-right {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    flex-wrap: wrap;
}

.top-bar-content {
    justify-content: space-between;
    min-height: 2.6rem;
}

.top-bar-content--center {
    justify-content: center;
}

.top-bar-item {
    display: inline-flex;
    gap: var(--space-2);
    align-items: center;
}

.top-bar a {
    color: rgba(255, 255, 255, 0.95);
}

.site-header {
    /* base styles moved to end of file — gradient border */
    position: relative;
    z-index: 1100;
}

.site-header.sticky {
    position: sticky;
    top: 0;
}

.site-header.scrolled {
    box-shadow: var(--shadow-sm);
}

.header-content {
    min-height: 5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-5);
}


.aktuell-container header{
    margin-bottom: var(--space-8);
}

/* ─── Angebote Cards ─────────────────────────────────────────────────────── */
/* display:contents collapses the column wrappers so all 6 .frame cards flow  */
/* directly into the 3-col CSS Grid → Grid equalises row heights automatically */
.angebote-grid {
    gap: 1.25rem;
}

.angebote-grid .container-3col__left,
.angebote-grid .container-3col__center,
.angebote-grid .container-3col__right {
    display: contents;
}

/* Each card = one .frame, now a direct grid item */
.angebote-grid .frame {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 1rem;
    padding: 1.6rem 1.4rem 1.4rem;
    margin: 0;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.angebote-grid .frame:hover {
    background: rgba(255, 255, 255, 0.17);
    transform: translateY(-4px);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.22);
}

/* Left-align the icon badge (tw-icon-*::before is centered by default) */
.angebote-grid .frame::before {
    margin-left: 0;
    margin-right: auto;
    margin-bottom: 0.6rem;
}

/* Card title (header_layout=3 → h3) */
.angebote-grid .frame h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.35rem;
}

/* Card description */
.angebote-grid .frame .ce-bodytext p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.82);
    margin: 0;
    line-height: 1.55;
}


.gold-partner, .silber-partner, .bronze-partner, .supporter {
    border: 4px solid var(--border-color);
    padding: 40px;
    margin: auto;
    border-radius: var(--radius-lg);
    box-shadow: #0000001a 0px 4px 14px, #0000001a 0px 12px 30px, #0000001a 0px 24px 48px;
}

.gold-partner h3,
.silber-partner h3,
.bronze-partner h3,
.supporter h3 {
    text-align: center;
}


.gold-partner .container-2col__right,
.silber-partner .container-2col__right,
.bronze-partner .container-2col__right,
.supporter .container-2col__right {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

/* Each child takes up to 1/3 of the row but never grows beyond that.
   → 1 child  →  centered at ~33% width
   → 2 children → side by side (~33% each), row centered
   → 3+ children → 3 per row, then wraps */
.gold-partner .container-2col__right > .frame,
.silber-partner .container-2col__right > .frame,
.bronze-partner .container-2col__right > .frame,
.supporter .container-2col__right > .frame {
    flex: 0 1 calc(33.333% - 0.667rem);
    min-width: 120px;
}

@media (max-width: 1200px) {
    .gold-partner .container-2col__right > .frame,
    .silber-partner .container-2col__right > .frame,
    .bronze-partner .container-2col__right > .frame,
    .supporter .container-2col__right > .frame {
        flex: 0 1 calc(50% - 0.5rem);
    }
}

@media (max-width: 480px) {
    .gold-partner .container-2col__right > .frame,
    .silber-partner .container-2col__right > .frame,
    .bronze-partner .container-2col__right > .frame,
    .supporter .container-2col__right > .frame {
        flex: 0 1 100%;
    }
}

.site-logo a {
    display: inline-flex;
    align-items: center;
}

.logo-text {
    font-size: clamp(1.2rem, 2.2vw, 1.5rem);
    color: var(--text-dark);
}

.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    min-width: 3rem;  /* 48px touch target */
    min-height: 3rem; /* 48px touch target */
    cursor: pointer;
}

.hamburger {
    display: grid;
    gap: 4px;
}

.hamburger .line {
    width: 22px;
    height: 2px;
    background: var(--text-dark);
}

.theme-toggle {
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid var(--border-color);
    background: #fff;
    color: var(--text-dark);
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    cursor: pointer;
    position: relative;
}

.theme-toggle-icon {
    position: absolute;
    font-size: 1rem;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.theme-toggle-icon--moon {
    opacity: 0;
    transform: scale(0.8);
}

.main-navigation {
    display: flex;
}

.nav-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: block;
    padding: 0.75rem 1rem;
    border-radius: 999px;
    color: #1e293b;
    font-weight: var(--font-weight-medium, 500);
    position: relative;
}

/* Animated underline on nav links */
.main-navigation--desktop .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0.3rem;
    left: 50%;
    width: 0;
    height: 2.5px;
    background: linear-gradient(90deg, var(--primary-color), #f46d09);
    border-radius: 2px;
    transition: width 0.3s ease, left 0.3s ease;
}

.main-navigation--desktop .nav-link:hover::after,
.main-navigation--desktop .nav-item.active > .nav-link::after,
.main-navigation--desktop .nav-item.current > .nav-link::after {
    width: 60%;
    left: 20%;
}

.nav-link:hover,
.nav-item.active > .nav-link,
.nav-item.current > .nav-link {
    color: #304C64;
    background: rgba(0, 0, 0, 0.04);
}

.submenu-toggle {
    display: none;
    border: 0;
    background: transparent;
    color: var(--text-muted, #64748b);
    padding: 0.5rem 0.6rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    line-height: 1;
}

.submenu-toggle:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

.submenu-chevron {
    width: 1rem;
    height: 1rem;
    display: block;
    transition: transform 0.2s ease;
}

.submenu-indicator {
    font-size: 0.75em;
    opacity: 0.6;
    margin-left: 0.3em;
}

.level-1,
.level-2 {
    position: absolute;
    left: 0;
    top: 100%;
    /* Use padding-top to bridge gap and prevent hover loss */
    padding-top: 0.4rem;
    pointer-events: none;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s 0.18s;
    display: flex;
    flex-direction: column;
    min-width: 14rem;
    padding-bottom: 0.4rem;
    padding-left: 0.4rem;
    padding-right: 0.4rem;
    border-radius: var(--radius-md);
    background: #fff;
    box-shadow: var(--shadow-md);
}

/* Inner list (actual card) indented by padding-top, background underneath */
.level-1::before,
.level-2::before {
    content: "";
    position: absolute;
    inset: 0.4rem 0 0;
    background: #fff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    z-index: -1;
}

.level-2 {
    left: calc(100% + 0.2rem);
    top: -0.2rem;
    padding-top: 0;
}

.level-2::before {
    inset: 0;
}

.nav-item.has-children:hover > .level-1,
.level-1 .nav-item.has-children:hover > .level-2 {
    pointer-events: auto;
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s 0s;
}

.level-1 .nav-link,
.level-2 .nav-link {
    border-radius: var(--radius-sm);
}

.hero-section {
    position: relative;
    overflow: hidden;
    padding: clamp(5rem, 12vw, 10rem) 0 clamp(4rem, 8vw, 7rem);
    color: #fff;
    background:
        radial-gradient(ellipse at 20% 80%, rgba(244, 109, 9, 0.25), transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(13, 148, 136, 0.2), transparent 50%),
        radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.12), transparent 40%),
        linear-gradient(135deg, var(--primary-color), #f46d09 40%, var(--accent-color) 100%);
}

/* Floating decorative shapes */
.hero-section::before,
.hero-section::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    opacity: 0.12;
    pointer-events: none;
}

.hero-section::before {
    width: 30vw;
    height: 30vw;
    top: -8vw;
    right: -5vw;
    background: var(--accent-color);
    animation: heroFloat 8s ease-in-out infinite;
}

.hero-section::after {
    width: 22vw;
    height: 22vw;
    bottom: -6vw;
    left: -4vw;
    background: #fff;
    animation: heroFloat 10s ease-in-out infinite reverse;
}

@keyframes heroFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(6deg); }
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-text {
    text-align: center;
}

.hero-title,
.hero-subtitle {
    color: #fff;
}

.hero-title {
    font-size: clamp(2.8rem, 7vw, 5rem);
    letter-spacing: -0.04em;
    line-height: 1.05;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

.hero-subtitle {
    max-width: 55ch;
    margin-inline: auto;
    opacity: 0.94;
    font-size: clamp(1.1rem, 2.5vw, 1.45rem);
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.1);
}

.hero-actions {
    margin-top: var(--space-5);
    display: flex;
    justify-content: center;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.homepage-content,
.page-content {
    padding: clamp(2rem, 5vw, 4rem) 0;
}

/* ─── Content Element Frames ─────────────────────────────────────────────── */
/* TYPO3 outputs: class="frame frame-{value} frame-type-* frame-layout-*"     */

.frame-card {
    background: var(--background-color-5);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: clamp(1rem, 2.5vw, 1.5rem);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.frame-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.frame-muted {
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    padding: clamp(1rem, 2.5vw, 1.5rem);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.frame-muted:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.frame-highlight {
    border-left: 4px solid var(--primary-color);
    padding-left: clamp(0.9rem, 2vw, 1.2rem);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.frame-highlight:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.frame-glass {
    background: color-mix(in srgb, var(--secondary-color) 8%, transparent);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid color-mix(in srgb, var(--secondary-color) 25%, transparent);
    border-radius: var(--radius-lg);
    padding: clamp(1rem, 2.5vw, 1.5rem);
    box-shadow: 0 4px 24px color-mix(in srgb, var(--secondary-color) 10%, transparent), inset 0 1px 0 rgba(255,255,255,0.6);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.frame-glass:hover {
    box-shadow: 0 8px 32px color-mix(in srgb, var(--secondary-color) 18%, transparent), inset 0 1px 0 rgba(255,255,255,0.6);
    transform: translateY(-2px);
}

/* Full-bleed background: breaks out of the content container to span 100vw */
.frame-bg-grey,
.frame-bg-primary,
.frame-bg-secondary,
.frame-bg-color-2,
.frame-bg-color-3,
.frame-bg-color-4,
.frame-bg-color-5 {
    /* Break out of any max-width container to reach full viewport width */
    margin-inline: calc(50% - 50vw);
    padding-inline: calc(50vw - 50%);
    padding-block: clamp(1.5rem, 3vw, 2.5rem);
}

/* ─── Hintergrundfarben: Kontrast-Tokens ─────────────────────────────────────
   Jede Hintergrundklasse definiert 4 Variablen — ein einziger generischer Block
   weiter unten konsumiert sie (keine Wiederholung pro Klasse nötig).

   HELL  → dunkle Schrift  |  DUNKEL → helle Schrift

   Um eine neue Hintergrundklasse hinzuzufügen:
   Einfach 4 Variablen definieren, der Rest funktioniert automatisch.
   ─────────────────────────────────────────────────────────────────────────── */

/* DUNKLE Hintergründe → helle Schrift */
.frame-bg-primary {
    background-color: var(--primary-color);
    --on-bg: #f0f9ff;  --on-bg-h: #fff;
    --on-bg-a: rgba(255,255,255,0.85); --on-bg-a-hv: #fff;
}
.frame-bg-secondary {
    background-color: var(--secondary-color);
    --on-bg: #f0f9ff;  --on-bg-h: #fff;
    --on-bg-a: rgba(255,255,255,0.85); --on-bg-a-hv: #fff;
}
/* Farben 2, 3, 5 sind dunkle Töne (#26788E, #788EBA, #243B53) → helle Schrift */
.frame-bg-color-2 {
    background-color: var(--background-color-2);
    --on-bg: #f0f9ff;  --on-bg-h: #fff;
    --on-bg-a: rgba(255,255,255,0.85); --on-bg-a-hv: #fff;
}
.frame-bg-color-3 {
    background-color: var(--background-color-3);
    --on-bg: #f0f9ff;  --on-bg-h: #fff;
    --on-bg-a: rgba(255,255,255,0.85); --on-bg-a-hv: #fff;
}
.frame-bg-color-5 {
    background-color: var(--background-color-5);
    --on-bg: #e2e8f0;  --on-bg-h: #f1f5f9;
    --on-bg-a: #93c5fd; --on-bg-a-hv: #bfdbfe;
}

/* HELLE Hintergründe → dunkle Schrift */
.frame-bg-grey {
    background-color: #e8e8e8;
    --on-bg: #1e293b;  --on-bg-h: #304C64;
    --on-bg-a: #304C64; --on-bg-a-hv: #f46d09;
}
/* Farbe 4 ist hell (#FDF6EE Cremeton) → dunkle Schrift */
.frame-bg-color-4 {
    background-color: var(--background-color-4);
    --on-bg: #1e293b;  --on-bg-h: #304C64;
    --on-bg-a: #304C64; --on-bg-a-hv: #f46d09;
}

/* ── Generischer Konsumentenblock: Schrift, Überschriften, Links ── */
[class*="frame-bg-"] {
    color: var(--on-bg, inherit);
}
[class*="frame-bg-"] h1, [class*="frame-bg-"] h2, [class*="frame-bg-"] h3,
[class*="frame-bg-"] h4, [class*="frame-bg-"] h5, [class*="frame-bg-"] h6 {
    color: var(--on-bg-h, inherit);
}
[class*="frame-bg-"] p,
[class*="frame-bg-"] li,
[class*="frame-bg-"] td,
[class*="frame-bg-"] th {
    color: var(--on-bg, inherit);
}
[class*="frame-bg-"] a {
    color: var(--on-bg-a, inherit);
}
[class*="frame-bg-"] a:hover,
[class*="frame-bg-"] a:focus-visible {
    color: var(--on-bg-a-hv, inherit);
}
[class*="frame-bg-"] table {
    border-color: color-mix(in srgb, var(--on-bg, #000) 15%, transparent);
}
[class*="frame-bg-"] td {
    border-color: color-mix(in srgb, var(--on-bg, #000) 10%, transparent);
}

/* ─── Space Before / After ───────────────────────────────────────────────── */
/* TYPO3 outputs frame-space-before-* / frame-space-after-* classes          */

.frame-space-before-none  { margin-top: 0 !important; }
.frame-space-before-extra-small { margin-top: 0.5rem; }
.frame-space-before-small { margin-top: 1rem; }
.frame-space-before-medium { margin-top: 2.5rem; }
.frame-space-before-large { margin-top: 4rem; }
.frame-space-before-extra-large { margin-top: 6rem; }

.frame-space-after-none   { margin-bottom: 0 !important; }
.frame-space-after-extra-small { margin-bottom: 0.5rem; }
.frame-space-after-small  { margin-bottom: 1rem; }
.frame-space-after-medium { margin-bottom: 2.5rem; }
.frame-space-after-large  { margin-bottom: 4rem; }
.frame-space-after-extra-large { margin-bottom: 6rem; }

/*
 * Background frames: swap margin → padding so the background colour
 * covers the spacing gap instead of showing the page background.
 */
[class*="frame-bg-"].frame-space-before-extra-small { margin-top: 0; padding-top: 0.5rem; }
[class*="frame-bg-"].frame-space-before-small       { margin-top: 0; padding-top: 1rem; }
[class*="frame-bg-"].frame-space-before-medium      { margin-top: 0; padding-top: 2.5rem; }
[class*="frame-bg-"].frame-space-before-large       { margin-top: 0; padding-top: 4rem; }
[class*="frame-bg-"].frame-space-before-extra-large { margin-top: 0; padding-top: 6rem; }

[class*="frame-bg-"].frame-space-after-extra-small  { margin-bottom: 0; padding-bottom: 0.5rem; }
[class*="frame-bg-"].frame-space-after-small        { margin-bottom: 0; padding-bottom: 1rem; }
[class*="frame-bg-"].frame-space-after-medium       { margin-bottom: 0; padding-bottom: 2.5rem; }
[class*="frame-bg-"].frame-space-after-large        { margin-bottom: 0; padding-bottom: 4rem; }
[class*="frame-bg-"].frame-space-after-extra-large  { margin-bottom: 0; padding-bottom: 6rem; }

/* ─── Content Element Layouts ───────────────────────────────────────────── */
/* TYPO3 layout field: numeric values, output as frame-layout-{n}             */

.frame-layout-20 .ce-bodytext {
    column-count: 2;
    column-gap: 1.7rem;
}

.frame-layout-30 .ce-bodytext {
    column-count: 3;
    column-gap: 1.5rem;
}

.frame-layout-40 .ce-bodytext {
    max-width: 65ch;
}

/* ─── Responsive Tables ──────────────────────────────────────────────────── */
.ce-bodytext table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}

.ce-bodytext td,
.ce-bodytext th {
    word-break: break-word;
}

.frame-layout-50 {
    width: min(100%, 1200px);
}



.ce-bodytext {
    max-width: 75ch; /* optimal reading line length */
}

.ce-textpic .ce-bodytext,
.frame-layout-20 .ce-bodytext,
.frame-layout-30 .ce-bodytext {
    max-width: none; /* no limit inside columns/float layouts */
}

.ce-bodytext p,
.ce-bodytext li {
    break-inside: avoid;
}

/* ─── Content Element Headers ───────────────────────────────────────────── */
.frame header {
    margin-bottom: var(--space-3);
}

.frame header h1,
.frame header h2,
.frame header h3,
.frame header h4,
.frame header h5,
.frame header h6 {
    margin: 0;
}

.frame header p {
    margin: var(--space-2) 0 0;
    color: var(--text-light);
}

/* ─── Accordion ─────────────────────────────────────────────────────────── */
/* Consecutive .frame-accordion elements are grouped by JS into a wrapper.    */

.accordion-group {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: var(--space-5);
}

.accordion-group .frame-accordion {
    border-top: 1px solid var(--border-color);
}

.accordion-group .frame-accordion:first-child {
    border-top: none;
}

.accordion-trigger {
    width: 100%;
    border: 0;
    background: transparent;
    color: #e2e8f0;
    text-align: left;
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: var(--font-weight-medium, 500);
    font-size: 1rem;
    font-family: inherit;
    gap: var(--space-4);
}

.accordion-trigger:hover {
    background: var(--bg-light);
}

.accordion-chevron {
    width: 1.1rem;
    height: 1.1rem;
    flex-shrink: 0;
    transition: transform 0.2s ease;
    color: var(--text-muted, #64748b);
}

.frame-accordion.is-open .accordion-chevron {
    transform: rotate(180deg);
}

.accordion-body {
    padding: 0 1.25rem 1.1rem;
    display: none;
}

.frame-accordion.is-open .accordion-body {
    display: block;
}

.page-title {
    padding: var(--space-7) 0;
    color: #ffffff !important;
}

.page-title {
    margin-bottom: var(--space-2);
}

.page-subtitle {
    color: var(--text-light);
    margin: 0;
}

.breadcrumb {
    margin: var(--space-3) 0 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "/";
    margin-right: 0.35rem;
}

.features-section {
    padding: clamp(3rem, 7vw, 5rem) 0;
    background: var(--bg-light);
}

.section-header {
    margin-bottom: var(--space-7);
}

.section-subtitle {
    color: var(--text-light);
}

.features-grid {
    row-gap: 1.5rem;
}

.feature-card {
    height: 100%;
    background: #243B53;
    border: 1px solid #2a4158;
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
    color: #e2e8f0;
}

.feature-title {
    color: #ffffff;
}

.feature-description {
    color: #cbd5e1;
}

.feature-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

/* feature-icon moved to end of file */

/* CTA section moved to end of file */\n\n.cta-title,
.cta-text {
    color: #fff;
}

.cta-box,
.contact-form-wrapper,
.contact-info-wrapper,
.sidebar-widget,
.service-features {
    background: #243B53;
    border: 1px solid #2a4158;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    color: #e2e8f0;
}

.contact-form-wrapper,
.contact-info-wrapper,
.service-features,
.cta-box {
    padding: clamp(1.35rem, 3vw, 2rem);
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
    margin-bottom: var(--space-5);
}

.contact-icon {
    width: 2.7rem;
    height: 2.7rem;
    border-radius: 0.8rem;
    display: inline-grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(120deg, var(--primary-color), var(--accent-color));
}

.sidebar-widget {
    padding: var(--space-5);
    margin-bottom: var(--space-5);
}

.widget-title {
    margin-bottom: var(--space-4);
    font-size: 1.15rem;
}

.category-list,
.recent-posts,
.footer-nav {
    list-style: none;
    margin: 0;
    padding: 0;
}

.category-list li,
.recent-posts li {
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border-color);
}

.search-form .input-group {
    display: flex;
    gap: 0;
}

.search-form .form-control {
    border-right: 0;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.search-form .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.social-links {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.social-link {
    width: 2.35rem;
    height: 2.35rem;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: var(--primary-color);
}

.social-link:hover {
    color: #fff;
    transform: translateY(-2px);
    background: var(--accent-color);
}

.top-bar .social-link {
    width: 2rem;
    height: 2rem;
    background: rgba(255, 255, 255, 0.14);
}



/* Old footer-main/footer-bottom/copyright — now at end of file */

.footer-columns {
    display: grid;
    gap: var(--space-6);
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.footer-heading {
    /* color set by new footer styles at end of file */
    margin-bottom: var(--space-4);
    font-size: 1.1rem;
}

.footer-nav li {
    margin-bottom: var(--space-2);
}

.footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-links li {
    margin-bottom: var(--space-2);
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.15s;
}

.footer-links a:hover {
    color: #fff;
    text-decoration: underline;
}

.footer-address {
    font-style: normal;
}

/* Old footer-bottom moved to end of file */

.footer-bottom-content {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

/* Old copyright moved to end of file */

.footer-legal-nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
}

/* .site-footer base styles at end of file */

.back-to-top {
    position: fixed;
    right: 1.2rem;
    bottom: 1.2rem;
    z-index: 900;
    width: 2.9rem;
    height: 2.9rem;
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(120deg, var(--primary-color), var(--accent-color));
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    color: #fff;
    transform: translateY(-2px);
}

.back-to-top svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* Old dark mode block — replaced by neon dark mode at end of file */

/* Desktop nav: inside header flex layout */
.main-navigation--desktop {
    display: flex;
}

/* Mobile nav: hidden drawer outside the header */
.main-navigation--mobile {
    display: none;
}

/* Desktop: hide mobile-only elements */
.nav-mobile-header {
    display: none;
}

.theme-toggle--mobile {
    display: none;
}

@media (max-width: 991px) {
    .mobile-menu-toggle {
        display: inline-flex;
    }

    /* Hide desktop theme toggle on mobile — it lives in the burger instead */
    .theme-toggle--desktop {
        display: none;
    }

    /* Hide desktop nav on mobile */
    .main-navigation--desktop {
        display: none;
    }

    /* Show mobile drawer */
    .main-navigation--mobile {
        position: fixed;
        inset: var(--header-height) 0 0 auto;
        width: min(90vw, 22rem);
        padding: 0;
        background: #fff;
        box-shadow: var(--shadow-lg);
        transform: translateX(100%);
        transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
        overflow: hidden;
        display: flex;
        flex-direction: column;
        z-index: 9999;
    }

    .main-navigation--mobile.active {
        transform: translateX(0);
    }

    /* Overlay backdrop */
    .nav-overlay {
        position: fixed;
        inset: var(--header-height) 0 0 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 1089;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.28s ease;
    }

    .nav-overlay.active {
        opacity: 1;
        pointer-events: auto;
    }

    /* Mobile header row inside burger — sticky, never scrolls away */
    .nav-mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: var(--space-4) var(--space-5);
        border-bottom: 1px solid var(--border-color);
        min-height: 3.5rem;
        flex-shrink: 0; /* never compress */
    }

    .nav-mobile-title {
        font-weight: var(--font-weight-bold, 700);
        font-size: 1.1rem;
        color: var(--text-dark);
    }

    .theme-toggle--mobile {
        display: inline-grid;
        width: 2.5rem;
        height: 2.5rem;
        border: 1px solid var(--border-color);
        background: #fff;
        color: var(--text-dark);
        border-radius: 999px;
        place-items: center;
        cursor: pointer;
        position: relative;
    }

    /* Nav list takes remaining height and scrolls independently */
    .nav-list {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: var(--space-3) var(--space-4) calc(var(--space-6) + env(safe-area-inset-bottom, 0px));
        flex: 1 1 auto;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .nav-item {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-item:last-child {
        border-bottom: 0;
    }

    .nav-link {
        flex: 1 1 auto;
        padding: 0.9rem 0.5rem;
        border-radius: 0;
    }

    /* Hide the inline indicator inside the link on mobile — the toggle button is enough */
    .nav-link .submenu-indicator {
        display: none;
    }

    .submenu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 3rem;
        height: 3rem;
        margin-left: auto;
        flex-shrink: 0;
        border-radius: var(--radius-sm);
        color: var(--text-muted, #64748b);
    }

    .submenu-toggle:hover,
    .submenu-toggle:focus-visible {
        background: var(--bg-light);
        color: var(--primary-color);
    }

    .submenu-chevron {
        width: 1.25rem;
        height: 1.25rem;
    }

    /* Rotate chevron when submenu is open */
    .nav-item.has-children.open > .submenu-toggle .submenu-chevron {
        transform: rotate(180deg);
    }

    .level-1,
    .level-2 {
        position: static;
        width: 100%;
        min-width: 0;
        box-shadow: none;
        border: 0;
        border-top: 1px solid var(--border-color);
        border-radius: 0;
        padding: 0 0 0 1rem;
        background: var(--bg-light);
        /* reset desktop visibility/opacity approach */
        visibility: visible;
        opacity: 1;
        transform: none;
        pointer-events: auto;
        transition: none;
        /* hidden by default, shown when .open */
        display: none;
        flex-direction: column;
    }

    .level-1::before,
    .level-2::before {
        display: none;
    }

    .level-1 .nav-item,
    .level-2 .nav-item {
        border-bottom: 1px solid var(--border-color);
    }

    .level-1 .nav-item:last-child,
    .level-2 .nav-item:last-child {
        border-bottom: 0;
    }

    .nav-item.has-children:hover > .level-1,
    .level-1 .nav-item.has-children:hover > .level-2,
    .nav-item.has-children.open > .level-1,
    .level-1 .nav-item.has-children.open > .level-2 {
        display: flex;
        visibility: visible;
        opacity: 1;
        transform: none;
    }

    .top-bar-content {
        padding: 0.45rem 0;
    }

    .announcement-bar-content {
        gap: var(--space-2);
        padding: 0.5rem 0;
    }
}

@media (max-width: 768px) {
    .text-end,
    .ce-headline-right {
        text-align: left;
    }

    .frame-layout-20 .ce-bodytext,
    .frame-layout-30 .ce-bodytext {
        column-count: 1;
    }

    .header-content {
        min-height: 3.5rem;
    }

    .hero-section {
        padding: clamp(4rem, 10vw, 10rem) 0 clamp(2.5rem, 6vw, 7rem);
    }

    .hero-actions {
        align-items: stretch;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .footer-bottom-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .back-to-top {
        right: 0.8rem;
        bottom: calc(0.8rem + env(safe-area-inset-bottom, 0px));
    }
}

@media (max-width: 480px) {
    .container {
        width: min(100% - 2rem, var(--container-width));
    }
}

@media print {
    .top-bar,
    .site-header,
    .site-footer,
    .back-to-top,
    .mobile-menu-toggle {
        display: none;
    }

    body {
        color: #000;
        background: #fff;
    }
}

/* ===========================================
   CONTAINER ELEMENTS (b13/container)
   =========================================== */

.container-2col,
.container-3col,
.container-4col {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}

/* Force all grid children (column wrappers) to respect their track size */
.container-2col > div,
.container-3col > div,
.container-4col > div {
    min-width: 0;
}

.container-2col--50-50 {
    grid-template-columns: 1fr 1fr;
}

.container-2col--33-67 {
    grid-template-columns: 1fr 2fr;
}

.container-2col--67-33 {
    grid-template-columns: 2fr 1fr;
}

.container-3col {
    grid-template-columns: 1fr 1fr 1fr;
}

.container-4col {
    grid-template-columns: 1fr 1fr 1fr 1fr;
}

@media (max-width: 768px) {
    .container-2col,
    .container-3col,
    .container-4col {
        grid-template-columns: 1fr;
    }
}

/* ─── Container Headers ──────────────────────────────────────────────────── */
.container-2col > header,
.container-3col > header,
.container-4col > header,
.container-2col-left > header,
.container-2col-right > header {
    grid-column: 1 / -1;
    margin-bottom: var(--space-4);
}

/* ─── Image Border Radius ────────────────────────────────────────────────── */
.img-radius-sm img,
.img-radius-sm .ce-gallery figure {
    border-radius: 0.375rem;
    overflow: hidden;
}

.img-radius-md img,
.img-radius-md .ce-gallery figure {
    border-radius: 0.75rem;
    overflow: hidden;
}

.img-radius-lg img,
.img-radius-lg .ce-gallery figure {
    border-radius: 1.25rem;
    overflow: hidden;
}

.img-radius-xl img,
.img-radius-xl .ce-gallery figure {
    border-radius: 2rem;
    overflow: hidden;
}

.img-radius-full img,
.img-radius-full .ce-gallery figure {
    border-radius: 50%;
    overflow: hidden;
}

.container-2col > header h1,
.container-3col > header h1,
.container-4col > header h1,
.container-2col-left > header h1,
.container-2col-right > header h1 {
    margin-bottom: var(--space-2);
}

.container-2col > header .subheader,
.container-3col > header .subheader,
.container-4col > header .subheader,
.container-2col-left > header .subheader,
.container-2col-right > header .subheader {
    color: var(--text-light);
    font-size: 1.05rem;
    line-height: 1.5;
}

/* ─── Newsletter Signup ──────────────────────────────────────────────────── */
.newsletter-signup {
    container-type: inline-size;
    display: flex;
    justify-content: center;
}

.newsletter-signup__card {
    background: var(--background-color-5, #243B53);
    border: 1px solid var(--border-color, #2a4158);
    color: #fff;
    border-radius: var(--radius-xl);
    padding: var(--space-7) var(--space-6);
    box-shadow: var(--shadow-lg);
    max-width: 600px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-4);
    /* Override parent frame tokens: card is dark → always light text */
    --on-bg:    rgba(255, 255, 255, 0.9);
    --on-bg-h:  #fff;
    --on-bg-a:  rgba(255, 255, 255, 0.8);
    --on-bg-a-hv: #fff;
}

.newsletter-signup__icon {
    font-size: 2.5rem;
    line-height: 1;
}

.newsletter-signup__title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}

.newsletter-signup__desc {
    margin: 0;
    opacity: 0.9;
    font-size: 1rem;
    line-height: 1.5;
}

.newsletter-signup__row {
    display: flex;
    gap: var(--space-2);
}

.newsletter-signup__input {
    flex: 1;
    padding: 0.65rem 1rem;
    border: 2px solid rgba(255,255,255,0.5);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    background: rgba(255,255,255,0.15);
    color: #fff;
    min-width: 0;
}

.newsletter-signup__input::placeholder {
    color: rgba(255,255,255,0.65);
}

.newsletter-signup__input:focus {
    outline: none;
    border-color: #fff;
    background: rgba(255,255,255,0.25);
}

.newsletter-signup__button {
    padding: 0.75rem 1.4rem;
    min-height: 3rem; /* 48px touch target */
    background: #fff;
    color: var(--primary-color);
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.15s;
}

.newsletter-signup__button:hover {
    opacity: 0.88;
}

.newsletter-signup__error {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.5);
    padding: 0.6rem 0.9rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
}

.newsletter-signup__card--success {
    background: linear-gradient(135deg, #1a7f4f 0%, #22a060 100%);
}

/* Narrow container: stack input + button */
@container (max-width: 420px) {
    .newsletter-signup__row {
        flex-direction: column;
    }
    .newsletter-signup__button {
        width: 100%;
    }
}

/* ─── Zielgruppen-Container: fixed height for all content elements ───────── */
.zielgruppen-container .frame {
    height: 650px;
    overflow: hidden;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

.zielgruppen-container .image {
    margin: 0;
}
.zielgruppen-container .container-2col,
.zielgruppen-container .container-3col,
.zielgruppen-container .container-4col {
    gap: 1rem;
}

#c22 > header {
    margin-bottom: var(--space-7);
}

#c22 h3 {
    padding-top: 15px;
    font-size: 22px !important;
    max-width: 700px;
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400 !important;
}

#c66{
    margin-top: var(--space-7);
}

#c60 h2{
    color: #ffffff;
}

@media (max-width: 991px) {
    .zielgruppen-container .frame {
        height: auto;
        min-height: 280px;
    }
}

@media (max-width: 768px) {
    .zielgruppen-container .frame {
        height: auto;
        min-height: 180px;
    }
}

/* sr-only for accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* ============================================================
   CONTAINER SLIDER
   ============================================================ */
.container-slider {
    position: relative;
    width: 100%;
}

.container-slider h2{
    display: none;
}

/* CSS Grid stacking: all slides occupy the same cell, no JS height needed */
.container-slider__track {
    display: grid;
    grid-template-columns: 1fr;
}

.container-slider__slide {
    grid-column: 1;
    grid-row: 1;
    opacity: 0;
    transform: translateY(12px) scale(0.98);
    transition: opacity 0.55s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.container-slider__slide.is-active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
    transition-delay: 0.05s;
}

/* Swipe: suppress CSS transition during drag so translateX feels instant */
.container-slider__track.is-dragging .container-slider__slide {
    transition: none !important;
}

.container-slider__nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-4, 1rem);
    margin-top: var(--space-5, 1.5rem);
    padding: 0 var(--space-3);
}

.container-slider__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border: 2px solid var(--primary-color, #333);
    border-radius: 50%;
    background: transparent;
    color: var(--primary-color, #333);
    cursor: pointer;
    transition: background 0.2s, color 0.2s, transform 0.15s;
    flex-shrink: 0;
}

.container-slider__btn:hover,
.container-slider__btn:focus-visible {
    background: var(--primary-color, #333);
    color: #fff;
    outline: none;
}

.container-slider__btn:active {
    transform: scale(0.92);
}

.container-slider__btn svg {
    width: 1.25rem;
    height: 1.25rem;
}

.container-slider__dots {
    display: flex;
    gap: 0.6rem;
    align-items: center;
}

/* Dot: modern filled circle, pill when active, with progress sweep */
.container-slider__dot {
    position: relative;
    overflow: visible;
    width: 0.65rem;
    height: 0.65rem;
    border-radius: 50%;
    border: none;
    background: var(--primary-color, #333);
    opacity: 0.25;
    cursor: pointer;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: opacity 0.3s, width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), border-radius 0.35s ease;
}

.container-slider__dot:hover {
    opacity: 0.55;
}

/* Invisible touch target: 44px minimum for mobile */
.container-slider__dot::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 44px;
    height: 44px;
    transform: translate(-50%, -50%);
}

.container-slider__dot.is-active {
    opacity: 1;
    width: 2.2rem;
    border-radius: 0.35rem;
}

/* Progress sweep on the active dot */
.container-slider__dot.is-active::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: rgba(255, 255, 255, 0.4);
    transform-origin: left;
    transform: scaleX(0);
    animation: dot-progress 4.5s linear forwards;
}

/* Pause the progress animation when the slider is hovered/touched */
.container-slider.is-paused .container-slider__dot.is-active::after {
    animation-play-state: paused;
}

@keyframes dot-progress {
    to { transform: scaleX(1); }
}

/* ============================================================
   SCROLL ANIMATION EFFECTS (Erscheinungseffekte)
   Optimiert nach AOS/ScrollReveal Best Practices:
   - Längere Dauern (800-2000ms) für elegantere Animationen
   - Sanftere Easing-Kurve (ease-out-cubic)
   - Dezentere Offsets für subtilere Bewegung
   ============================================================ */

/* Basis-Übergang für alle Effekte */
.scroll-effects-ready .scroll-effect {
    --scroll-effect-duration: 1s;
    --scroll-effect-delay: 0s;
    transition-property: opacity, transform;
    transition-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94); /* ease-out-quad */
    transition-duration: var(--scroll-effect-duration);
    transition-delay: var(--scroll-effect-delay);
    will-change: opacity, transform;
}

/* Dauern: optimiert für natürliches Gefühl (800-2500ms Bereich) */
.scroll-effects-ready .scroll-effect-duration--short {
    --scroll-effect-duration: 0.8s;
}

.scroll-effects-ready .scroll-effect-duration--normal {
    --scroll-effect-duration: 1.2s;
}

.scroll-effects-ready .scroll-effect-duration--long {
    --scroll-effect-duration: 1.8s;
}

.scroll-effects-ready .scroll-effect-duration--slow {
    --scroll-effect-duration: 2.5s;
}

/* Verzögerungen: leicht erhöht für bessere Staffelung */
.scroll-effects-ready .scroll-effect-delay--none {
    --scroll-effect-delay: 0s;
}

.scroll-effects-ready .scroll-effect-delay--short {
    --scroll-effect-delay: 0.2s;
}

.scroll-effects-ready .scroll-effect-delay--medium {
    --scroll-effect-delay: 0.4s;
}

.scroll-effects-ready .scroll-effect-delay--long {
    --scroll-effect-delay: 0.6s;
}

.scroll-effects-ready .scroll-effect-delay--xlong {
    --scroll-effect-delay: 0.9s;
}

/* --- Initiale versteckte Zustände (dezentere Offsets) --- */

.scroll-effects-ready .scroll-effect--fade-in:not(.scroll-effect--visible) {
    opacity: 0;
}

.scroll-effects-ready .scroll-effect--fade-up:not(.scroll-effect--visible) {
    opacity: 0;
    transform: translateY(30px);
}

.scroll-effects-ready .scroll-effect--fade-down:not(.scroll-effect--visible) {
    opacity: 0;
    transform: translateY(-30px);
}

.scroll-effects-ready .scroll-effect--fade-left:not(.scroll-effect--visible) {
    opacity: 0;
    transform: translateX(-40px);
}

.scroll-effects-ready .scroll-effect--fade-right:not(.scroll-effect--visible) {
    opacity: 0;
    transform: translateX(40px);
}

.scroll-effects-ready .scroll-effect--zoom-in:not(.scroll-effect--visible) {
    opacity: 0;
    transform: scale(0.88);
}

.scroll-effects-ready .scroll-effect--zoom-out:not(.scroll-effect--visible) {
    opacity: 0;
    transform: scale(1.1);
}

.scroll-effects-ready .scroll-effect--bounce-in:not(.scroll-effect--visible) {
    opacity: 0;
    transform: scale(0.85);
    transition: none; /* Bounce nutzt @keyframes statt transition */
}

.scroll-effects-ready .scroll-effect--flip-up:not(.scroll-effect--visible) {
    opacity: 0;
    transform: perspective(800px) rotateX(18deg) translateY(20px);
}

.scroll-effects-ready .scroll-effect--roll-in:not(.scroll-effect--visible) {
    opacity: 0;
    transform: rotate(-10deg) translateX(-50px);
}

/* --- Sichtbarer Endzustand --- */

.scroll-effects-ready .scroll-effect.scroll-effect--visible {
    opacity: 1;
    transform: none;
}

/* Bounce-In: subtilere Keyframe-Animation */
.scroll-effects-ready .scroll-effect--bounce-in.scroll-effect--visible {
    animation: scrollFxBounceIn var(--scroll-effect-duration) cubic-bezier(0.34, 1.56, 0.64, 1) both;
    animation-delay: var(--scroll-effect-delay);
}

@keyframes scrollFxBounceIn {
    0%   { opacity: 0; transform: scale(0.85); }
    50%  { opacity: 1; transform: scale(1.04); }
    70%  { transform: scale(0.98); }
    100% { opacity: 1; transform: scale(1); }
}

/* Barrierefreiheit: Animationen deaktivieren wenn Nutzer es bevorzugt */
@media (prefers-reduced-motion: reduce) {
    .scroll-effects-ready .scroll-effect {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
        animation: none !important;
    }
    .hero-section::before,
    .hero-section::after {
        animation: none !important;
    }
    .hero-word-rotate span {
        animation: none !important;
    }
}

/* ============================================================
   TÜFTELWELT — JUGENDLICHES DESIGN-SYSTEM
   Ergänzungen für Zielgruppe 10-16 Jahre
   ============================================================ */

/* ─── Text Utility-Klassen ──────────────────────────────────────────────── */

.text-gradient {
    background: linear-gradient(135deg, #598EBB, #f46d09);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-highlight {
    position: relative;
    display: inline;
}

.text-highlight::after {
    content: '';
    position: absolute;
    left: -0.1em;
    right: -0.1em;
    bottom: 0;
    height: 35%;
    background: linear-gradient(90deg, rgba(244, 109, 9, 0.3), rgba(244, 109, 9, 0.15));
    border-radius: 3px;
    z-index: -1;
}

.text-wiggle {
    display: inline-block;
    animation: textWiggle 2.5s ease-in-out infinite;
}

@keyframes textWiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-2deg); }
    75% { transform: rotate(2deg); }
}

/* ─── Hero Word Rotation ────────────────────────────────────────────────── */

.hero-word-rotate {
    display: inline-block;
    position: relative;
    min-width: 5ch;
    vertical-align: bottom;
}

.hero-word-rotate span {
    display: inline-block;
    position: absolute;
    left: 0;
    opacity: 0;
    transform: translateY(30px);
    animation: wordRotate 9s ease-in-out infinite;
    white-space: nowrap;
}

.hero-word-rotate span:nth-child(1) { animation-delay: 0s; }
.hero-word-rotate span:nth-child(2) { animation-delay: 3s; }
.hero-word-rotate span:nth-child(3) { animation-delay: 6s; }

@keyframes wordRotate {
    0%, 2%   { opacity: 0; transform: translateY(30px); }
    6%, 30%  { opacity: 1; transform: translateY(0); }
    34%, 100%{ opacity: 0; transform: translateY(-30px); }
}

/* ─── Scroll-Down Indicator ─────────────────────────────────────────────── */

.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-top: var(--space-7);
    opacity: 0.7;
    cursor: pointer;
}

.scroll-indicator__mouse {
    width: 24px;
    height: 38px;
    border: 2px solid rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    position: relative;
}

.scroll-indicator__mouse::after {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    width: 4px;
    height: 8px;
    margin-left: -2px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 2px;
    animation: scrollBounce 1.8s ease-in-out infinite;
}

.scroll-indicator__text {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgba(255, 255, 255, 0.7);
}

@keyframes scrollBounce {
    0%, 100% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(10px); opacity: 0.3; }
}

/* ─── Scroll Progress Bar ───────────────────────────────────────────────── */

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), #f46d09);
    z-index: 9999;
    transition: width 0.1s linear;
    pointer-events: none;
}

/* ─── Section Wave Dividers ─────────────────────────────────────────────── */

.wave-divider {
    display: block;
    width: 100%;
    height: auto;
    line-height: 0;
    margin: -1px 0;
}

.wave-divider--top {
    transform: rotate(180deg);
}

.wave-divider svg {
    width: 100%;
    height: auto;
    display: block;
}

/* Generic Section Divider via CSS (no SVG needed) */
.section-wave-top::before {
    content: '';
    display: block;
    width: 100%;
    height: clamp(2rem, 4vw, 4rem);
    background: var(--bg-color, #fffbf5);
    clip-path: ellipse(55% 100% at 50% 100%);
    margin-bottom: -1px;
}

.section-wave-bottom::after {
    content: '';
    display: block;
    width: 100%;
    height: clamp(2rem, 4vw, 4rem);
    background: var(--bg-color, #fffbf5);
    clip-path: ellipse(55% 100% at 50% 0%);
    margin-top: -1px;
}

/* ─── Badge System ──────────────────────────────────────────────────────── */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3em;
    padding: 0.25em 0.7em;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.4;
    white-space: nowrap;
}

.badge-hot {
    background: linear-gradient(135deg, #ff6b35, #f97316);
    color: #fff;
}

.badge-new {
    background: linear-gradient(135deg, #0d9488, #14b8a6);
    color: #fff;
}

.badge-beginner {
    background: linear-gradient(135deg, #eab308, #facc15);
    color: #1e293b;
}

.badge-advanced {
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    color: #fff;
}

/* ─── Fun Feature Cards (Maker-Thema) ───────────────────────────────────── */

.feature-icon {
    display: inline-grid;
    place-items: center;
    width: 4.5rem;
    height: 4.5rem;
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-4);
    color: #fff;
    background: linear-gradient(135deg, #598EBB, #f46d09);
    font-size: 1.5rem;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.feature-icon svg {
    width: 2.2rem;
    height: 2.2rem;
    stroke: #fff;
    fill: none;
}

.feature-card:hover .feature-icon {
    transform: scale(1.15) rotate(-5deg);
}

/* ─── Glow Effect on Hover ──────────────────────────────────────────────── */

.glow-hover {
    transition: box-shadow 0.3s ease;
}

.glow-hover:hover {
    box-shadow:
        0 0 20px color-mix(in srgb, var(--primary-color) 30%, transparent),
        0 8px 32px rgba(249, 115, 22, 0.15);
}

/* ─── Counter / Stats Section ───────────────────────────────────────────── */

.stats-section {
    padding: clamp(2rem, 4vw, 3.5rem) 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--space-5);
    text-align: center;
}

.stat-item {
    padding: var(--space-4);
}

.stat-number {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: var(--space-2);
}

/* ─── Emoji-Zugänglich ──────────────────────────────────────────────────── */

.emoji {
    font-style: normal;
    font-size: 1.2em;
    vertical-align: -0.1em;
}

/* ─── CTA Section verbesserung ──────────────────────────────────────────── */

.cta-section {
    padding: clamp(3.5rem, 7vw, 6rem) 0;
    text-align: center;
    color: #fff;
    background:
        radial-gradient(ellipse at 30% 80%, rgba(244, 109, 9, 0.2), transparent 50%),
        linear-gradient(135deg, var(--primary-color), #f46d09 50%, var(--secondary-color));
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    width: 25vw;
    height: 25vw;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    top: -10vw;
    right: -5vw;
    pointer-events: none;
}

/* ─── Footer Wave Top ───────────────────────────────────────────────────── */

.site-footer {
    border-top: none;
    background: var(--bg-dark, #0f172a);
    color: rgba(255, 255, 255, 0.85);
    position: relative;
}

.footer-wave {
    display: block;
    width: 100%;
    line-height: 0;
    margin-bottom: -1px;
}

.footer-wave svg {
    display: block;
    width: 100%;
    height: auto;
}

.footer-heading {
    color: #fff;
    margin-bottom: var(--space-4);
    font-size: 1.1rem;
}

.footer-main {
    padding: clamp(2.5rem, 5vw, 4.2rem) 0 clamp(1.2rem, 3vw, 2rem);
}

.footer-main a {
    color: rgba(255, 255, 255, 0.8);
}

.footer-main a:hover {
    color: var(--primary-color);
}

.footer-main p {
    color: rgba(255, 255, 255, 0.7);
}

.footer-bottom {
    margin-top: var(--space-5);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: var(--space-4) 0;
}

.copyright {
    margin: 0;
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.6);
}

/* ─── Header Border: swap hard border for gradient line ─────────────────── */

.site-header {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 3px solid transparent;
    border-image: linear-gradient(90deg, var(--primary-color), #f46d09, var(--secondary-color)) 1;
    position: relative;
    z-index: 1100;
}

/* ============================================================
   DARK MODE — NEON UPGRADE (Gaming-Aesthetic)
   ============================================================ */

body[data-theme-active="dark"] {
    --text-color: #e2e8f0;
    --text-light: #94a3b8;
    --text-dark: #f8fafc;
    --bg-color: #0a0e1a;
    --bg-light: #0f1629;
    --bg-dark: #050810;
    --border-color: #1e2d4a;
    color-scheme: dark;
}

body[data-theme-active="dark"] .hero-section {
    background:
        radial-gradient(ellipse at 20% 80%, rgba(244, 109, 9, 0.15), transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(13, 148, 136, 0.15), transparent 50%),
        linear-gradient(135deg, #1a0a00, #0a1a18 50%, #0a0e1a);
}

body[data-theme-active="dark"] .site-header {
    background: rgba(10, 14, 26, 0.95);
    border-image: linear-gradient(90deg, var(--primary-color), var(--accent-color), var(--secondary-color)) 1;
}

/* Neon glow on buttons in dark mode */
body[data-theme-active="dark"] .btn-primary {
    box-shadow: 0 0 20px rgba(249, 115, 22, 0.3), 0 0 60px rgba(249, 115, 22, 0.1);
}

body[data-theme-active="dark"] .btn-primary:hover {
    box-shadow: 0 0 30px rgba(249, 115, 22, 0.5), 0 0 80px rgba(249, 115, 22, 0.15);
}

/* Neon glow on cards */
body[data-theme-active="dark"] .feature-card:hover,
body[data-theme-active="dark"] .frame-card:hover {
    box-shadow:
        0 0 20px rgba(249, 115, 22, 0.15),
        0 8px 32px rgba(0, 0, 0, 0.4);
}

body[data-theme-active="dark"] .feature-card,
body[data-theme-active="dark"] .frame-card,
body[data-theme-active="dark"] .frame-muted,
body[data-theme-active="dark"] .cta-box,
body[data-theme-active="dark"] .contact-form-wrapper,
body[data-theme-active="dark"] .contact-info-wrapper,
body[data-theme-active="dark"] .sidebar-widget,
body[data-theme-active="dark"] .service-features,
body[data-theme-active="dark"] .form-control {
    background: #0f1629;
    border-color: #1e2d4a;
    color: #e2e8f0;
}

body[data-theme-active="dark"] .mobile-menu-toggle,
body[data-theme-active="dark"] .main-navigation--desktop,
body[data-theme-active="dark"] .main-navigation--mobile,
body[data-theme-active="dark"] .level-1,
body[data-theme-active="dark"] .level-2 {
    background: #0f1629;
    border-color: #1e2d4a;
    color: #e2e8f0;
}

body[data-theme-active="dark"] .level-1::before,
body[data-theme-active="dark"] .level-2::before {
    background: #0f1629;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

body[data-theme-active="dark"] .theme-toggle {
    background: #0f1629;
    border-color: #1e2d4a;
    color: #e2e8f0;
}

body[data-theme-active="dark"] .theme-toggle-icon--sun {
    opacity: 0;
    transform: scale(0.8);
}

body[data-theme-active="dark"] .theme-toggle-icon--moon {
    opacity: 1;
    transform: scale(1);
}

body[data-theme-active="dark"] .nav-link:hover,
body[data-theme-active="dark"] .nav-item.active > .nav-link,
body[data-theme-active="dark"] .nav-item.current > .nav-link {
    background: rgba(255, 255, 255, 0.06);
}

body[data-theme-active="dark"] .nav-mobile-header {
    border-bottom-color: #1e2d4a;
}

body[data-theme-active="dark"] .theme-toggle--mobile {
    background: #0f1629;
    border-color: #1e2d4a;
    color: #e2e8f0;
}

body[data-theme-active="dark"] .features-section {
    background: #0c1222;
}

body[data-theme-active="dark"] .category-list li,
body[data-theme-active="dark"] .recent-posts li {
    border-bottom-color: #1e2d4a;
}

body[data-theme-active="dark"] .accordion-group {
    border-color: #1e2d4a;
}

body[data-theme-active="dark"] .accordion-group .frame-accordion {
    border-top-color: #1e2d4a;
}

body[data-theme-active="dark"] .accordion-trigger {
    color: #e2e8f0;
}

body[data-theme-active="dark"] .accordion-trigger:hover {
    background: #162035;
}

body[data-theme-active="dark"] .frame-glass {
    background: color-mix(in srgb, var(--secondary-color) 10%, transparent);
    border-color: color-mix(in srgb, var(--secondary-color) 28%, transparent);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255,255,255,0.05);
}

body[data-theme-active="dark"] .site-footer {
    background: #050810;
}

/* Dark mode: Kontrast-Tokens für helle Rahmen-Hintergründe überschreiben */
/* Alle light-bg Frames bekommen dunklen Hintergrund + helle Schrift         */
body[data-theme-active="dark"] .frame-bg-color-2,
body[data-theme-active="dark"] .frame-bg-color-3,
body[data-theme-active="dark"] .frame-bg-color-4,
body[data-theme-active="dark"] .frame-bg-color-5 {
    background-color: #0f1629;
    --on-bg: #e2e8f0;  --on-bg-h: #f1f5f9;
    --on-bg-a: #93c5fd; --on-bg-a-hv: #bfdbfe;
}

body[data-theme-active="dark"] .frame-bg-grey {
    background-color: #111827;
    --on-bg: #e2e8f0;  --on-bg-h: #f1f5f9;
    --on-bg-a: #93c5fd; --on-bg-a-hv: #bfdbfe;
}

/* Dark backgrounds stay as-is (already have white text tokens) */
body[data-theme-active="dark"] .frame-bg-primary  { color: #fff; }
body[data-theme-active="dark"] .frame-bg-secondary { color: #fff; }

/* Dark mode: ensure all headings inside frames are readable */
body[data-theme-active="dark"] h1,
body[data-theme-active="dark"] h2,
body[data-theme-active="dark"] h3,
body[data-theme-active="dark"] h4,
body[data-theme-active="dark"] h5,
body[data-theme-active="dark"] h6 {
    color: #f1f5f9;
}

/* Dark mode: text and link contrast */
body[data-theme-active="dark"] p,
body[data-theme-active="dark"] li,
body[data-theme-active="dark"] td,
body[data-theme-active="dark"] .bodytext {
    color: #cbd5e1;
}

body[data-theme-active="dark"] a {
    color: color-mix(in srgb, var(--primary-color) 70%, #93c5fd);
}

body[data-theme-active="dark"] a:hover {
    color: color-mix(in srgb, var(--primary-color) 50%, #bfdbfe);
}

/* Dark mode: image text overlay & general content areas */
body[data-theme-active="dark"] .ce-textpic,
body[data-theme-active="dark"] .ce-image,
body[data-theme-active="dark"] .frame-type-textmedia,
body[data-theme-active="dark"] .frame-type-textpic,
body[data-theme-active="dark"] .frame-type-image,
body[data-theme-active="dark"] .frame-type-text {
    color: #e2e8f0;
}

/* Dark mode: nav links */
body[data-theme-active="dark"] .nav-link {
    color: #e2e8f0;
}

body[data-theme-active="dark"] .nav-link:hover,
body[data-theme-active="dark"] .nav-item.active > .nav-link,
body[data-theme-active="dark"] .nav-item.current > .nav-link {
    color: color-mix(in srgb, var(--primary-color) 70%, #93c5fd);
}

/* Dark mode: form controls */
body[data-theme-active="dark"] .form-control {
    background: #1a2332;
    border-color: #2d3f5a;
    color: #e2e8f0;
}

/* Dark mode: btn-light */
body[data-theme-active="dark"] .btn-light {
    background: #1a2332;
    color: #e2e8f0;
    border-color: #2d3f5a;
}

/* Dark mode: logo sponsor sections */
body[data-theme-active="dark"] .container-3col,
body[data-theme-active="dark"] .container-2col {
    color: #e2e8f0;
}

/* Neon text accents in dark mode */
body[data-theme-active="dark"] .text-gradient {
    background: linear-gradient(135deg, #fb923c, #4ade80);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body[data-theme-active="dark"] .stat-number {
    background: linear-gradient(135deg, #fb923c, #4ade80);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Neon nav underline in dark mode */
body[data-theme-active="dark"] .main-navigation--desktop .nav-link::after {
    background: linear-gradient(90deg, #fb923c, #4ade80);
}

body[data-theme-active="dark"] .scroll-progress {
    background: linear-gradient(90deg, #fb923c, #4ade80);
}

body[data-theme-active="dark"] .page-header {
    background: linear-gradient(180deg, #0f1629, #0a0e1a);
    border-bottom-color: #1e2d4a;
}

/* ─── Feature Lists (Service Page) ──────────────────────────────────────── */

.feature-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) 0;
    font-size: 0.95rem;
    border-bottom: 1px solid var(--border-color);
}

.feature-list li:last-child {
    border-bottom: none;
}

.feature-list li i {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: var(--primary-color);
    font-size: 0.75rem;
}

/* ─── Contact Info Items ────────────────────────────────────────────────── */

.contact-info-item {
    display: flex;
    gap: var(--space-4);
    margin-bottom: var(--space-5);
}

.contact-info-item h3 {
    font-size: 0.95rem;
    margin-bottom: var(--space-1);
    color: var(--text-color);
}

.contact-icon i {
    font-size: 0.9rem;
}

/* ─── CTA Box ───────────────────────────────────────────────────────────── */

.cta-box {
    padding: clamp(1.5rem, 3vw, 2.5rem);
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, var(--primary-color), #f46d09);
    color: #fff;
    text-align: center;
}

.cta-box h3 {
    color: #fff;
    font-size: 1.4rem;
}

.cta-box p {
    opacity: 0.9;
    margin-bottom: var(--space-5);
}

/* ─── Category List Icons ───────────────────────────────────────────────── */

.category-list li a i {
    margin-right: var(--space-2);
    color: var(--primary-color);
    width: 1.2rem;
    text-align: center;
}

/* ─── Page Header Enhancement ───────────────────────────────────────────── */

.page-header .page-title i {
    margin-right: var(--space-2);
    color: #f46d09;
}

/* ─── Button Icon Spacing ───────────────────────────────────────────────── */

.btn i.fas,
.btn i.fab,
.btn i.far {
    margin-right: 0.4em;
}

/* ─── Footer Heading Icon ───────────────────────────────────────────────── */

.footer-heading i {
    margin-right: 0.3em;
    opacity: 0.7;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ICON ENHANCEMENTS — Section Headers & Bullet Lists
   Alle Icons werden über das Feld "Dekoratives Icon" im Backend gesteuert.
   CSS-Klasse: tw-icon-{wert} — wird automatisch auf den Frame gesetzt.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Werkstatt Bullet Lists ────────────────────────────────────────────── */
.ce-bullets {
    list-style: none;
    padding-left: 0;
}

.ce-bullets li {
    position: relative;
    padding-left: 2em;
    margin-bottom: 0.6em;
    line-height: 1.6;
}

.ce-bullets li::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 0.15em;
    font-size: 0.85em;
    opacity: 0.85;
    content: "\f054";
    color: #f46d09;
}

/* Werkstatt sections: bullet icon follows the tw-icon class on the container */
.tw-icon-gear    .ce-bullets li::before { content: "\f013"; color: #FF9F43; } /* gear */
.tw-icon-laptop  .ce-bullets li::before { content: "\f109"; color: #5DADE2; } /* laptop */
.tw-icon-tree    .ce-bullets li::before { content: "\f1bb"; color: #2ECC71; } /* tree */
.tw-icon-building .ce-bullets li::before { content: "\f1ad"; color: #54A0FF; } /* building */
.tw-icon-palette .ce-bullets li::before { content: "\f53f"; color: #8B5CF6; } /* palette */
.tw-icon-microchip .ce-bullets li::before { content: "\f2db"; color: #00D2FF; } /* microchip */

/* ─── Section Header Icons (Container Frames) ───────────────────────────── */
/* Shared base: all .tw-icon-* frames get a ::before on their h1/h2 header */
[class*="tw-icon-"].frame-type-container-2col > header h2::before,
[class*="tw-icon-"].frame-type-container-2col-left > header h2::before,
[class*="tw-icon-"].frame-type-container-2col-right > header h2::before,
[class*="tw-icon-"].frame-type-container-3col > header h2::before,
[class*="tw-icon-"].frame-type-container-4col > header h2::before,
[class*="tw-icon-"].frame-type-container-2col > header h1::before,
[class*="tw-icon-"].frame-type-container-3col > header h1::before,
[class*="tw-icon-"].frame-type-container-4col > header h1::before,
/* non-container frames: text, textmedia, header etc. */
[class*="tw-icon-"].frame-type-text > header h2::before,
[class*="tw-icon-"].frame-type-textmedia > header h2::before,
[class*="tw-icon-"].frame-type-header > header h2::before,
[class*="tw-icon-"].frame-type-header > header h1::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    margin-right: 0.5em;
    font-size: 0.85em;
    opacity: 0.8;
    display: inline-block;
}

/* Per-icon content + color for section headers */
.tw-icon-gear      > header h2::before { content: "\f085"; color: #FF9F43; }
.tw-icon-laptop    > header h2::before { content: "\f109"; color: #5DADE2; }
.tw-icon-tree      > header h2::before { content: "\f1bb"; color: #2ECC71; }
.tw-icon-building  > header h2::before { content: "\f1ad"; color: #54A0FF; }
.tw-icon-palette   > header h2::before { content: "\f53f"; color: #8B5CF6; }
.tw-icon-microchip > header h2::before { content: "\f2db"; color: #00D2FF; }
.tw-icon-bullseye  > header h2::before { content: "\f140"; color: #f46d09; }
.tw-icon-users     > header h2::before { content: "\f0c0"; color: #5DADE2; }
.tw-icon-tasks     > header h2::before { content: "\f0ae"; color: #4CD964; }
.tw-icon-calendar  > header h2::before { content: "\f073"; color: #f46d09; }
.tw-icon-mountain  > header h2::before { content: "\f3ed"; color: #f46d09; }
.tw-icon-lightbulb > header h2::before { content: "\f0eb"; color: #FECA57; }
.tw-icon-lightbulb > header h1::before { content: "\f0eb"; color: #FECA57; margin-right: 0.5em; font-size: 0.85em; font-family: "Font Awesome 6 Free"; font-weight: 900; display: inline-block; }

/* ─── Card / Badge Icons (::before on the frame itself) ────────────────── */
/* Shared base styles for badge-style icons */
.tw-icon-child,
.tw-icon-school,
.tw-icon-graduation,
.tw-icon-briefcase,
.tw-icon-heart,
.tw-icon-wrench,
.tw-icon-bolt,
.tw-icon-rocket {
    position: relative;
}

.tw-icon-child::before,
.tw-icon-school::before,
.tw-icon-graduation::before,
.tw-icon-briefcase::before,
.tw-icon-heart::before,
.tw-icon-wrench::before,
.tw-icon-bolt::before,
.tw-icon-rocket::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    display: block;
    text-align: center;
    width: 2.8rem;
    height: 2.8rem;
    line-height: 2.8rem;
    border-radius: 50%;
    color: #fff;
    font-size: 1.1rem;
    margin: 0 auto var(--space-2);
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

/* Slightly larger badges for timeline/ziele cards */
.tw-icon-heart::before,
.tw-icon-wrench::before,
.tw-icon-bolt::before,
.tw-icon-rocket::before {
    width: 3rem;
    height: 3rem;
    line-height: 3rem;
    font-size: 1.2rem;
    margin: 0 auto var(--space-3);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Icon content + gradient per icon */
.tw-icon-child::before      { content: "\f1ae"; background: linear-gradient(135deg, #FF6B6B, #FF9F43); } /* Kinder */
.tw-icon-school::before     { content: "\f549"; background: linear-gradient(135deg, #5DADE2, #2E86DE); } /* Schulen */
.tw-icon-graduation::before { content: "\f19d"; background: linear-gradient(135deg, #4CD964, #2ECC71); } /* Erwachsene / Bildung */
.tw-icon-briefcase::before  { content: "\f0b1"; background: linear-gradient(135deg, #8B5CF6, #6C3AED); } /* Unternehmen */
.tw-icon-heart::before      { content: "\f004"; background: linear-gradient(135deg, #FF6B6B, #f46d09); } /* Freude */
.tw-icon-wrench::before     { content: "\f0ad"; background: linear-gradient(135deg, #4CD964, #2ECC71); } /* Werkzeug / Aufbauphase */
.tw-icon-bolt::before       { content: "\f0e7"; background: linear-gradient(135deg, #FECA57, #FF9F43); } /* Pilotphase */
.tw-icon-rocket::before     { content: "\f135"; background: linear-gradient(135deg, #4CD964, #2ECC71); } /* Eröffnung */
