/* ============================================================
   Timeline Block – Frontend Styles
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&family=Inter:wght@400;500;600&display=swap');

:root {
    --tlb-accent: #E63946;
    --tlb-line:   #1D3557;
    --tlb-card-bg: #ffffff;
    --tlb-shadow: 0 4px 24px rgba(0,0,0,0.08);
    --tlb-radius: 12px;
    --tlb-dot-size: 18px;
    --tlb-line-width: 3px;
}

/* ── Wrapper ─────────────────────────────────────────────── */
.tlb-wrapper {
    font-family: 'Inter', sans-serif;
    padding: 60px 16px;
    box-sizing: border-box;
}

.tlb-empty {
    text-align: center;
    color: #aaa;
    padding: 40px;
    font-family: 'Inter', sans-serif;
}

/* ── Timeline vertical line ─────────────────────────────── */
.tlb-timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

.tlb-timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: var(--tlb-line-width);
    background: var(--tlb-line);
    border-radius: 99px;
    opacity: 0.25;
}

/* ── Each item ───────────────────────────────────────────── */
.tlb-item {
    position: relative;
    width: 46%;
    margin-bottom: 48px;
    box-sizing: border-box;
}

.tlb-item--left  { margin-left: 0; margin-right: auto; padding-right: 40px; }
.tlb-item--right { margin-left: auto; margin-right: 0; padding-left: 40px; }

/* ── Dot on the line ─────────────────────────────────────── */
.tlb-dot {
    position: absolute;
    top: 24px;
    width: var(--tlb-dot-size);
    height: var(--tlb-dot-size);
    border-radius: 50%;
    background: var(--tlb-accent);
    border: 3px solid #fff;
    box-shadow: 0 0 0 3px var(--tlb-line);
    z-index: 2;
    transition: transform 0.3s ease;
}

.tlb-item--left  .tlb-dot { right: calc(-1 * (var(--tlb-dot-size) / 2 + 1.5px)); }
.tlb-item--right .tlb-dot { left:  calc(-1 * (var(--tlb-dot-size) / 2 + 1.5px)); }

.tlb-item:hover .tlb-dot { transform: scale(1.35); }

/* ── Card ────────────────────────────────────────────────── */
.tlb-card {
    background: var(--tlb-card-bg);
    border-radius: var(--tlb-radius);
    box-shadow: var(--tlb-shadow);
    padding: 24px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-top: 4px solid var(--tlb-accent);
}

.tlb-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 36px rgba(0,0,0,0.13);
}

/* ── Date badge ─────────────────────────────────────────── */
.tlb-date {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--tlb-accent);
    background: color-mix(in srgb, var(--tlb-accent) 10%, transparent);
    padding: 4px 10px;
    border-radius: 99px;
    margin-bottom: 12px;
}

/* ── Title ───────────────────────────────────────────────── */
.tlb-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    color: var(--tlb-line);
    margin: 0 0 10px;
    line-height: 1.35;
}

/* ── Description ─────────────────────────────────────────── */
.tlb-desc {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.7;
    margin: 0 0 16px;
}

/* ── Gallery ─────────────────────────────────────────────── */
.tlb-gallery {
    display: grid;
    gap: 8px;
    margin-top: 14px;
}

.tlb-gallery--single { grid-template-columns: 1fr; }
.tlb-gallery--multi  { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }

.tlb-gallery__item {
    overflow: hidden;
    border-radius: 8px;
    aspect-ratio: 4/3;
}

.tlb-gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.45s ease;
}

.tlb-gallery__item:hover img { transform: scale(1.07); }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 680px) {
    .tlb-timeline::before { left: 16px; }

    .tlb-item,
    .tlb-item--left,
    .tlb-item--right {
        width: 100%;
        margin-left: 0;
        padding-left: 48px;
        padding-right: 0;
    }

    .tlb-item--left  .tlb-dot,
    .tlb-item--right .tlb-dot {
        left: 7px;
        right: auto;
    }
}
