/* love-story-timeline.css */

@import url('https://fonts.googleapis.com/css2?family=Great+Vibes&family=Playfair+Display:wght@700&family=Poppins:wght@300;400;600&family=Noto+Serif+Tamil:wght@400;700&display=swap');

:root {
    --lst-bg: #eef7ef;
    --lst-primary-sage: #6b9b78;
    --lst-soft-green: #a7c4a0;
    --lst-dark-green: #355e3b;
    --lst-cream-white: #f8faf6;
    --lst-heart-red: #d94b4b;
    --lst-shadow: 0 10px 30px rgba(107, 155, 120, 0.15);
    --lst-glow: 0 0 20px rgba(167, 196, 160, 0.4);
}

.lst-main-frame {
    background-color: var(--lst-bg);
    padding: 100px 20px;
    font-family: 'Poppins', sans-serif;
    overflow: hidden;
    position: relative;
}

/* Header Styles */
.lst-header-area {
    text-align: center;
    margin-bottom: 80px;
    position: relative;
}

.lst-script-the {
    display: block;
    font-family: 'Great Vibes', cursive;
    font-size: 2.5rem;
    color: var(--lst-primary-sage);
    margin-bottom: -15px;
}

.lst-main-title {
    font-family: 'Playfair Display', serif;
    font-size: 4rem;
    color: var(--lst-dark-green);
    letter-spacing: 2px;
    margin: 0;
    text-transform: uppercase;
}

.lst-tamil-kadhai {
    display: block;
    font-family: 'Noto Serif Tamil', serif;
    font-size: 2rem;
    color: var(--lst-soft-green);
    margin-top: 5px;
}

/* Timeline Track */
.lst-timeline-track {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
}

/* Center Line */
.lst-vertical-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--lst-soft-green);
    transform: translateX(-50%);
    z-index: 1;
}

/* Memory Block */
.lst-memory-block {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 60px;
    position: relative;
    z-index: 2;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.lst-memory-block.reveal {
    opacity: 1;
    transform: translateY(0);
}

/* Alternating Layout Logic */
.lst-memory-block:nth-of-type(even) {
    flex-direction: row-reverse;
}

/* Photo Orb */
.lst-photo-orb {
    width: 180px;
    height: 180px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 6px solid var(--lst-cream-white);
    overflow: hidden;
    box-shadow: var(--lst-shadow);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
    background-color: var(--lst-soft-green);
    position: relative;
}

.lst-photo-orb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.lst-photo-orb:hover {
    transform: scale(1.05);
    box-shadow: var(--lst-glow);
}

.lst-photo-orb:hover img {
    transform: scale(1.1);
}

/* Story Content */
.lst-story-content {
    width: 40%;
    padding: 20px;
    text-align: left;
}

.lst-memory-block:nth-of-type(even) .lst-story-content {
    text-align: right;
}

.lst-story-date {
    display: block;
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--lst-dark-green);
    margin-bottom: 10px;
}

.lst-story-text {
    font-size: 1.3rem;
    line-height: 1.6;
    color: var(--lst-dark-green);
    font-weight: 400;
    margin: 0;
}

/* Heart Trackers */
.lst-heart-divider {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--lst-bg);
    padding: 10px 0;
    z-index: 3;
    color: var(--lst-heart-red);
    font-size: 1.2rem;
    animation: pulseHeart 2s infinite;
}

@keyframes pulseHeart {
    0% {
        transform: translateX(-50%) scale(1);
    }

    50% {
        transform: translateX(-50%) scale(1.3);
    }

    100% {
        transform: translateX(-50%) scale(1);
    }
}

/* Floating Hearts Background */
.lst-floating-heart {
    position: absolute;
    color: var(--lst-heart-red);
    opacity: 0.3;
    pointer-events: none;
    z-index: 0;
    animation: floatHeart 10s linear infinite;
}

@keyframes floatHeart {
    0% {
        transform: translateY(0) translateX(0) rotate(0deg) scale(0.5);
        opacity: 0;
    }

    20% {
        opacity: 0.4;
    }

    80% {
        opacity: 0.2;
    }

    100% {
        transform: translateY(-80vh) translateX(var(--drift, 0)) rotate(360deg) scale(1.2);
        opacity: 0;
    }
}

/* Timeline Footer Message */
.lst-footer-message {
    margin-top: 80px;
    padding: 40px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 30px;
    backdrop-filter: blur(5px);
    border: 1px solid var(--lst-soft-green);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    position: relative;
    z-index: 10;
    box-shadow: var(--lst-shadow);
}

.lst-footer-text {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-style: italic;
    color: var(--lst-dark-green);
    line-height: 1.6;
    margin: 0;
}

.lst-footer-sig {
    text-align: right;
    font-family: var(--font-script);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--lst-primary-sage);
    margin-right: 20%;
    margin-top: 15px;
    margin-bottom: 0;
    opacity: 0.8;
}

/* ═══════════════════════════════════════════════════════
   MOBILE ONLY — max-width: 768px
   3-column grid: [image zone] [20px center] [text zone]
   Desktop layout is UNTOUCHED above this block.
   ═══════════════════════════════════════════════════════ */
@media (max-width: 768px) {

    .lst-main-frame {
        padding: 48px 10px 40px;
    }

    .lst-header-area {
        margin-bottom: 20px;
    }

    .lst-main-title {
        font-size: 1.7rem;
        letter-spacing: 1px;
    }

    .lst-tamil-kadhai {
        font-size: 1rem;
    }

    .lst-timeline-track {
        max-width: 100%;
    }

    /*
     * Switch to 3-column grid so the center line zone
     * is always exactly 20px wide and perfectly centered.
     *   col 1 (1fr) = image zone  — image sits flush RIGHT of this col
     *   col 2 (20px)= center line — vertical line passes here
     *   col 3 (1fr) = text zone   — text sits flush LEFT of this col
     */
    .lst-memory-block,
    .lst-memory-block:nth-of-type(even) {
        display: grid;
        grid-template-columns: 1fr 20px 1fr;
        align-items: center;
        flex-direction: unset;
        padding-left: 0;
        text-align: unset;
        margin-bottom: -20px;
    }

    /* ── ODD: image LEFT col, text RIGHT col ── */
    .lst-memory-block:nth-of-type(odd) .lst-photo-orb {
        grid-column: 1;
        grid-row: 1;
        justify-self: end;
        margin-right: 12px;
        margin-left: 6px;
    }

    .lst-memory-block:nth-of-type(odd) .lst-story-content {
        grid-column: 3;
        grid-row: 1;
        text-align: left;
        padding-left: 14px;
        padding-right: 6px;
        width: auto;
        justify-self: start;
    }

    /* ── EVEN: text LEFT col, image RIGHT col ── */
    .lst-memory-block:nth-of-type(even) .lst-photo-orb {
        grid-column: 3;
        grid-row: 1;
        justify-self: start;
        margin-left: 12px;
        margin-right: 6px;
    }

    .lst-memory-block:nth-of-type(even) .lst-story-content {
        grid-column: 1;
        grid-row: 1;
        text-align: right;
        padding-right: 14px;
        padding-left: 6px;
        width: auto;
        justify-self: end;
    }

    /* ── Orb ── */
    .lst-photo-orb {
        width: 72px;
        height: 72px;
        border-width: 3px;
        margin-bottom: 0;
    }

    /* ── Text ── */
    .lst-story-content,
    .lst-memory-block:nth-of-type(even) .lst-story-content {
        padding: 2px 0;
        min-width: 0;
    }

    .lst-story-date {
        font-size: 1rem;
        margin-bottom: 2px;
        line-height: 1.1;
    }

    .lst-story-text {
        font-size: 0.7rem;
        line-height: 1.4;
    }

    /* ── Heart: pinned to the 20px center column ── */
    .lst-heart-divider {
        position: relative;
        left: 49%;
        transform: translateX(-50%);
        width: 18px;
        height: 18px;
        line-height: 18px;
        font-size: 0.55rem;
        margin: 4px 0;
    }

    /* ── Footer ── */
    .lst-footer-message {
        margin-top: 24px;
        padding: 16px;
        border-radius: 14px;
        max-width: 100%;
    }

    .lst-footer-text {
        font-size: 0.8rem;
        line-height: 1.5;
    }

    .lst-footer-sig {
        font-size: 1.1rem;
    }
}