/* ============================================================
   IESA Events — Vertical Timeline
   Extracted from event_list_items.html (Е8-01)
   ============================================================ */

/* ── Timeline item (col-12 wrapper) ── */
.tl-item {
    opacity: 0;
    transform: translateX(-18px);
    transition:
        opacity .5s cubic-bezier(.22,1,.36,1),
        transform .5s cubic-bezier(.22,1,.36,1);
}
.tl-item.tl-visible {
    opacity: 1;
    transform: translateX(0);
}

/* ── Inner grid: dot-column + card-column ── */
.tl-inner {
    display: grid;
    grid-template-columns: 36px 1fr;
    gap: 0 1rem;
    align-items: stretch;
}

/* ── Connector column ── */
.tl-conn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 1.6rem;
}
.tl-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
    transition: transform .3s;
}
.tl-item:hover .tl-dot { transform: scale(1.35); }

.tl-dot--upcoming {
    background: #f87171;
    border: 2px solid rgba(248,113,113,.35);
    box-shadow: 0 0 0 4px rgba(248,113,113,.12);
    animation: tl-dot-pulse 2.2s ease-in-out infinite;
}
.tl-dot--past {
    background: rgba(255,255,255,.13);
    border: 2px solid rgba(255,255,255,.08);
}
@keyframes tl-dot-pulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(248,113,113,.12); }
    50%       { box-shadow: 0 0 0 8px rgba(248,113,113,.04); }
}

/* Vertical line segment between dots */
.tl-line-seg {
    width: 2px;
    flex: 1;
    min-height: 16px;
    background: linear-gradient(to bottom, rgba(255,255,255,.1), rgba(255,255,255,.02));
    border-radius: 2px;
    margin-top: 5px;
}

/* ── Event card ── */
.tl-card {
    background: #111118;
    border: 1.5px solid rgba(255,255,255,.07);
    border-radius: var(--radius-card-alt);
    overflow: hidden;
    position: relative;
    transition:
        border-color .35s cubic-bezier(.22,1,.36,1),
        transform .35s cubic-bezier(.22,1,.36,1),
        box-shadow .35s;
    margin-bottom: .5rem;
}
.tl-card:hover {
    border-color: rgba(220,38,38,.32);
    transform: translateX(6px) translateY(-3px);
    box-shadow: 0 18px 45px rgba(0,0,0,.4), 0 0 0 1px rgba(220,38,38,.1);
}
.tl-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 0% 50%, rgba(220,38,38,.04), transparent 60%);
    opacity: 0;
    transition: opacity .35s;
    pointer-events: none;
}
.tl-card:hover::after { opacity: 1; }

/* ── Card inner: date-chip | thumb | body ── */
.tl-card-inner {
    display: flex;
    align-items: stretch;
}

/* Date chip */
.tl-date-chip {
    min-width: 64px;
    background: rgba(220,38,38,.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem .5rem;
    border-right: 1px solid rgba(255,255,255,.06);
    flex-shrink: 0;
    transition: background .3s;
}
.tl-card:hover .tl-date-chip { background: rgba(220,38,38,.17); }
.tl-date-day {
    font-size: 1.7rem;
    font-weight: 900;
    color: #f87171;
    line-height: 1;
    transition: transform .3s cubic-bezier(.22,1,.36,1);
}
.tl-card:hover .tl-date-day { transform: scale(1.1); }
.tl-date-mon {
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: rgba(255,255,255,.4);
    margin-top: .2rem;
}

/* Thumbnail */
.tl-thumb {
    width: 125px;
    object-fit: cover;
    flex-shrink: 0;
    border-right: 1px solid rgba(255,255,255,.06);
    transition: transform .5s cubic-bezier(.22,1,.36,1), filter .5s;
    display: block;
}
.tl-card:hover .tl-thumb { transform: scale(1.05); filter: brightness(1.06); }
.tl-thumb-ph {
    width: 90px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #1a1a24, #0e0e18);
    border-right: 1px solid rgba(255,255,255,.06);
    flex-shrink: 0;
}

/* Body */
.tl-body {
    padding: .9rem 1.15rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 1;
    min-width: 0;
}
.tl-title {
    font-size: .95rem;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: .25rem;
    transition: color .2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tl-card:hover .tl-title { color: #fff; }
.tl-meta {
    font-size: .78rem;
    color: rgba(255,255,255,.38);
    margin-bottom: .45rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tl-desc {
    font-size: .82rem;
    color: rgba(255,255,255,.4);
    line-height: 1.55;
    margin-bottom: .55rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Live Countdown */
.tl-countdown {
    display: inline-flex;
    align-items: center;
    gap: .38rem;
    background: rgba(220,38,38,.08);
    border: 1px solid rgba(220,38,38,.18);
    border-radius: 8px;
    padding: .22rem .65rem;
    font-size: .76rem;
    font-weight: 700;
    color: #f87171;
    margin-bottom: .5rem;
    width: fit-content;
    font-variant-numeric: tabular-nums;
}
.tl-countdown i { animation: tl-dot-pulse 1.6s ease-in-out infinite; }

/* Capacity bar */
.tl-cap-wrap { margin-bottom: .55rem; }
.tl-cap-label {
    display: flex;
    justify-content: space-between;
    font-size: .72rem;
    color: rgba(255,255,255,.38);
    margin-bottom: .28rem;
}
.tl-cap-track {
    height: 3px;
    background: rgba(255,255,255,.07);
    border-radius: 3px;
    overflow: hidden;
}
.tl-cap-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #22c55e, #4ade80);
    border-radius: 3px;
    transition: width 1.2s cubic-bezier(.22,1,.36,1);
}
.tl-cap-fill--warn { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.tl-cap-fill--full { background: linear-gradient(90deg, #ef4444, #f87171); }

/* Badges */
.tl-badges { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: .55rem; }
.tl-badge { display: inline-flex; align-items: center; gap: .25rem; padding: .14rem .55rem; border-radius: 100px; font-size: .7rem; font-weight: 700; }
.tl-badge--upcoming { background: rgba(34,197,94,.1);  color: #4ade80; border: 1px solid rgba(34,197,94,.2); }
.tl-badge--past     { background: rgba(255,255,255,.05); color: rgba(255,255,255,.38); border: 1px solid rgba(255,255,255,.09); }
.tl-badge--reg      { background: rgba(34,197,94,.1);  color: #4ade80; border: 1px solid rgba(34,197,94,.18); }
.tl-badge--age      { background: rgba(234,179,8,.1);  color: #facc15; border: 1px solid rgba(234,179,8,.18); }
.tl-badge--cap      { background: rgba(99,102,241,.1); color: #a5b4fc; border: 1px solid rgba(99,102,241,.18); }
.tl-badge--full     { background: rgba(255,255,255,.05); color: rgba(255,255,255,.38); border: 1px solid rgba(255,255,255,.09); }

/* Actions */
.tl-actions { display: flex; gap: .45rem; flex-wrap: wrap; }
.tl-btn-ghost {
    background: transparent;
    border: 1.5px solid rgba(255,255,255,.13);
    color: rgba(255,255,255,.52);
    border-radius: 8px; padding: .27rem .8rem;
    font-size: .78rem; font-weight: 600;
    text-decoration: none;
    transition: border-color .2s, color .2s, transform .2s;
}
.tl-btn-ghost:hover { border-color: rgba(255,255,255,.3); color: #fff; transform: translateY(-1px); }
.tl-btn-primary {
    background: rgba(220,38,38,.12);
    border: 1.5px solid rgba(220,38,38,.26);
    color: #f87171;
    border-radius: 8px; padding: .27rem .8rem;
    font-size: .78rem; font-weight: 700;
    text-decoration: none;
    transition: background .2s, color .2s, transform .2s, box-shadow .2s;
}
.tl-btn-primary:hover {
    background: rgba(220,38,38,.24);
    color: #fca5a5; transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(220,38,38,.17);
}

/* ── Empty state ── */
.tl-empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
    animation: ev-float 3s ease-in-out infinite;
    color: rgba(255,255,255,.25);
}
.tl-empty-title { color: rgba(255,255,255,.4); font-weight: 600; }
.tl-empty-sub   { color: rgba(255,255,255,.25); }

@keyframes ev-float {
    0%,100% { transform: translateY(0) rotate(0deg); }
    50%      { transform: translateY(-10px) rotate(3deg); }
}

/* ── Mobile ── */
@media (max-width: 575.98px) {
    .tl-inner { grid-template-columns: 28px 1fr; gap: 0 .65rem; }
    .tl-thumb { width: 70px; }
    .tl-thumb-ph { width: 55px; }
    .tl-date-chip { min-width: 48px; }
    .tl-date-day { font-size: 1.3rem; }
    .tl-title { white-space: normal; }
}
