/* ==========================================================================
   PD Stuckateur: Timeline "Unsere Geschichte" (page-about.html)
   Dunkle Sektion mit Zollstock-Achse, die sich beim Scrollen rot füllt.
   Ohne JavaScript ist alles sofort sichtbar.
   ========================================================================== */

.pd-history {
    --pd-red: #ed1b24;
    --pd-red-dark: #9e0e15;
    --pd-bg: #121212;
    --pd-card: #1b1b1b;
    --pd-line: #2a2a2a;
    --pd-text: #b9b9b9;
    position: relative;
    overflow: hidden;
    padding: 110px 0 120px;
    background-color: var(--pd-bg);
    background-image:
        radial-gradient(ellipse 70% 45% at 50% 0%, rgba(237, 27, 36, 0.20), transparent 70%),
        radial-gradient(ellipse 60% 40% at 50% 100%, rgba(237, 27, 36, 0.10), transparent 70%),
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: auto, auto, 48px 48px, 48px 48px;
    color: #fff;
}

/* ---------- Kopfbereich ---------- */
.pd-history-head { position: relative; text-align: center; max-width: 760px; margin: 0 auto 90px; padding: 0 20px; }
.pd-history-watermark {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -52%);
    font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: 200px; line-height: 1; letter-spacing: -6px;
    color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, 0.07); white-space: nowrap;
    pointer-events: none; user-select: none;
}
.pd-history-overline {
    position: relative; display: inline-flex; align-items: center; gap: 14px; margin-bottom: 18px;
    font-family: 'Montserrat', sans-serif; font-size: 13px; font-weight: 700; letter-spacing: 5px; color: var(--pd-red);
}
.pd-history-overline::before, .pd-history-overline::after { content: ""; width: 38px; height: 2px; background: var(--pd-red); }
.pd-history-title {
    position: relative; margin: 0 0 18px; color: #fff;
    font-family: 'Montserrat', sans-serif; font-size: 46px; line-height: 1.15; font-weight: 800; letter-spacing: 1px;
}
.pd-history-lead { position: relative; margin: 0; font-size: 17px; line-height: 1.7; color: #9d9d9d; }

/* ---------- Achse (Zollstock) ---------- */
/* Breiter als der Seiteninhalt, damit die Kennzahlen jeder Karte in eine Zeile passen.
   Unten 90px Luft: Die Achse reicht genau bis an die Oberkante des "Heute"-Blocks */
.pd-tl { position: relative; max-width: 1320px; margin: 0 auto; padding: 0 20px 90px; }
.pd-tl-axis {
    position: absolute; z-index: 1; top: 0; bottom: 0; left: 50%; width: 4px; margin-left: -2px;
    background: var(--pd-line); border-radius: 2px;
}
.pd-tl-axis::before {
    content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 22px; margin-left: -11px;
    background:
        repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.20) 0 2px, transparent 2px 120px),
        repeating-linear-gradient(to bottom, transparent 0 20px, rgba(255, 255, 255, 0.09) 20px 21px, transparent 21px 24px);
    background-size: 22px 100%, 12px 100%;
    background-position: center top, center top;
    background-repeat: repeat-y;
    pointer-events: none;
}
.pd-tl-fill {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, #ff4a50, var(--pd-red) 45%, #c4121a);
    border-radius: 2px; box-shadow: 0 0 18px rgba(237, 27, 36, 0.55);
}
.pd-js .pd-tl-fill { height: 0; }
.pd-tl-fill::after {
    content: ""; position: absolute; left: 50%; bottom: -8px; width: 16px; height: 16px; margin-left: -8px;
    border-radius: 50%; background: #fff;
    box-shadow: 0 0 0 4px rgba(237, 27, 36, 0.5), 0 0 26px 8px rgba(237, 27, 36, 0.75);
    transition: opacity 0.3s ease;
}
/* Schlusspunkt am Ende der Achse, leuchtet auf, sobald die Linie ganz gefüllt ist */
.pd-tl-axis::after {
    content: ""; position: absolute; left: 50%; bottom: -11px; width: 22px; height: 22px; margin-left: -11px;
    box-sizing: border-box; border-radius: 50%; border: 3px solid #3b3b3b;
    background: radial-gradient(circle, #3b3b3b 0 4px, var(--pd-bg) 4.5px);
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
}
.pd-complete .pd-tl-fill::after, .pd-history:not(.pd-js) .pd-tl-fill::after { opacity: 0; }
.pd-complete .pd-tl-axis::after, .pd-history:not(.pd-js) .pd-tl-axis::after {
    border-color: var(--pd-red);
    background: radial-gradient(circle, #fff 0 4px, var(--pd-red) 4.5px);
    box-shadow: 0 0 0 7px rgba(237, 27, 36, 0.14), 0 0 26px rgba(237, 27, 36, 0.6);
}

/* ---------- Einträge ---------- */
.pd-tl-list { position: relative; z-index: 2; list-style: none; margin: 0; padding: 0; }
.pd-tl-item {
    position: relative; display: grid; grid-template-columns: 1fr 1fr; column-gap: 70px;
    align-items: center; margin: 0 0 64px;
}
.pd-tl-item:last-child { margin-bottom: 0; }
.pd-tl-item:nth-child(odd) .pd-tl-card { grid-column: 1; grid-row: 1; }
.pd-tl-item:nth-child(odd) .pd-tl-ghost { grid-column: 2; grid-row: 1; text-align: left; }
.pd-tl-item:nth-child(even) .pd-tl-card { grid-column: 2; grid-row: 1; }
.pd-tl-item:nth-child(even) .pd-tl-ghost { grid-column: 1; grid-row: 1; text-align: right; }

/* großes, ausgehöhltes Jahr auf der freien Seite */
.pd-tl-ghost {
    font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: 128px; line-height: 1; letter-spacing: -4px;
    color: transparent; -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.10);
    transition: -webkit-text-stroke-color 0.8s ease, transform 1s cubic-bezier(.2, .7, .2, 1), opacity 1s ease;
    user-select: none; pointer-events: none;
}
.pd-tl-item.is-active .pd-tl-ghost { -webkit-text-stroke-color: rgba(237, 27, 36, 0.55); }

/* Knoten auf der Achse */
.pd-tl-node {
    position: absolute; left: 50%; top: 50%; z-index: 2; width: 24px; height: 24px; margin: -12px 0 0 -12px;
    border-radius: 50%; background: var(--pd-bg); border: 3px solid #3b3b3b;
    transition: border-color 0.4s ease, box-shadow 0.4s ease, background-color 0.4s ease, transform 0.4s ease;
}
.pd-tl-node::after {
    content: ""; position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px;
    border-radius: 50%; background: #3b3b3b; transition: background-color 0.4s ease;
}
.pd-tl-item.is-active .pd-tl-node {
    border-color: var(--pd-red); transform: scale(1.1);
    box-shadow: 0 0 0 7px rgba(237, 27, 36, 0.14), 0 0 26px rgba(237, 27, 36, 0.6);
}
.pd-tl-item.is-active .pd-tl-node::after { background: var(--pd-red); }

/* Karte */
.pd-tl-card {
    position: relative; padding: 30px 28px 28px; border-radius: 10px;
    background: linear-gradient(150deg, #1f1f1f 0%, var(--pd-card) 60%, #171717 100%);
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
    transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}
.pd-tl-card:hover { transform: translateY(-4px); border-color: rgba(237, 27, 36, 0.45); box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45); }
/* Verbindungslinie Karte -> Achse */
.pd-tl-card::after {
    content: ""; position: absolute; top: 50%; width: 22px; height: 2px; margin-top: -1px;
    background: #333; transition: background 0.4s ease;
}
.pd-tl-item:nth-child(odd) .pd-tl-card::after { right: -23px; }
.pd-tl-item:nth-child(even) .pd-tl-card::after { left: -23px; }
.pd-tl-item.is-active .pd-tl-card::after { background: linear-gradient(90deg, rgba(237, 27, 36, 0.2), var(--pd-red)); }
.pd-tl-item:nth-child(even).is-active .pd-tl-card::after { background: linear-gradient(90deg, var(--pd-red), rgba(237, 27, 36, 0.2)); }

.pd-tl-year {
    display: inline-block; margin-bottom: 12px; padding: 5px 12px; border-radius: 4px;
    background: rgba(237, 27, 36, 0.12); color: #ff4a50;
    font-family: 'Montserrat', sans-serif; font-size: 14px; font-weight: 800; letter-spacing: 2px;
}
.pd-tl-card h3 {
    margin: 0 0 12px; color: #fff; font-family: 'Montserrat', sans-serif; font-size: 22px; line-height: 1.3; font-weight: 700;
}
.pd-tl-card p { margin: 0; color: var(--pd-text); font-size: 15px; line-height: 1.75; }

/* Kennzahlen-Chips */
.pd-tl-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0 0; padding: 0; list-style: none; }
.pd-tl-chips li {
    display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.10); background: rgba(255, 255, 255, 0.03);
    color: #e2e2e2; font-size: 12.5px; line-height: 1.2;
}
.pd-tl-chips .fa { color: var(--pd-red); font-size: 13px; }
.pd-tl-chips a { color: inherit; text-decoration: none; }
.pd-tl-chips a:hover { color: #fff; text-decoration: underline; }

/* ---------- 2023: Jubiläum ---------- */
.pd-tl-item--special .pd-tl-card {
    border: 0;
    background: linear-gradient(135deg, #d9161f 0%, #b8111a 55%, var(--pd-red-dark) 100%);
    box-shadow: 0 28px 60px rgba(158, 14, 21, 0.45);
}
/* Lichtreflex, der über die Karte wandert (ohne overflow: hidden, damit die Verbindung zur Achse sichtbar bleibt) */
.pd-tl-item--special .pd-tl-card::before {
    content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; border-radius: inherit; pointer-events: none;
    background: linear-gradient(100deg, transparent 42%, rgba(255, 255, 255, 0.26) 50%, transparent 58%) no-repeat;
    background-size: 250% 100%; background-position: 100% 0;
    animation: pd-shine 5.5s ease-in-out 1.2s infinite;
}
@keyframes pd-shine { 0% { background-position: 100% 0; } 35%, 100% { background-position: 0% 0; } }
.pd-tl-item--special .pd-tl-card p { color: rgba(255, 255, 255, 0.92); }
.pd-tl-item--special .pd-tl-year { background: rgba(255, 255, 255, 0.18); color: #fff; }
.pd-tl-item--special .pd-tl-chips li { border-color: rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.12); color: #fff; }
.pd-tl-item--special .pd-tl-chips .fa { color: #fff; }
.pd-tl-item--special .pd-tl-card:hover { border-color: transparent; }
.pd-tl-item--special .pd-tl-card::after { background: rgba(237, 27, 36, 0.6); }
.pd-tl-item--special .pd-tl-ghost { -webkit-text-stroke-color: rgba(237, 27, 36, 0.35); }

.pd-tl-special-head { display: flex; align-items: center; gap: 20px; margin-bottom: 16px; }
.pd-tl-special-head h3 { margin: 6px 0 0; }
.pd-tl-medal {
    position: relative; flex: 0 0 auto; width: 92px; height: 92px; border-radius: 50%;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: radial-gradient(circle at 35% 30%, #ffffff, #f1f1f1 60%, #dcdcdc);
    color: #c4121a; box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3), 0 0 0 5px rgba(255, 255, 255, 0.22);
}
.pd-tl-medal::before {
    content: ""; position: absolute; inset: -11px; border-radius: 50%;
    border: 2px dashed rgba(255, 255, 255, 0.55); animation: pd-spin 22s linear infinite;
}
@keyframes pd-spin { to { transform: rotate(360deg); } }
.pd-tl-medal strong { font-family: 'Montserrat', sans-serif; font-size: 36px; line-height: 1; font-weight: 800; }
.pd-tl-medal span { margin-top: 3px; font-family: 'Montserrat', sans-serif; font-size: 10px; font-weight: 700; letter-spacing: 3px; color: #555; }

.pd-tl-item--special .pd-tl-node { width: 34px; height: 34px; margin: -17px 0 0 -17px; }
.pd-tl-item--special .pd-tl-node::after { display: none; }
.pd-tl-node .fa { position: absolute; left: 0; right: 0; top: 50%; margin-top: -7px; text-align: center; font-size: 13px; line-height: 14px; color: #666; transition: color 0.4s ease; }
.pd-tl-item.is-active .pd-tl-node .fa { color: #fff; }
.pd-tl-item--special.is-active .pd-tl-node { background: var(--pd-red); animation: pd-pulse 2.4s ease-out infinite; }
@keyframes pd-pulse {
    0% { box-shadow: 0 0 0 0 rgba(237, 27, 36, 0.55), 0 0 26px rgba(237, 27, 36, 0.6); }
    70% { box-shadow: 0 0 0 18px rgba(237, 27, 36, 0), 0 0 26px rgba(237, 27, 36, 0.6); }
    100% { box-shadow: 0 0 0 0 rgba(237, 27, 36, 0), 0 0 26px rgba(237, 27, 36, 0.6); }
}

/* ---------- 2026: Finale ---------- */
/* Der Abschluss steht unter der Achse: Die Linie endet mit dem Schlusspunkt auf seiner Oberkante */
.pd-tl-finale-wrap { position: relative; max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.pd-tl-finale {
    position: relative; max-width: 920px; margin: 0 auto; padding: 46px 48px 44px; text-align: center; border-radius: 14px;
    background: radial-gradient(ellipse 80% 70% at 50% 0%, rgba(237, 27, 36, 0.20), transparent 70%), linear-gradient(160deg, #1f1f1f, #151515);
    border: 1px solid rgba(237, 27, 36, 0.35);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: border-color 0.6s ease, box-shadow 0.6s ease;
}
.pd-complete .pd-tl-finale, .pd-history:not(.pd-js) .pd-tl-finale {
    border-color: rgba(237, 27, 36, 0.8);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45), 0 0 60px rgba(237, 27, 36, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.pd-tl-finale .pd-tl-year { margin-bottom: 14px; }
.pd-tl-finale h3 { margin: 0 0 14px; color: #fff; font-family: 'Montserrat', sans-serif; font-size: 34px; font-weight: 800; letter-spacing: 1px; }
.pd-tl-finale > p { max-width: 640px; margin: 0 auto; color: var(--pd-text); font-size: 16px; line-height: 1.75; }
.pd-tl-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 38px 0 36px; padding: 0; list-style: none; }
.pd-tl-stats li { padding: 8px 12px; border-left: 1px solid rgba(255, 255, 255, 0.08); }
.pd-tl-stats li:first-child { border-left: 0; }
.pd-tl-stat-pre { display: block; height: 20px; line-height: 20px; font-size: 13px; color: #8a8a8a; }
.pd-tl-stat-num { display: block; font-family: 'Montserrat', sans-serif; font-size: 58px; line-height: 1.1; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; }
.pd-tl-stat-num em { font-style: normal; color: var(--pd-red); }
.pd-tl-stat-label { display: block; margin-top: 6px; font-family: 'Montserrat', sans-serif; font-size: 12px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; color: #c9c9c9; }
.pd-tl-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.pd-tl-cta a {
    display: inline-flex; align-items: center; gap: 10px; padding: 15px 28px; border-radius: 4px;
    font-family: 'Montserrat', sans-serif; font-size: 13px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}
.pd-tl-cta a:hover { transform: translateY(-2px); }
.pd-tl-cta .pd-btn-primary { background: var(--pd-red); color: #fff; border: 1px solid var(--pd-red); }
.pd-tl-cta .pd-btn-primary:hover { background: #fff; color: var(--pd-red); border-color: #fff; }
.pd-tl-cta .pd-btn-ghost { background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, 0.35); }
.pd-tl-cta .pd-btn-ghost:hover { border-color: #fff; }

/* ---------- Einblend-Animationen (nur mit JavaScript) ---------- */
.pd-js .pd-tl-item .pd-tl-card { opacity: 0; transition: opacity 0.9s ease, transform 0.9s cubic-bezier(.2, .7, .2, 1), border-color 0.35s ease, box-shadow 0.35s ease; }
.pd-js .pd-tl-item:nth-child(odd) .pd-tl-card { transform: translateX(-50px); }
.pd-js .pd-tl-item:nth-child(even) .pd-tl-card { transform: translateX(50px); }
.pd-js .pd-tl-item .pd-tl-ghost { opacity: 0; transform: translateY(30px); }
.pd-js .pd-tl-item.is-visible .pd-tl-card { opacity: 1; transform: none; }
.pd-js .pd-tl-item.is-visible .pd-tl-card:hover { transform: translateY(-4px); }
.pd-js .pd-tl-item.is-visible .pd-tl-ghost { opacity: 1; transform: none; }
.pd-js .pd-tl-finale { opacity: 0; transform: translateY(40px) scale(0.98); transition: opacity 1s ease, transform 1s cubic-bezier(.2, .7, .2, 1), border-color 0.6s ease, box-shadow 0.6s ease; }
.pd-js .pd-tl-finale.is-visible { opacity: 1; transform: none; }

/* Ohne JavaScript: alle Knoten aktiv darstellen */
.pd-history:not(.pd-js) .pd-tl-node { border-color: var(--pd-red); }
.pd-history:not(.pd-js) .pd-tl-node::after { background: var(--pd-red); }
.pd-history:not(.pd-js) .pd-tl-item--special .pd-tl-node { background: var(--pd-red); }
.pd-history:not(.pd-js) .pd-tl-node .fa { color: #fff; }

/* ---------- Bis 1279px: eine Spalte mit der Achse links (zweispaltig wären die Karten zu schmal) ---------- */
@media (max-width: 1279px) {
    .pd-tl, .pd-tl-finale-wrap { max-width: 900px; }
    .pd-history { padding: 80px 0 90px; }
    .pd-history-head { margin-bottom: 60px; }
    .pd-history-watermark { font-size: 110px; letter-spacing: -3px; }
    .pd-history-title { font-size: 34px; }
    /* Achse und Knoten messen vom selben Rand aus (38px), dadurch sitzen alle Punkte exakt auf der Linie.
       Knoten auf Höhe der Jahreszahl (42px). Unten 98px = 56px Abstand zum "Heute"-Block + 42px bis zu seiner Jahreszahl */
    .pd-tl { padding: 0 16px 98px 0; }
    .pd-tl-axis { left: 38px; }
    .pd-tl-item { display: block; margin-bottom: 36px; padding-left: 58px; }
    .pd-tl-ghost { display: none; }
    .pd-tl-node, .pd-tl-item--special .pd-tl-node { left: 38px; top: 42px; }
    .pd-tl-card { padding: 24px 22px 22px; }
    .pd-tl-card::after, .pd-tl-item:nth-child(odd) .pd-tl-card::after, .pd-tl-item:nth-child(even) .pd-tl-card::after { left: -20px; right: auto; top: 41px; width: 20px; }
    .pd-tl-item:nth-child(odd).is-active .pd-tl-card::after { background: linear-gradient(90deg, var(--pd-red), rgba(237, 27, 36, 0.2)); }
    .pd-js .pd-tl-item:nth-child(odd) .pd-tl-card, .pd-js .pd-tl-item:nth-child(even) .pd-tl-card { transform: translateY(30px); }
    /* nach dem Einblenden wieder exakt an ihrem Platz (sonst bleibt die Karte 30px versetzt zum Knoten) */
    .pd-js .pd-tl-item.is-visible .pd-tl-card { transform: none; }
    /* "Heute" steht wie alle Einträge rechts der Achse, die Linie endet mit dem Schlusspunkt auf Höhe der Jahreszahl */
    .pd-tl-finale-wrap { margin-top: -42px; padding: 0 16px 0 58px; }
    .pd-tl-finale { padding: 24px 22px 26px; text-align: left; }
    .pd-tl-finale::after {
        content: ""; position: absolute; left: -20px; top: 41px; width: 20px; height: 2px; margin-top: -1px;
        background: #333; transition: background 0.4s ease;
    }
    .pd-complete .pd-tl-finale::after, .pd-history:not(.pd-js) .pd-tl-finale::after { background: linear-gradient(90deg, var(--pd-red), rgba(237, 27, 36, 0.2)); }
    .pd-tl-finale > p { margin: 0; }
    .pd-tl-finale h3 { font-size: 28px; }
    .pd-tl-stat-num { font-size: 44px; }
    .pd-tl-cta { justify-content: flex-start; }
}
/* Ab Tablet: Die Jubiläumsmedaille ist hier größer, die Jahreszahl sitzt dadurch etwas tiefer */
@media (min-width: 576px) and (max-width: 1279px) {
    .pd-tl-item--special .pd-tl-node { top: 48px; }
    .pd-tl-item--special .pd-tl-card::after, .pd-tl-item--special:nth-child(odd) .pd-tl-card::after, .pd-tl-item--special:nth-child(even) .pd-tl-card::after { top: 47px; }
}
@media (max-width: 575px) {
    .pd-history-title { font-size: 28px; }
    .pd-history-lead { font-size: 15px; }
    .pd-history-overline { letter-spacing: 4px; }
    .pd-history-overline::before, .pd-history-overline::after { width: 24px; }
    .pd-tl-card h3 { font-size: 19px; }
    .pd-tl-chips li { padding: 5px 10px; font-size: 12px; }
    .pd-tl-special-head { gap: 16px; }
    .pd-tl-medal { width: 76px; height: 76px; }
    .pd-tl-medal strong { font-size: 30px; }
    .pd-tl-stats { grid-template-columns: 1fr; margin: 26px 0 28px; }
    .pd-tl-stats li { border-left: 0; border-top: 1px solid rgba(255, 255, 255, 0.08); padding: 16px 0; }
    .pd-tl-stats li:first-child { border-top: 0; }
    .pd-tl-stat-pre:empty { display: none; }
    .pd-tl-cta a { width: 100%; justify-content: center; }
}

/* ---------- Weniger Bewegung, wenn im System eingestellt ---------- */
@media (prefers-reduced-motion: reduce) {
    .pd-history *, .pd-history *::before, .pd-history *::after { animation: none !important; transition: none !important; }
    .pd-js .pd-tl-item .pd-tl-card, .pd-js .pd-tl-item .pd-tl-ghost, .pd-js .pd-tl-finale { opacity: 1; transform: none; }
}
