/* ============================
   OUR STORY – TIMELINE
   ============================ */

.about-story {
    position: relative;
}

/*
  NOTE:
  The section header on this page now uses the global classes:
  .gnr-section-title, .gnr-section-intro, etc.
  Keeping these legacy selectors is harmless, but they may not be used.
*/
.about-story-title {
    text-align: center;
    font-family: 'Algerian', var(--header-font, serif);
    font-size: 2rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #c8a763;
    margin-bottom: 0.75rem;
    text-shadow:
        0 2px 4px rgba(0,0,0,0.45),
        0 4px 10px rgba(0,0,0,0.35);
}

.about-story-intro {
    max-width: 720px;
    margin: 0 auto 2.5rem;
    text-align: center;
    font-size: 0.99rem;
    line-height: 1.7;
    opacity: 0.95;
}

/* ============================
   TIMELINE LAYOUT
   ============================ */

.about-timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding-left: 1.75rem;
}

/* Vertical line */
.about-timeline-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: -1rem;

    width: 2px;
    background: linear-gradient(
        to bottom,
        rgba(200,167,99,0.2),
        rgba(200,167,99,0.7)
    );
    opacity: 0.7;
}

/* Filled line progress (animated via JS) */
.about-timeline-line::after {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: var(--timeline-progress, 0%);
    background: linear-gradient(
        to bottom,
        rgba(200,167,99,1),
        rgba(200,167,99,0.2)
    );
}

/* List */
.about-timeline-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Each item */
.about-timeline-item {
    position: relative;
    margin-bottom: 2rem;

    /* scroll animation variables */
    --item-scale: 0.96;
    --item-opacity: 0;

    transform: translateY(10px) scale(var(--item-scale));
    opacity: var(--item-opacity);

    transition:
        transform 0.25s ease-out,
        opacity 0.25s ease-out;
}

/* Visible state when scrolled into view */
.about-timeline-item.is-visible {
    --item-opacity: 1;
    transform: translateY(0) scale(var(--item-scale));
}

/* Active (closest to center) */
.about-timeline-item.is-active {
    --item-scale: 1.02;
}

/* Dot */
.about-timeline-dot {
    position: absolute;
    left: -1px;
    top: 50%;

    /* IMPORTANT FIX:
       You previously set transform twice; the second one overwrote centering.
       Combine centering + scaling using CSS variables.
    */
    --dot-scale: 1;
    transform: translateY(-50%) scale(var(--dot-scale));

    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #000;
    border: 2px solid rgba(200,167,99,0.6);
    box-shadow: 0 0 0 4px rgba(200,167,99,0.2);
    transform-origin: center;

    transition:
        transform 0.2s ease-out,
        box-shadow 0.2s ease-out,
        border-color 0.2s ease-out;
}

/* Present item dot a bit brighter */
.about-timeline-item--present .about-timeline-dot {
    border-color: rgba(200,167,99,1);
}

/* Active dot */
.about-timeline-item.is-active .about-timeline-dot {
    --dot-scale: 1.15;
    box-shadow: 0 0 0 6px rgba(200,167,99,0.35);
    border-color: rgba(200,167,99,1);
}

/* Card */
.about-timeline-card {
    margin-left: 2.5rem;
    padding: 1rem 1.25rem;
    border-radius: 10px;
    background: radial-gradient(circle at top left, rgba(200,167,99,0.09), rgba(0,0,0,0.96));
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 8px 20px rgba(0,0,0,0.6);
    text-align: left;
}

/* Date + heading */
.about-timeline-date {
    font-size: 0.85rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #c8a763;
    margin: 0 0 0.3rem;
    opacity: 0.95;
}

.about-timeline-heading {
    font-family: 'Georgia', serif;
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 0.4rem;
    letter-spacing: 0.01em;
}

/* Body text
   If story.php outputs <div class="about-timeline-text"> with wpautop(),
   normalize paragraph spacing so it still looks like the old single <p>.
*/
.about-timeline-text {
    font-size: 0.95rem;
    line-height: 1.7;
    opacity: 0.96;
}

.about-timeline-text p {
    margin: 0;
}

.about-timeline-text p + p {
    margin-top: 0.85rem;
}

/* ============================
   RESPONSIVE
   ============================ */

@media (max-width: 768px) {
    .about-timeline {
        padding-left: 1.5rem;
    }

    .about-timeline-card {
        margin-left: 2.2rem;
        padding: 0.9rem 1rem;
    }

    .about-timeline-item {
        margin-bottom: 1.7rem;
    }
}

@media (max-width: 480px) {
    .about-timeline {
        padding-left: 1.3rem;
    }

    .about-timeline-card {
        margin-left: 2rem;
    }
}