/* =============================================================================
   History — "The Story of The Pink Elephant" timeline page
   Zigzag layout: vertical pink dotted line, entries alternate left/right
   ============================================================================= */

/* -----------------------------------------------------------------------------
   History page wrapper
   ----------------------------------------------------------------------------- */
.history-page {
    background: var(--color-bg);
    padding-bottom: 80px;
}

/* -----------------------------------------------------------------------------
   Hero banner
   ----------------------------------------------------------------------------- */
.history-hero {
    background: var(--color-pink);
    text-align: center;
    padding: 40px 24px;
}

.history-hero__title {
    font-family: var(--font-primary);
    font-size: clamp(22px, 4vw, 40px);
    font-weight: 700;
    color: var(--color-white);
    line-height: 1.25;
    margin: 0;
}

/* -----------------------------------------------------------------------------
   Timeline outer container
   ----------------------------------------------------------------------------- */
.timeline {
    position: relative;
    max-width: 1100px;
    margin: 60px auto 0;
    padding: 0 24px;
}

/* Vertical dotted center line */
.timeline__line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    background-image: repeating-linear-gradient(
        to bottom,
        var(--color-pink) 0,
        var(--color-pink) 12px,
        transparent 12px,
        transparent 22px
    );
    z-index: 0;
}

/* -----------------------------------------------------------------------------
   Timeline entry — three-column grid:
     [left content] [center marker] [right content]
   ----------------------------------------------------------------------------- */
.timeline__entry {
    display: grid;
    grid-template-columns: 1fr 48px 1fr;
    align-items: start;
    margin-bottom: 60px;
    position: relative;
    z-index: 1;
}

/* Center column: footprint marker on the line */
.timeline__marker {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 8px;
}

.timeline__footprint {
    width: 32px;
    height: auto;
    display: block;
}

/* Content columns */
.timeline__content--left {
    padding-right: 28px;
    text-align: right;
}

.timeline__content--right {
    padding-left: 28px;
    text-align: left;
}

/* Empty placeholder keeps grid balanced */
.timeline__content--empty {
    min-height: 1px;
}

/* -----------------------------------------------------------------------------
   Year heading
   ----------------------------------------------------------------------------- */
.timeline__year {
    font-family: var(--font-primary);
    font-size: clamp(28px, 4.5vw, 52px);
    font-weight: 700;
    color: var(--color-pink);
    line-height: 1;
    margin-bottom: 16px;
}

/* 2022 year appears below the image */
.timeline__year--2022 {
    text-align: center;
    margin-top: 20px;
    margin-bottom: 0;
}

/* -----------------------------------------------------------------------------
   Body text
   ----------------------------------------------------------------------------- */
.timeline__text {
    font-family: var(--font-primary);
    font-size: 14px;
    line-height: 1.7;
    color: var(--color-black);
}

.timeline__text p {
    margin-bottom: 10px;
}

.timeline__text p:last-child {
    margin-bottom: 0;
}

/* FR/DE paragraphs slightly smaller */
.timeline__text p[lang="fr"],
.timeline__text p[lang="de"] {
    font-size: 13px;
    color: #555;
}

/* For text-left entries, year/text are in the left column */
.timeline__entry--text-left .timeline__content--left {
    text-align: right;
}

.timeline__entry--text-left .timeline__content--left .timeline__year {
    text-align: right;
}

/* For text-right entries, year/text are in the right column */
.timeline__entry--text-right .timeline__content--right {
    text-align: left;
}

/* -----------------------------------------------------------------------------
   Illustrations
   ----------------------------------------------------------------------------- */
.timeline__illustration {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    display: block;
}

/* For left-aligned images in text-right entries */
.timeline__content--left .timeline__illustration {
    margin-left: auto;
}

/* Inline illustration (e.g. 1979 hotel image below text) */
.timeline__illustration--inline {
    margin-top: 16px;
    max-width: 180px;
}

/* Multiple images stacked */
.timeline__multi-img {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-end; /* right-align within left column */
}

/* When multi-img is in right column (text-left entries with imgs right) */
.timeline__content--right .timeline__multi-img {
    align-items: flex-start;
}

/* 2022 elephant image — centered */
.timeline__illustration--2022 {
    max-width: 300px;
    margin: 0 auto;
}

/* -----------------------------------------------------------------------------
   Last entry: 2022 — special centered treatment
   ----------------------------------------------------------------------------- */
.timeline__entry--last .timeline__content--right {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* -----------------------------------------------------------------------------
   Responsive — tablet (≤900px): keep two columns but tighter
   ----------------------------------------------------------------------------- */
@media (max-width: 900px) {
    .timeline {
        padding: 0 16px;
    }

    .timeline__entry {
        grid-template-columns: 1fr 36px 1fr;
        margin-bottom: 48px;
    }

    .timeline__content--left {
        padding-right: 18px;
    }

    .timeline__content--right {
        padding-left: 18px;
    }

    .timeline__footprint {
        width: 26px;
    }

    .timeline__year {
        font-size: 26px;
    }
}

/* -----------------------------------------------------------------------------
   Responsive — mobile (≤640px): collapse to single column
   ----------------------------------------------------------------------------- */
@media (max-width: 640px) {

    .timeline__line {
        left: 20px;
    }

    .timeline__entry {
        display: block;
        padding-left: 52px; /* room for the line + footprint */
        margin-bottom: 48px;
        position: relative;
    }

    .timeline__marker {
        position: absolute;
        left: 4px;
        top: 0;
        padding-top: 0;
    }

    .timeline__footprint {
        width: 24px;
    }

    /* All content stacks vertically, full width */
    .timeline__content--left,
    .timeline__content--right {
        padding: 0;
        text-align: left !important;
        margin-bottom: 16px;
    }

    /* On mobile, images go above text regardless of desktop side */
    .timeline__entry--text-left .timeline__content--left,
    .timeline__entry--text-right .timeline__content--left {
        order: 2; /* images after text on mobile */
    }

    /* Actually for readability: year+text first, images after */
    .timeline__entry--text-left .timeline__content--left {
        order: 1; /* year+text */
    }
    .timeline__entry--text-left .timeline__content--right {
        order: 2; /* image */
    }

    .timeline__entry--text-right .timeline__content--right {
        order: 1; /* year+text */
    }
    .timeline__entry--text-right .timeline__content--left {
        order: 2; /* images */
    }

    .timeline__multi-img {
        align-items: flex-start;
    }

    .timeline__content--left .timeline__illustration {
        margin-left: 0;
    }

    .timeline__illustration--inline {
        max-width: 140px;
    }

    .timeline__entry--last .timeline__content--right {
        align-items: flex-start;
        text-align: left;
    }

    .timeline__year--2022 {
        text-align: left;
    }

    .timeline__illustration--2022 {
        max-width: 200px;
        margin: 0;
    }

    .history-hero {
        padding: 28px 16px;
    }
}
