/*
Theme Name: SPD Hochheim – Geschichte
Theme URI: https://geschichte.nuss.name/
Description: Child-Theme für das historische Portal der SPD Hochheim
Author: SPD Hochheim
Template: kadence
Version: 1.0.0
Text Domain: spd-hochheim-geschichte
*/

:root {
    --spd-red: #E3000F;
    --spd-white: #FFFFFF;
    --spd-black: #000000;
    --spd-lightgray: #EDEDED;
}

/* =========================================================
   SPD Hochheim – Geschichte
   Grunddesign
   ========================================================= */

body {
    color: #000;
    background: #fff;
    font-family: "Open Sans", Arial, Helvetica, sans-serif;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: #000;
    font-weight: 700;
    letter-spacing: -0.02em;
}

a {
    color: var(--spd-red);
}

a:hover,
a:focus {
    color: #a9000b;
}

button,
.button,
.wp-block-button__link,
input[type="submit"] {
    background: var(--spd-red);
    color: var(--spd-white);
    border-radius: 0;
    border: 0;
    font-weight: 700;
}

button:hover,
.button:hover,
.wp-block-button__link:hover,
input[type="submit"]:hover {
    background: #a9000b;
    color: var(--spd-white);
}

.entry-content {
    line-height: 1.7;
}

.entry-content h2 {
    margin-top: 2.5rem;
}

::selection {
    background: var(--spd-red);
    color: var(--spd-white);
}

/* SPD Hochheim Marken-Header */
.spd-history-brandbar {
    background: #E3000F;
    color: #fff;
    width: 100%;
}

.spd-history-brandbar-inner {
    max-width: 1290px;
    margin: 0 auto;
    padding: 28px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.spd-history-title {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.spd-history-title strong {
    color: #fff;
    font-size: clamp(1.8rem, 4vw, 3.4rem);
    line-height: 1;
    font-weight: 800;
    letter-spacing: -0.035em;
}

.spd-history-title span {
    color: #fff;
    font-size: 1rem;
    opacity: 0.95;
}

.spd-history-logo {
    width: 120px;
    height: 120px;
    object-fit: cover;
    flex: 0 0 auto;
}

@media (max-width: 600px) {
    .spd-history-brandbar-inner {
        padding: 22px 20px;
    }

    .spd-history-logo {
        width: 82px;
        height: 82px;
    }

    .spd-history-title span {
        font-size: 0.85rem;
    }
}

/* =========================================================
   Historischer Zeitstrahl
   ========================================================= */

.spd-timeline {
    position: relative;
    max-width: 1100px;
    margin: 4rem auto;
    padding: 1rem 0;
}

.spd-timeline::before {
    content: "";
    position: absolute;
    left: 180px;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--spd-red);
}

.spd-timeline-item {
    position: relative;
    display: grid;
    grid-template-columns: 145px 70px 1fr;
    align-items: start;
    margin: 0 0 4rem;
}

.spd-timeline-year {
    text-align: right;
    font-size: 2.4rem;
    line-height: 1;
    font-weight: 800;
    color: var(--spd-red);
    padding-top: 8px;
}

.spd-timeline-dot {
    position: relative;
    z-index: 2;
    width: 22px;
    height: 22px;
    margin: 7px auto 0;
    background: #fff;
    border: 6px solid var(--spd-red);
    border-radius: 50%;
}

.spd-timeline-card {
    background: #fff;
    border-top: 5px solid var(--spd-red);
    padding: 24px 28px 28px;
    box-shadow: 0 10px 35px rgba(0,0,0,.08);
}

.spd-timeline-card h2 {
    margin: 5px 0 12px;
    font-size: 1.7rem;
}

.spd-timeline-card h2 a {
    color: #000;
    text-decoration: none;
}

.spd-timeline-card h2 a:hover {
    color: var(--spd-red);
}

.spd-timeline-date {
    font-weight: 700;
    margin-bottom: 4px;
}

.spd-timeline-epoch {
    display: inline-block;
    background: var(--spd-lightgray);
    padding: 5px 9px;
    margin-bottom: 8px;
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.spd-timeline-more {
    display: inline-block;
    margin-top: 10px;
    font-weight: 700;
    text-decoration: none;
}

.spd-timeline-empty {
    max-width: 1000px;
    margin: 3rem auto;
    padding: 2rem;
    background: var(--spd-lightgray);
}

@media (max-width: 700px) {

    .spd-timeline::before {
        left: 15px;
    }

    .spd-timeline-item {
        grid-template-columns: 31px 1fr;
        gap: 15px;
    }

    .spd-timeline-year {
        grid-column: 2;
        text-align: left;
        font-size: 1.8rem;
        padding: 0;
    }

    .spd-timeline-dot {
        grid-column: 1;
        grid-row: 1 / span 2;
        width: 18px;
        height: 18px;
        border-width: 5px;
        margin-top: 5px;
    }

    .spd-timeline-card {
        grid-column: 2;
        padding: 20px;
    }
}

/* =========================================================
   Kadence aufräumen
   ========================================================= */

/* Der normale Kadence-Header ist redundant – unser roter
   SPD-Markenheader übernimmt diese Aufgabe */
.site-header {
    display: none;
}

/* Seitentitel kompakter darstellen */
.entry-hero {
    min-height: auto !important;
}

.entry-hero .entry-header {
    min-height: auto !important;
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
}

.entry-hero-container-inner {
    background: #fff !important;
}

/* Zeitstrahl näher an den Seitentitel ziehen */
.spd-timeline {
    margin-top: 2rem;
}

/* =========================================================
   Zeitstrahl V2 – kompakter / musealer
   ========================================================= */

.entry-hero .entry-header {
    padding-top: 1.4rem !important;
    padding-bottom: 1.4rem !important;
}

.entry-hero-title {
    font-size: clamp(2rem, 4vw, 3rem) !important;
}

.content-area {
    margin-top: 0 !important;
}

.spd-timeline {
    margin-top: 0 !important;
    padding-top: 0;
}

.spd-timeline-item {
    margin-bottom: 5rem;
}

.spd-timeline-year {
    font-size: 3rem;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.spd-timeline-card {
    border-top-width: 6px;
    padding: 30px 34px 32px;
    box-shadow:
        0 14px 40px rgba(0,0,0,.07),
        0 2px 8px rgba(0,0,0,.04);
}

.spd-timeline-card h2 {
    font-size: clamp(1.6rem, 2.5vw, 2.2rem);
    margin-top: 1.25rem;
}

.spd-timeline-card p {
    font-size: 1.05rem;
    line-height: 1.65;
    max-width: 780px;
}

.spd-timeline-epoch {
    background: #ededed;
    color: #222;
    font-size: .78rem;
    letter-spacing: .08em;
}

.spd-timeline-more {
    color: var(--spd-red) !important;
    font-weight: 800;
}

.spd-timeline-more:hover {
    color: #a9000b !important;
}

@media (min-width: 900px) {
    .spd-timeline {
        padding-top: .5rem;
    }
}

/* Epochen im Zeitstrahl */

.spd-timeline-era {
    position: relative;
    margin: 1rem 0 3rem 215px;
    padding: 20px 28px;
    background: #111;
    color: #fff;
}

.spd-timeline-era span {
    display: block;
    margin-bottom: 4px;
    color: #fff;
    font-size: .72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .14em;
    opacity: .7;
}

.spd-timeline-era strong {
    display: block;
    color: #fff;
    font-size: clamp(1.45rem, 3vw, 2.4rem);
    line-height: 1.1;
    font-weight: 800;
}

.spd-timeline-era::before {
    content: "";
    position: absolute;
    left: -39px;
    top: 50%;
    width: 39px;
    height: 4px;
    background: var(--spd-red);
}

@media (max-width: 700px) {

    .spd-timeline-era {
        margin: 1rem 0 2rem 46px;
        padding: 17px 20px;
    }

    .spd-timeline-era::before {
        left: -31px;
        width: 31px;
    }
}

/* =========================================================
   Zeitstrahl – historische Titelbilder
   ========================================================= */

.spd-timeline-image {
    margin: -30px -34px 28px;
    overflow: hidden;
}

.spd-timeline-image img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 430px;
    object-fit: cover;
    filter: grayscale(15%);
}

.spd-timeline-card:hover .spd-timeline-image img {
    filter: grayscale(0%);
}

@media (max-width: 700px) {
    .spd-timeline-image {
        margin: -20px -20px 22px;
    }

    .spd-timeline-image img {
        max-height: 300px;
    }
}

/* Zeitstrahl-Bildformat korrigieren */
.spd-timeline-image {
    aspect-ratio: 16 / 9;
    background: #ededed;
}

.spd-timeline-image img {
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: cover;
    object-position: center;
}

/* =========================================================
   Hauptnavigation
   ========================================================= */

.spd-history-nav {
    background: #111;
    width: 100%;
}

.spd-history-nav-inner {
    max-width: 1290px;
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    align-items: center;
    gap: 0;
}

.spd-history-nav a {
    display: block;
    padding: 15px 20px;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: .95rem;
}

.spd-history-nav a:hover,
.spd-history-nav a:focus {
    background: #E3000F;
    color: #fff;
}

@media (max-width: 700px) {
    .spd-history-nav-inner {
        padding: 0 12px;
        overflow-x: auto;
        white-space: nowrap;
    }

    .spd-history-nav a {
        padding: 13px 15px;
    }
}

/* =========================================================
   Startseite – Hero
   ========================================================= */

.page-id-9 .entry-hero {
    display: none;
}

.page-id-9 .content-area {
    margin: 0 !important;
}

.page-id-9 .site-main,
.page-id-9 .content-container {
    max-width: none !important;
    padding: 0 !important;
}

.page-id-9 .entry-content {
    margin: 0 !important;
}

.spd-home-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(70px, 9vw, 140px) max(40px, calc((100vw - 1290px) / 2));
    background: #fff;
}

.spd-home-kicker {
    margin-bottom: 24px;
    color: #E3000F;
    font-size: .82rem;
    font-weight: 800;
    letter-spacing: .16em;
}

.spd-home-hero h1 {
    margin: 0;
    max-width: 1050px;
    font-size: clamp(3.4rem, 7.5vw, 7.5rem);
    line-height: .94;
    font-weight: 900;
    letter-spacing: -.055em;
}

.spd-home-hero h1 span {
    color: #E3000F;
}

.spd-home-lead {
    max-width: 720px;
    margin: 38px 0 0;
    font-size: clamp(1.15rem, 2vw, 1.55rem);
    line-height: 1.55;
}

.spd-home-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 38px;
}

.spd-home-primary,
.spd-home-secondary {
    display: inline-block;
    padding: 16px 24px;
    font-weight: 800;
    text-decoration: none;
}

.spd-home-primary {
    background: #E3000F;
    color: #fff !important;
}

.spd-home-primary:hover {
    background: #b5000c;
}

.spd-home-secondary {
    border: 2px solid #111;
    color: #111 !important;
}

.spd-home-secondary:hover {
    background: #111;
    color: #fff !important;
}

.spd-home-hero-line {
    display: flex;
    align-items: center;
    margin-top: 75px;
    max-width: 900px;
}

.spd-home-hero-line span {
    height: 4px;
    background: #E3000F;
    flex: 1;
}

.spd-home-hero-line i {
    width: 20px;
    height: 20px;
    margin: 0 -2px;
    border: 5px solid #E3000F;
    border-radius: 50%;
    background: #fff;
    flex: 0 0 auto;
}

.spd-home-hero-caption {
    margin-top: 12px;
    font-size: .82rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

@media (max-width: 700px) {

    .spd-home-hero {
        padding: 55px 24px 65px;
    }

    .spd-home-hero h1 {
        font-size: clamp(3rem, 15vw, 5rem);
    }

    .spd-home-lead {
        margin-top: 28px;
    }

    .spd-home-hero-line {
        margin-top: 50px;
    }
}

/* =========================================================
   Einzelansicht Foto
   ========================================================= */

.spd-photo-single {
    padding: 70px 30px 100px;
    background: #fff;
}

.spd-photo-single-inner {
    max-width: 1290px;
    margin: 0 auto;
}

.spd-photo-single-header {
    margin-bottom: 40px;
}

.spd-photo-single-header h1 {
    max-width: 1000px;
    margin: 0;
    font-size: clamp(2.8rem, 6vw, 5.5rem);
    line-height: .98;
}

.spd-photo-single-year {
    margin-top: 14px;
    color: var(--spd-red);
    font-size: 2rem;
    font-weight: 900;
}

.spd-photo-single-image {
    margin: 0 0 50px;
}

.spd-photo-single-image img {
    display: block;
    width: 100%;
    max-height: 850px;
    object-fit: contain;
    background: #ededed;
}

.spd-photo-single-image figcaption {
    padding: 14px 0 0;
    font-size: .95rem;
    color: #555;
}

.spd-photo-single-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    gap: 60px;
    align-items: start;
}

.spd-photo-single-content {
    font-size: 1.08rem;
    line-height: 1.75;
}

.spd-photo-meta {
    padding: 28px;
    background: #f1f1f1;
    border-top: 5px solid var(--spd-red);
}

.spd-photo-meta h2 {
    margin-top: 0;
}

.spd-photo-meta dl {
    margin: 0;
}

.spd-photo-meta dt {
    margin-top: 18px;
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.spd-photo-meta dd {
    margin: 4px 0 0;
}

.spd-photo-related {
    margin-top: 70px;
}

.spd-photo-related h2 {
    font-size: 2rem;
}

.spd-photo-related-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.spd-photo-related-grid a {
    display: inline-block;
    padding: 10px 14px;
    background: #111;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
}

.spd-photo-related-grid a:hover {
    background: var(--spd-red);
    color: #fff;
}

@media (max-width: 800px) {
    .spd-photo-single {
        padding: 45px 20px 70px;
    }

    .spd-photo-single-layout {
        grid-template-columns: 1fr;
        gap: 35px;
    }
}

/* =========================================================
   Eigene Archive immer volle Breite
   ========================================================= */

.post-type-archive-foto .content-area,
.post-type-archive-ereignis .content-area,
.post-type-archive-person .content-area,
.post-type-archive-dokument .content-area {
    margin: 0 !important;
}

.post-type-archive-foto .content-container,
.post-type-archive-ereignis .content-container,
.post-type-archive-person .content-container,
.post-type-archive-dokument .content-container {
    max-width: none !important;
    width: 100% !important;
    padding: 0 !important;
}

.post-type-archive-foto .site-main,
.post-type-archive-ereignis .site-main,
.post-type-archive-person .site-main,
.post-type-archive-dokument .site-main {
    max-width: none !important;
    width: 100% !important;
    padding: 0 !important;
}

.spd-archive-inner {
    width: min(1290px, calc(100% - 60px));
    max-width: 1290px;
}

@media (max-width: 650px) {
    .spd-archive-inner {
        width: 100%;
    }
}

/* Fotoarchiv: verfügbare Breite sinnvoll nutzen */
.post-type-archive-foto .spd-archive-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
}

/* Ein einzelnes Foto darf die Archivbreite nutzen */
.post-type-archive-foto .spd-archive-card:only-child {
    max-width: none;
}

/* NAV FIX – alle Menüpunkte müssen sichtbar bleiben */
.spd-history-nav-inner {
    width: 100%;
    max-width: 1290px;
    box-sizing: border-box;
    display: flex;
    flex-wrap: wrap;
    overflow: visible;
}

.spd-history-nav a {
    flex: 0 0 auto;
}

@media (max-width: 700px) {
    .spd-history-nav-inner {
        flex-wrap: nowrap;
        overflow-x: auto;
        box-sizing: border-box;
    }
}

/* Fotoarchiv: Grundlayout */
.post-type-archive-foto .spd-archive-page {
    padding: 40px 20px 64px;
}
.post-type-archive-foto .spd-archive-inner {
    width: 100%;
    max-width: 1200px;
    margin-inline: auto;
}
.post-type-archive-foto .spd-archive-header {
    margin-bottom: 32px;
}
.post-type-archive-foto .spd-archive-kicker {
    color: #c92525;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .12em;
}
.post-type-archive-foto .spd-archive-header h1 {
    margin: 8px 0 16px;
}
.post-type-archive-foto .spd-archive-header p {
    max-width: 720px;
    margin: 0;
}
.post-type-archive-foto .spd-archive-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}
.post-type-archive-foto .spd-archive-card {
    min-width: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e2e2e2;
    border-radius: 10px;
}
.post-type-archive-foto .spd-archive-card-image {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 4 / 3;
    padding: 16px;
    background: #eee;
}
.post-type-archive-foto .spd-archive-card-image img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.post-type-archive-foto .spd-archive-card-body {
    padding: 20px;
}
.post-type-archive-foto .spd-archive-card h2 {
    margin: 8px 0 12px;
    font-size: 23px;
}
@media (max-width: 960px) {
    .post-type-archive-foto .spd-archive-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 600px) {
    .post-type-archive-foto .spd-archive-page {
        padding: 28px 16px 40px;
    }
    .post-type-archive-foto .spd-archive-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Startseite an die gemeinsamen Bereichsköpfe ausrichten */
.page-id-9 .entry-content-wrap {
    padding: 0;
}
.page-id-9 .spd-home-hero {
    padding: 40px max(20px, calc((100% - 1200px) / 2)) 64px;
}
.page-id-9 .spd-home-kicker {
    margin: 0 0 8px;
    color: #c92525;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: .12em;
}
.page-id-9 .spd-home-hero h1 {
    margin-top: 0;
}
@media (max-width: 600px) {
    .page-id-9 .spd-home-hero {
        padding: 28px 16px 40px;
    }
}

/* Startseitentitel in derselben Größe wie die Bereichstitel */
.page-id-9 .spd-home-hero h1 {
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -.025em;
}
/* =========================================================
   SPD Sticky Navigation + Zeitstrahl
   2026-09-10
   ========================================================= */

/* Kadence-Hintergrund konsequent weiß */
html,
body,
body.content-style-boxed,
body.content-style-unboxed,
.site {
    background-color: #fff !important;
}

/* Schwarze Hauptnavigation bleibt beim Scrollen sichtbar */
.spd-history-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Zeitstrahl: kompakter Seitenkopf direkt unter der Navigation */
body.page-id-6 .spd-section-heading {
    position: sticky;
    top: 52px;
    z-index: 900;
    padding: 10px 20px 9px;
    background: #fff;
    border-bottom: 1px solid #ededed;
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.05);
}

body.page-id-6 .spd-section-heading .spd-section-eyebrow {
    margin-bottom: 2px;
    font-size: 11px;
}

body.page-id-6 .spd-section-heading h1 {
    margin-bottom: 2px;
    font-size: clamp(26px, 3vw, 34px);
    line-height: 1.05;
}

body.page-id-6 .spd-section-heading p {
    max-width: none;
    font-size: 14px;
    line-height: 1.35;
}

/* Aktuelle Epoche bleibt unter dem Seitenkopf stehen.
   Die nächste Epoche schiebt/überdeckt die vorherige. */
body.page-id-6 .spd-timeline-era {
    position: sticky;
    top: 135px;
    z-index: 800;
}

/* Aktuelles Jahr bleibt unter der Epoche sichtbar.
   Durch die Begrenzung auf das jeweilige Timeline-Item
   wird es beim nächsten Jahr automatisch abgelöst. */
body.page-id-6 .spd-timeline-year {
    position: sticky;
    top: 215px;
    z-index: 700;
    align-self: start;
    background: #fff;
}

/* Mobil etwas weniger Platz für die gestapelten Sticky-Ebenen */
@media (max-width: 700px) {
    body.page-id-6 .spd-section-heading {
        top: 48px;
        padding: 8px 16px 7px;
    }

    body.page-id-6 .spd-section-heading p {
        display: none;
    }

    body.page-id-6 .spd-timeline-era {
        top: 105px;
    }

    body.page-id-6 .spd-timeline-year {
        top: 180px;
    }
}

/* =========================================================
   Sticky Bereichsüberschrift – alle Archiv-Unterseiten
   ========================================================= */

body.spd-section-overview header.spd-section-heading {
    position: sticky;
    top: 52px;
    z-index: 900;
    padding: 10px 20px 9px;
    background: #fff;
    border-bottom: 1px solid #ededed;
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.05);
}

body.spd-section-overview header.spd-section-heading .spd-section-eyebrow {
    margin-bottom: 2px;
    font-size: 11px;
}

body.spd-section-overview header.spd-section-heading h1 {
    margin-bottom: 2px;
    font-size: clamp(26px, 3vw, 34px);
    line-height: 1.05;
}

body.spd-section-overview header.spd-section-heading p {
    max-width: none;
    font-size: 14px;
    line-height: 1.35;
}

@media (max-width: 700px) {
    body.spd-section-overview header.spd-section-heading {
        top: 48px;
        padding: 8px 16px 7px;
    }

    body.spd-section-overview header.spd-section-heading p {
        display: none;
    }
}

/* =========================================================
   Sticky Bereichsüberschrift – alle Archiv-Unterseiten
   ========================================================= */

body.spd-section-overview header.spd-section-heading {
    position: sticky;
    top: 52px;
    z-index: 900;
    padding: 10px 20px 9px;
    background: #fff;
    border-bottom: 1px solid #ededed;
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.05);
}

body.spd-section-overview header.spd-section-heading .spd-section-eyebrow {
    margin-bottom: 2px;
    font-size: 11px;
}

body.spd-section-overview header.spd-section-heading h1 {
    margin-bottom: 2px;
    font-size: clamp(26px, 3vw, 34px);
    line-height: 1.05;
}

body.spd-section-overview header.spd-section-heading p {
    max-width: none;
    font-size: 14px;
    line-height: 1.35;
}

@media (max-width: 700px) {
    body.spd-section-overview header.spd-section-heading {
        top: 48px;
        padding: 8px 16px 7px;
    }

    body.spd-section-overview header.spd-section-heading p {
        display: none;
    }
}

/* =========================================================
   Zeitstrahl – Sticky/Geometrie Korrektur
   2026-09-10
   ========================================================= */

/* Desktop: Mittelpunkt des Jahres-Kreises liegt bei 180px.
   Die 4px-Achse wird deshalb 2px links davon gezeichnet. */
@media (min-width: 701px) {
    body.page-id-6 .spd-timeline::before {
        left: 178px;
    }

    /* Einheitliche Mindesthöhe: beim Sticky-Wechsel deckt auch
       eine einzeilige Epoche eine vorherige zweizeilige vollständig ab. */
    body.page-id-6 .spd-timeline-era {
        box-sizing: border-box;
        min-height: 148px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    /* Verbindung endet exakt an der rechten Kante der Zeitachse. */
    body.page-id-6 .spd-timeline-era::before {
        left: -33px;
        width: 33px;
    }

    /* Kreis sicher innerhalb seiner 70px-Spalte zentrieren. */
    body.page-id-6 .spd-timeline-dot {
        justify-self: center;
        margin-left: 0;
        margin-right: 0;
    }
}

/* Mobil: Achse ebenfalls exakt unter dem Mittelpunkt des Kreises. */
@media (max-width: 700px) {
    body.page-id-6 .spd-timeline::before {
        left: 13.5px;
    }

    body.page-id-6 .spd-timeline-era {
        box-sizing: border-box;
        min-height: 104px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    body.page-id-6 .spd-timeline-era::before {
        left: -28.5px;
        width: 28.5px;
    }

    /* Jahr unterhalb der sticky Epoche halten. */
    body.page-id-6 .spd-timeline-year {
        top: 217px;
    }
}
/* =========================================================
   Zeitstrahl – Sortierung als Segment-Schalter
   ========================================================= */

.spd-timeline-sort {
    max-width: 1100px;
    margin: 0 auto 1.75rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0;
}

.spd-timeline-sort-label {
    margin-right: 12px;
    color: #666;
    font-size: .72rem;
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: .10em;
}

.spd-timeline-sort-separator {
    display: none;
}

.spd-timeline-sort-option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 15px;
    border: 1px solid #d7d7d7;
    background: #fff;
    color: #222 !important;
    font-size: .88rem;
    font-weight: 800;
    line-height: 1.2;
    text-decoration: none !important;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.spd-timeline-sort-option + .spd-timeline-sort-option {
    border-left: 0;
}

.spd-timeline-sort-option:first-of-type {
    border-radius: 7px 0 0 7px;
}

.spd-timeline-sort-option:last-of-type {
    border-radius: 0 7px 7px 0;
}

.spd-timeline-sort-option:hover,
.spd-timeline-sort-option:focus {
    background: #f2f2f2;
    color: #111 !important;
}

.spd-timeline-sort-option.is-active {
    position: relative;
    z-index: 1;
    background: #111;
    border-color: #111;
    color: #fff !important;
    box-shadow: inset 0 -3px 0 var(--spd-red);
}

.spd-timeline-sort-option.is-active:hover,
.spd-timeline-sort-option.is-active:focus {
    background: #111;
    color: #fff !important;
}

@media (max-width: 600px) {
    .spd-timeline-sort {
        margin-bottom: 1.25rem;
        justify-content: center;
        flex-wrap: wrap;
    }

    .spd-timeline-sort-label {
        flex: 0 0 100%;
        margin: 0 0 8px;
        text-align: center;
    }

    .spd-timeline-sort-option {
        flex: 1 1 0;
        max-width: 190px;
        padding-inline: 10px;
        font-size: .82rem;
    }
}
