/*
 * Gemeinsame Bausteine der neu gestalteten Seiten (Präfix tv-).
 * Referenzen: docs/verfahren-redesign.html und docs/redesign/*.html
 * Die Farb-Tokens kommen aus tokens.css, seitenspezifisches CSS aus den jeweiligen Dateien.
 */

/* Breite und Padding liefert bereits .container aus base.html.twig */
.tv-container {
    box-sizing: border-box;
}

/* ---------- Typografie ---------- */
/* Lange deutsche Wörter (z. B. „Entspannungsverfahren“) dürfen auf dem Handy nicht überstehen;
   getrennt wird nur auf schmalen Bildschirmen (siehe Media Query unten) */
.tv-handlee,
.tv-h1,
.tv-h2,
.tv-h3 {
    overflow-wrap: break-word;
}
.tv-handlee {
    font-family: 'Handlee', cursive;
    font-weight: 400;
    color: var(--tv-accent);
}
.tv-eyebrow {
    margin: 0 0 12px;
    font-size: 13px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--tv-muted);
}
.tv-h1 {
    margin: 0 0 28px;
    font-family: 'Handlee', cursive;
    font-weight: 400;
    font-size: 56px;
    line-height: 1.1;
    color: var(--tv-accent);
}
.tv-h2 {
    margin: 0 0 12px;
    font-family: 'Handlee', cursive;
    font-weight: 400;
    font-size: 34px;
    line-height: 1.2;
    color: var(--tv-accent);
}
.tv-h3 {
    margin: 0 0 16px;
    font-family: 'Handlee', cursive;
    font-weight: 400;
    font-size: 28px;
    line-height: 1.2;
    color: var(--tv-accent);
}
.tv-lead {
    margin: 0;
    max-width: 58ch;
    font-size: 19px;
    line-height: 1.75;
    color: var(--tv-text-soft);
}
.tv-text p {
    margin: 0 0 18px;
    max-width: 62ch;
    font-size: 17px;
    line-height: 1.75;
    color: var(--tv-text-soft);
}
.tv-text p:last-child {
    margin-bottom: 0;
}
.tv-text ul {
    margin: 0 0 22px;
    padding-left: 22px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 17px;
    line-height: 1.6;
    color: var(--tv-text-soft);
}
.tv-text ul:last-child {
    margin-bottom: 0;
}
.tv-text li::marker {
    color: var(--tv-accent);
}
.tv-muted {
    color: var(--tv-muted);
}

/* Icon links neben der Überschrift, vertikal mittig */
.tv-icon-heading {
    display: flex;
    align-items: center;
    gap: 12px;
}
.tv-icon-heading > svg {
    flex: none;
}
.tv-icon-heading > :is(h1, h2, h3, h4) {
    margin: 0;
}

/* ---------- Links ---------- */
.tv-link,
.tv-more {
    font-size: 15px;
    color: var(--tv-accent-dark);
    text-decoration: none;
    border-bottom: 1px solid var(--tv-line-accent);
    padding-bottom: 2px;
}
.tv-link:hover,
.tv-more:hover {
    color: var(--tv-text);
    border-bottom-color: var(--tv-text);
}

/* ---------- Abschnitte und Layout ---------- */
.tv-section {
    padding: 56px 0;
    border-top: 1px solid var(--tv-line);
}
.tv-split {
    display: flex;
    flex-wrap: wrap;
    gap: 32px 80px;
    align-items: flex-start;
}
.tv-split > * {
    min-width: 0;
}

/* Sand-Panel mit Rahmen (z. B. Anwendungsgebiete) */
.tv-panel {
    background: var(--tv-sand-50);
    border: 1px solid var(--tv-line);
    border-radius: 6px;
    padding: 28px;
}

/* Abschluss-/CTA-Band */
.tv-band {
    background: var(--tv-sand-100);
    border-radius: 6px;
    padding: 48px 40px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 24px 48px;
}
.tv-band__text {
    margin: 0;
    flex: 1 1 460px;
    max-width: 60ch;
    font-size: 18px;
    line-height: 1.75;
    color: var(--tv-text-soft);
}
.tv-band__title {
    margin: 0;
    flex: 1 1 360px;
    font-family: 'Handlee', cursive;
    font-weight: 400;
    font-size: 30px;
    line-height: 1.25;
    color: var(--tv-accent);
}

/* ---------- Zitat-Band (innerhalb des Containers) ---------- */
.tv-quote {
    background: var(--tv-sand-100);
    padding: 64px 24px;
    border-radius: 6px;
}
.tv-quote figure {
    max-width: 820px;
    margin: 0 auto;
    text-align: center;
}
.tv-quote svg {
    display: block;
    margin: 0 auto 16px;
}
.tv-quote blockquote {
    margin: 0;
    font-size: 28px;
    line-height: 1.4;
}
.tv-quote figcaption {
    margin-top: 20px;
    font-size: 15px;
    letter-spacing: .08em;
    color: var(--tv-muted);
}

/* ---------- Buttons ---------- */
.tv-btn {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    padding: 0 24px;
    font-size: 16px;
    text-decoration: none;
    border: 1px solid var(--tv-accent-dark);
}
.tv-btn--primary {
    background: var(--tv-accent-dark);
    color: #fff;
}
.tv-btn--primary:hover {
    background: var(--tv-text);
    border-color: var(--tv-text);
    color: #fff;
}
.tv-btn--ghost {
    color: var(--tv-accent-dark);
}
.tv-btn--ghost:hover {
    background: var(--tv-sand-100);
    color: var(--tv-accent-dark);
}

/* ---------- Fragenliste mit „?“ ---------- */
.tv-qlist {
    list-style: none;
    margin: 0;
    padding: 0;
}
.tv-qlist li {
    display: flex;
    gap: 20px;
    align-items: baseline;
    padding: 20px 0;
    border-top: 1px solid var(--tv-line);
    font-size: 17px;
    line-height: 1.7;
    color: var(--tv-text-soft);
}
.tv-qlist li:last-child {
    border-bottom: 1px solid var(--tv-line);
}
.tv-qlist li::before {
    content: '?';
    font-family: 'Handlee', cursive;
    font-size: 26px;
    line-height: 1;
    color: var(--tv-accent);
}

/* ---------- Blättern (Vor/Zurück) ---------- */
.tv-pager {
    padding: 56px 0 96px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}
.tv-pager a {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 18px 20px;
    border: 1px solid var(--tv-line);
    border-radius: 6px;
    color: var(--tv-text);
    text-decoration: none;
}
.tv-pager a:hover {
    background: var(--tv-sand-50);
    border-color: var(--tv-line-accent);
    color: var(--tv-text);
}
.tv-pager__next {
    text-align: right;
}
.tv-pager__label {
    font-size: 13px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--tv-muted);
}
.tv-pager__title {
    font-size: 17px;
}

/* ---------- Bilder ---------- */
.tv-figure {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 6px;
    background: var(--tv-sand-100);
}
.tv-figure--4x5 { aspect-ratio: 4 / 5; }
.tv-figure--3x4 { aspect-ratio: 3 / 4; }
.tv-figure--1x1 { aspect-ratio: 1 / 1; }
.tv-figure--4x3 { aspect-ratio: 4 / 3; }

@media (max-width: 575.98px) {
    .tv-handlee,
    .tv-h1,
    .tv-h2,
    .tv-h3 {
        hyphens: auto;
    }
    .tv-h1 {
        font-size: 34px;
    }
    .tv-h2 {
        font-size: 30px;
    }
    .tv-band {
        padding: 36px 24px;
    }
    .tv-quote {
        padding: 40px 20px;
    }
    .tv-quote blockquote {
        font-size: 22px;
    }
}

/* ---------- „Nach oben“-Button (base.html.twig, scroll_top_controller.js) ---------- */
/* Last element of the content container, right-aligned; visible once the visitor reaches the end */
.tv-to-top-wrap {
    display: flex;
    justify-content: flex-end;
    margin-top: 24px;
}
.tv-to-top {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    background: #fff;
    color: var(--tv-accent-dark);
    border: 1px solid var(--tv-accent-dark);
    cursor: pointer;
}
.tv-to-top:hover {
    background: var(--tv-accent-dark);
    color: #fff;
}
.tv-to-top:focus-visible {
    outline: 2px solid var(--tv-text);
    outline-offset: 2px;
}
@media print {
    .tv-to-top-wrap {
        display: none;
    }
}
