/* ═══════════════════════════════════════════════
   System Updates Page – Timeline Design
   ═══════════════════════════════════════════════ */

/* ─── Variables ─── */
:root {
    --upd-brand: #883E74;
    --upd-brand-light: #a85a93;
    --upd-brand-dark: #5c2d50;
    --upd-accent: #d4a574;
    --upd-bg: #faf8f9;
    --upd-bg-card: #ffffff;
    --upd-text: #2d2438;
    --upd-text-muted: #6b5f7a;
    --upd-border: #e8e0e5;
    --upd-shadow: 0 4px 20px rgba(88, 45, 80, 0.08);
    --upd-shadow-hover: 0 8px 32px rgba(88, 45, 80, 0.14);
    --upd-radius: 16px;
    --upd-radius-sm: 10px;
}

/* ─── Page Container ─── */
.upd-page { background: var(--upd-bg); min-height: 100vh; }
.upd-page .container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ═══ 1. Hero ═══ */
.upd-hero {
    background: linear-gradient(160deg, #1f1320 0%, #3a1d34 50%, #5c2d50 100%);
    padding: 100px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.upd-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(212,165,116,0.15) 0%, transparent 70%);
    border-radius: 50%;
}
.upd-breadcrumb {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
    font-size: 14px;
}
.upd-breadcrumb a { color: rgba(255,255,255,0.6); text-decoration: none; }
.upd-breadcrumb a:hover { color: #fff; }
.upd-breadcrumb span { color: rgba(255,255,255,0.4); }
.upd-title {
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 800;
    color: #fff;
    margin: 0 0 16px;
    letter-spacing: -0.5px;
}
.upd-subtitle {
    font-size: clamp(15px, 2vw, 18px);
    color: rgba(255,255,255,0.7);
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.6;
}
.upd-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
}
.upd-stat { text-align: center; }
.upd-stat-num {
    display: block;
    font-size: 36px;
    font-weight: 800;
    color: var(--upd-accent);
    line-height: 1.2;
}
.upd-stat-label {
    font-size: 13px;
    color: rgba(255,255,255,0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ═══ 2. Sticky Tabs ═══ */
.upd-sticky {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--upd-border);
    transition: box-shadow 0.3s;
}
.upd-sticky.scrolled { box-shadow: 0 4px 20px rgba(0,0,0,0.08); }
.upd-tabs {
    display: flex;
    gap: 4px;
    padding: 8px 0;
    overflow-x: auto;
    scrollbar-width: none;
}
.upd-tabs::-webkit-scrollbar { display: none; }
.upd-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    border: none;
    background: transparent;
    border-radius: var(--upd-radius-sm);
    font-size: 15px;
    font-weight: 600;
    color: var(--upd-text-muted);
    cursor: pointer;
    transition: all 0.25s;
    white-space: nowrap;
}
.upd-tab:hover { background: var(--upd-bg); color: var(--upd-text); }
.upd-tab.active {
    background: var(--upd-brand);
    color: #fff;
    box-shadow: 0 4px 12px rgba(136, 62, 116, 0.3);
}
.upd-tab-count {
    font-size: 12px;
    font-weight: 700;
    background: rgba(0,0,0,0.08);
    padding: 2px 8px;
    border-radius: 20px;
}
.upd-tab.active .upd-tab-count { background: rgba(255,255,255,0.25); }

/* ═══ 3. Timeline ═══ */
.upd-timeline-section { padding: 60px 0 80px; }
.upd-panel { display: none; }
.upd-panel.active { display: block; }

.upd-timeline {
    position: relative;
    padding: 20px 0;
}
.upd-tl-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--upd-brand), var(--upd-accent), var(--upd-brand));
    transform: translateX(-50%);
    border-radius: 3px;
}

/* Timeline Item */
.upd-tl-item {
    position: relative;
    width: 50%;
    padding: 16px 0;
}
.upd-tl-right { margin-left: 50%; padding-left: 40px; }
.upd-tl-left  { margin-right: 50%; padding-right: 40px; text-align: right; }

/* Dot */
.upd-tl-dot {
    position: absolute;
    top: 32px;
    width: 16px;
    height: 16px;
    background: var(--upd-brand);
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(136,62,116,0.2);
    z-index: 2;
}
.upd-tl-right .upd-tl-dot { left: -8px; }
.upd-tl-left  .upd-tl-dot { right: -8px; }

/* ═══ 4. Card ═══ */
.upd-card {
    background: var(--upd-bg-card);
    border-radius: var(--upd-radius);
    box-shadow: var(--upd-shadow);
    border: 1px solid var(--upd-border);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}
.upd-card:hover { transform: translateY(-3px); box-shadow: var(--upd-shadow-hover); }

.upd-card-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 20px 24px;
    cursor: pointer;
    position: relative;
    user-select: none;
}
.upd-tl-left .upd-card-head { flex-direction: row-reverse; text-align: right; }

.upd-card-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-shrink: 0;
}
.upd-ver {
    display: inline-block;
    background: linear-gradient(135deg, var(--upd-brand), var(--upd-brand-light));
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}
.upd-date {
    font-size: 13px;
    color: var(--upd-text-muted);
    white-space: nowrap;
}
.upd-card-title {
    flex: 1;
    font-size: 16px;
    font-weight: 700;
    color: var(--upd-text);
    line-height: 1.4;
    margin: 0;
}
.upd-toggle {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: var(--upd-bg);
    border-radius: 50%;
    cursor: pointer;
    color: var(--upd-text-muted);
    transition: transform 0.3s, background 0.3s;
}
.upd-card-head[aria-expanded="true"] .upd-toggle {
    transform: rotate(180deg);
    background: var(--upd-brand);
    color: #fff;
}

/* Card Body (collapsed by default) */
.upd-card-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    padding: 0 24px;
}
.upd-card-head[aria-expanded="true"] + .upd-card-body {
    max-height: 800px;
    padding: 0 24px 24px;
}

.upd-desc {
    font-size: 14px;
    color: var(--upd-text-muted);
    line-height: 1.7;
    margin: 0 0 16px;
}
.upd-feat-h {
    font-size: 14px;
    font-weight: 700;
    color: var(--upd-brand);
    margin: 0 0 10px;
}
.upd-feat-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.upd-feat-list li {
    font-size: 14px;
    color: var(--upd-text);
    line-height: 1.5;
    padding-left: 22px;
    position: relative;
}
.upd-feat-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #48bb78;
    font-weight: 700;
}

/* ═══ 5. Stats Bar ═══ */
.upd-stats-bar {
    background: linear-gradient(135deg, var(--upd-brand), var(--upd-brand-dark));
    padding: 48px 0;
}
.upd-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    text-align: center;
}
.upd-sbar-num {
    display: block;
    font-size: 32px;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
}
.upd-sbar-lbl {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ═══ 6. CTA ═══ */
.upd-cta {
    background: var(--upd-bg);
    padding: 48px 0;
    text-align: center;
}
.upd-cta h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--upd-text);
    margin: 0 0 12px;
}
.upd-cta p {
    font-size: 15px;
    color: var(--upd-text-muted);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ═══ Responsive ═══ */
@media (max-width: 992px) {
    .upd-hero { padding: 80px 0 60px; }
    .upd-stats { gap: 32px; }
    .upd-stats-grid { grid-template-columns: repeat(2, 1fr); }

    /* Timeline: single column */
    .upd-tl-line { left: 20px; }
    .upd-tl-item { width: 100%; margin-left: 0 !important; padding-left: 52px !important; padding-right: 0 !important; text-align: left !important; }
    .upd-tl-right .upd-tl-dot,
    .upd-tl-left  .upd-tl-dot { left: 12px; right: auto; }
    .upd-tl-left .upd-card-head { flex-direction: row; text-align: left; }
}

@media (max-width: 640px) {
    .upd-hero { padding: 60px 0 48px; }
    .upd-stat-num { font-size: 28px; }
    .upd-tabs { gap: 2px; }
    .upd-tab { padding: 12px 14px; font-size: 13px; }
    .upd-tab-count { font-size: 11px; padding: 1px 6px; }
    .upd-timeline-section { padding: 40px 0 60px; }
    .upd-card-head { padding: 16px; gap: 8px; }
    .upd-card-title { font-size: 14px; }
    .upd-ver { font-size: 12px; padding: 3px 10px; }
    .upd-card-body { padding: 0 16px; }
    .upd-card-head[aria-expanded="true"] + .upd-card-body { padding: 0 16px 16px; }
    .upd-stats-bar { padding: 36px 0; }
    .upd-sbar-num { font-size: 24px; }
    .upd-cta { padding: 36px 0; }
    .upd-cta h3 { font-size: 20px; }
}
