/* =========================================
   Über Uns Seite (Himmel -> Untergrund)
   ========================================= */

.about-page {
    background-color: #000000;
    display: grid;
    grid-template-columns: 100%;
    grid-template-rows: auto 1fr auto;
}

.about-page::before {
    display: none;
}

.about-page::after {
    display: block;
    background: linear-gradient(to right, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 30%, rgba(0, 0, 0, 0.75) 45%, rgba(0, 0, 0, 0.25) 65%, rgba(0, 0, 0, 0) 85%);
}

/* ================= NEUE HINTERGRUNDSTRUKTUR ================= */
.about-bg-wrapper {
    grid-column: 1;
    grid-row: 1 / -1;
    position: relative;
    width: 100%;
    height: 100%;
    z-index: -2;
    display: flex;
    flex-direction: column;
}

.hauptbild-container {
    position: relative;
    width: 100%;
    flex-shrink: 0;
    z-index: 0;
}

.about-hauptbild {
    width: 100%;
    height: auto;
    display: block;
    flex-shrink: 0;
}

.about-mittelbild {
    width: 100%;
    height: auto;
    margin-top: -15vw;
    position: relative;
    z-index: 1;
    display: block;
    flex-shrink: 0;
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) calc(100% - 10vw), rgba(0,0,0,0) 100%);
    mask-image: linear-gradient(to bottom, rgba(0,0,0,1) calc(100% - 10vw), rgba(0,0,0,0) 100%);
}

.about-kachel {
    width: 100%;
    min-height: 50vh;
    flex-grow: 1;
    background-image: url('images/about_kachel.png');
    background-repeat: repeat-y;
    background-size: 100% auto;
    background-position: top center;
    margin-top: -10vw;
    position: relative;
    z-index: 0;
}

/* ================= Baumrinden-Animation ================= */
@media (min-width: 1024px) {
    .bark-animation-container {
        position: absolute;
        z-index: 5;
        pointer-events: none;
    }

    .bark-frame {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        opacity: 0;
        transition: opacity 0.2s ease;
    }

    .bark-frame.active {
        opacity: 0.75;
    }

    .bark-particle {
        position: absolute;
        background-color: #000000;
        pointer-events: none;
        opacity: 0;
        animation: fallBarkParticle ease-in forwards;
        will-change: transform, opacity;
    }

    /* ================= Blinkender Funke auf rinde_1 ================= */
    .bark-sparkle {
        position: absolute;
        top: 15%;
        right: 25%;
        width: 24px;
        height: 24px;
        z-index: 10;
        pointer-events: none;
        opacity: 0;
        animation: blinkStar 7s infinite cubic-bezier(0.25, 1, 0.5, 1);
    }

    .bark-sparkle::before,
    .bark-sparkle::after {
        content: '';
        position: absolute;
        background: #aaffaa;
        border-radius: 50%;
        box-shadow: 0 0 10px 2px rgba(170, 255, 170, 0.9);
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }
    .bark-sparkle::before { width: 2px; height: 100%; }
    .bark-sparkle::after { width: 100%; height: 2px; }
}

@keyframes fallBarkParticle {
    0% { transform: translate(0, 0) rotate(0deg) scale(1); opacity: 0; }
    10% { opacity: 0.85; }
    80% { opacity: 0.85; }
    100% { transform: translate(var(--dx), var(--dy)) rotate(360deg) scale(0.4); opacity: 0; }
}

@keyframes blinkStar {
    0% { opacity: 0; transform: scale(0) rotate(0deg); }
    8% { opacity: 1; transform: scale(1.2) rotate(45deg); }
    16% { opacity: 0; transform: scale(0) rotate(90deg); }
    100% { opacity: 0; transform: scale(0) rotate(90deg); }
}

@media (max-width: 1023px) {
    .bark-animation-container {
        display: none;
    }
}

/* ================= BEREICH A: Fallende Blätter ================= */
#leaves-container {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 2;
}

.leaf {
    position: absolute;
    border-radius: 0 50% 0 50%;
    opacity: 0;
    will-change: transform, opacity;
    animation: fallLeaf linear infinite, fadeLeaf linear infinite;
    box-shadow: inset 1px 1px 3px rgba(255, 255, 255, 0.1);
}

@keyframes fallLeaf {
    0% {
        transform: translate3d(0, -5vh, 0) rotate(0deg);
    }
    100% {
        transform: translate3d(-15vw, 105vh, 0) rotate(720deg);
    }
}

@keyframes fadeLeaf {
    0% { opacity: 0; }
    10% { opacity: 0.6; }
    80% { opacity: 0.6; }
    100% { opacity: 0; }
}

.about-page header { grid-column: 1; grid-row: 1; }
.about-page .about-main { grid-column: 1; grid-row: 2; z-index: 1; }
.about-page .site-footer { grid-column: 1; grid-row: 3; z-index: 10; }

.about-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding-bottom: 5rem;
}

.about-section {
    width: 100%;
    max-width: 1000px;
    padding: 2rem;
}

.about-timeline {
    max-width: 1296px;
}

/* ================= BEREICH A: Intro ================= */
.about-intro {
    text-align: center;
    padding-top: 5rem;
    padding-bottom: 5rem;
}

.about-intro h1 {
    color: #ffffff;
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    text-shadow: 0 5px 15px rgba(0,0,0,0.8);
}

.about-intro h2 {
    color: #cceeff;
    font-size: 1.5rem;
    margin-bottom: 3rem;
    font-weight: 400;
    line-height: 1.4;
    text-shadow: 0 0 10px rgba(204, 238, 255, 0.3);
}

.intro-text-box {
    text-align: left;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    padding: 3rem;
    border-radius: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.intro-text-box p {
    color: #cccccc;
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}
.intro-text-box p:last-child { margin-bottom: 0; }

.mobile-extra-intro {
    display: none;
}

/* ================= BEREICH A: Weiterlesen-Funktion ================= */
.read-more-toggle {
    display: none;
}

.read-more-wrapper {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.read-more-wrapper-inner {
    overflow: hidden;
}

.read-more-wrapper-inner p:first-child,
.read-more-wrapper-inner .mobile-extra-intro p:first-child,
.read-more-wrapper-inner .desktop-first-p {
    margin-top: 1.5rem;
}

.read-more-btn {
    display: inline-block;
    margin-top: 0;
    color: #aaffaa;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.read-more-btn:hover {
    color: #cceeff;
    text-shadow: 0 0 10px rgba(204, 238, 255, 0.5);
}

.read-more-btn::after { content: 'Weiterlesen ▼'; }
html[lang="en"] .read-more-btn::after { content: 'Read more ▼'; }

.read-more-toggle:checked ~ .read-more-wrapper { grid-template-rows: 1fr; }
.read-more-toggle:checked ~ .read-more-action .read-more-btn::after { content: 'Weniger anzeigen ▲'; }
html[lang="en"] .read-more-toggle:checked ~ .read-more-action .read-more-btn::after { content: 'Show less ▲'; }

.read-more-action {
    position: relative;
    display: inline-block;
    margin-top: 1.5rem;
    z-index: 10;
}

/* ================= Irrlichter am Weiterlesen-Button ================= */
.rm-wisp-1 { width: 10px; height: 10px; top: 2px; left: -20px; animation: wispReadMore1 3s infinite alternate ease-in-out; z-index: 20; }
.rm-wisp-2 { width: 7px; height: 7px; top: 12px; left: -35px; animation: wispReadMore2 2.5s infinite alternate ease-in-out 0.5s; z-index: 20; }

@keyframes wispReadMore1 {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(6px, -6px, 0); }
}
@keyframes wispReadMore2 {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-4px, 5px, 0); }
}

/* ================= Scheue Irrlichter (Oben Links) ================= */
.desktop-shy-wisps {
    position: absolute;
    top: 250px;
    left: 8vw;
    width: 120px;
    height: 120px;
    z-index: 500;
}

.shy-wisp-wrapper { position: absolute; will-change: transform; }
.shy-wisp-w-1 { top: 30px; left: 30px; }
.shy-wisp-w-2 { top: 60px; left: 60px; }
.shy-wisp-w-3 { top: 70px; left: 20px; }

.shy-wisp-1 { width: 14px; height: 14px; animation: wispWobble 3s infinite alternate ease-in-out; }
.shy-wisp-2 { width: 10px; height: 10px; animation: wispWobble 2.5s infinite alternate-reverse ease-in-out; }
.shy-wisp-3 { width: 12px; height: 12px; animation: wispWobble 3.5s infinite alternate ease-in-out 1s; }

/* ================= BEREICH B: Zeitachse ================= */
.section-title {
    text-align: center;
    color: #ffffff;
    font-size: 3rem;
    margin-bottom: 4rem;
    position: relative;
    z-index: 10;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.8);
}

.timeline-wrapper {
    position: relative;
    width: 100%;
}

.scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(10, 25, 15, 0.8);
    border: 2px solid rgba(170, 255, 170, 0.4);
    color: #aaffaa;
    font-size: 1.5rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 100;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(170, 255, 170, 0.2);
}

.scroll-btn:hover {
    background: #aaffaa;
    color: #002200;
    box-shadow: 0 0 25px rgba(170, 255, 170, 0.6);
    transform: translateY(-50%) scale(1.1);
}

.left-btn { left: 10px; }
.right-btn { right: 10px; }

.timeline-mask {
    width: 100%;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, transparent 4rem, black 4rem, black calc(100% - 4rem), transparent calc(100% - 4rem), transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, transparent 4rem, black 4rem, black calc(100% - 4rem), transparent calc(100% - 4rem), transparent 100%);
    transform: translateZ(0);
}

.timeline {
    width: 100%;
    display: flex;
    gap: 3.5rem;
    overflow-x: auto;
    padding: 3rem 5rem;
    scroll-padding: 0 5rem;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.timeline::-webkit-scrollbar { display: none; }

.timeline::after,
.timeline-dots-track::after {
    content: '';
    padding-right: 1px;
}

.timeline-item {
    position: relative;
    flex: 0 0 auto;
    width: 100%;
    scroll-snap-align: start;
    z-index: 10;
}

.timeline-item:hover {
    z-index: 50;
}

@media (min-width: 768px) {
    .timeline-item {
        width: calc(50% - 1.75rem);
    }
}

@media (min-width: 1100px) {
    .timeline-item {
        width: calc(33.3333% - 2.3333rem);
    }
}

/* ================= Entkoppelte Irrlichter-Spur ================= */
.timeline-dots-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 60;
}

.timeline-dots-track {
    display: flex;
    gap: 3.5rem;
    padding: 3rem 5rem;
    overflow-x: hidden;
    width: 100%;
    height: 100%;
}

.timeline-dot-wrapper {
    position: relative;
    flex: 0 0 auto;
    width: 100%;
    height: 100%;
}

@media (min-width: 768px) { .timeline-dot-wrapper { width: calc(50% - 1.75rem); } }
@media (min-width: 1100px) { .timeline-dot-wrapper { width: calc(33.3333% - 2.3333rem); } }

.timeline-dot {
    position: absolute;
    width: 18px;
    height: 18px;
    top: -9px;
    right: -9px;
    border-radius: 50%;
    z-index: 20;
    transition: box-shadow 0.3s ease, background 0.3s ease;
    will-change: transform;
}

.timeline-dot-wrapper:nth-child(odd) .timeline-dot { border: none; background: #aaffaa; box-shadow: 0 0 20px 5px rgba(100, 255, 150, 0.8); animation: wispCard 3.5s infinite alternate ease-in-out; }
.timeline-dot-wrapper:nth-child(even) .timeline-dot { border: none; background: #cceeff; box-shadow: 0 0 20px 5px rgba(150, 200, 255, 0.8); animation: wispCard 2.8s infinite alternate-reverse ease-in-out; }

@keyframes wispCard {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(6px, -6px, 0); }
}


.timeline-dot.is-hovered { box-shadow: 0 0 30px 10px rgba(255, 255, 255, 0.8) !important; background: #ffffff !important; }

.timeline-content {
    padding: 2rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    border-radius: 8px;
    border: 1px solid rgba(170, 255, 170, 0.15);
    transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.timeline-item:hover .timeline-content {
    transform: translateY(-5px);
    background: rgba(10, 25, 15, 0.9);
    border-color: rgba(170, 255, 170, 0.4);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5), 0 0 20px rgba(170, 255, 170, 0.15);
}

.timeline-year {
    position: absolute;
    bottom: -15px;
    right: 5px;
    font-size: 4.5rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.04);
    line-height: 1;
    z-index: 0;
    pointer-events: none;
    transition: transform 0.4s ease, color 0.4s ease;
}

.timeline-item:hover .timeline-year {
    color: rgba(255, 255, 255, 0.08);
    transform: scale(1.1) translate(-5px, -5px);
}

.timeline-content h3 {
    color: #aaffaa;
    text-shadow: 0 0 10px rgba(170, 255, 170, 0.3);
    margin-bottom: 0.8rem;
    font-size: 1.5rem;
    position: relative;
    z-index: 1;
}

.timeline-content p {
    color: #aaaaaa;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

/* ================= BEREICH C: Untergrund (Stimmen) ================= */
.about-voices { padding-top: 4rem; }

.voices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.voice-card {
    background: linear-gradient(135deg, rgba(170, 255, 170, 0.05), rgba(0, 0, 0, 0.6));
    border-left: 3px solid #aaffaa; 
    padding: 2.5rem;
    border-radius: 8px;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.voice-card:hover {
    transform: scale(1.05);
    border-color: #cceeff;
    background: linear-gradient(135deg, rgba(204, 238, 255, 0.05), rgba(0, 0, 0, 0.8));
    box-shadow: 0 10px 25px rgba(170, 255, 170, 0.15);
}

.voice-card p {
    font-style: italic;
    color: #dddddd;
    font-size: 1.15rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.voice-author {
    color: #aaffaa;
    font-weight: bold;
    text-align: right;
    text-shadow: 0 0 8px rgba(170, 255, 170, 0.3);
}

/* ================= BEREICH D: Gästebuch Irrlichter ================= */
.guestbook-wisp-1 {
    position: absolute;
    width: 14px;
    height: 14px;
    top: -10px;
    right: 25px;
    animation: wispWobble 3.5s infinite alternate ease-in-out;
    z-index: 20;
}

.guestbook-wisp-2 {
    position: absolute;
    width: 9px;
    height: 9px;
    top: 20px;
    right: -5px;
    animation: wispWobble 2.8s infinite alternate-reverse ease-in-out;
    z-index: 20;
}

.guestbook-wisp-3 {
    position: absolute;
    width: 11px;
    height: 11px;
    bottom: -10px;
    left: -10px;
    animation: wispWobble 3.2s infinite alternate ease-in-out;
    z-index: 20;
}

@media (max-width: 768px) {
    .about-page::after {
        background: linear-gradient(to right, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.8) 50%, rgba(0, 0, 0, 0) 100%);
    }

    .timeline-wrapper {
        padding-bottom: 70px;
    }
    
    .about-timeline {
        padding-left: 0;
        padding-right: 0;
    }
    .about-timeline .section-title {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .timeline-content { text-align: center; padding: 1.2rem; }
    .timeline-dot-wrapper:nth-child(odd) .timeline-dot, .timeline-dot-wrapper:nth-child(even) .timeline-dot { right: auto; left: 50%; margin-left: -9px; top: -9px; } 
    .about-intro h1 { font-size: 3rem; }
    .desktop-shy-wisps { display: none; }
    .scroll-btn { 
        display: flex;
        top: auto; bottom: 10px; transform: none;
    } 
    .left-btn { left: calc(50% - 60px); }
    .right-btn { right: calc(50% - 60px); }
    
    .timeline-mask {
        -webkit-mask-image: none;
        mask-image: none;
    }

    .timeline {
        padding: 2rem 1rem;
        scroll-padding: 0 1rem;
        gap: 1.5rem;
        -webkit-mask-image: none;
        mask-image: none;
        transform: translateZ(0);
    }
    .timeline-dots-track {
        padding: 2rem 1rem;
        gap: 1.5rem;
    }
    .timeline-item, .timeline-dot-wrapper {
        width: 75vw;
        max-width: 280px;
    }
    .timeline-content h3 {
        font-size: 1.35rem;
    }
    .timeline-content p {
        font-size: 0.95rem;
    }
    .timeline-year {
        font-size: 3.2rem;
        bottom: 0px;
        right: 10px;
    }
    
    .desktop-extra-intro {
        display: none;
    }
    .mobile-extra-intro {
        display: block;
    }
    .read-more-wrapper-inner .desktop-first-p {
        margin-top: 0;
    }
}