/* ============================================================
   UPDATE CALENDAR — Wireframe log rows
   ============================================================ */

.update-calendar-section {
    padding: 70px 0;
    position: relative;
    z-index: 1;
}

/* ====== عنوان داخل کادر خط‌کشی ====== */
#updates .section-header {
    width: 100% !important;
    max-width: none !important;
    margin: 0 0 34px !important;
    padding: 22px 32px !important;
    position: relative !important;
    text-align: center !important;
    overflow: visible !important;
}

/* خط افقی بالا و پایین کادرِ عنوان — تا لبه‌های صفحه */
#updates .section-header::before {
    content: '' !important;
    position: absolute !important;
    left: calc(-1 * var(--line-ext)) !important;
    right: calc(-1 * var(--line-ext)) !important;
    top: 0 !important;
    bottom: 0 !important;
    height: auto !important;
    border: 0 !important;
    border-top: 1px solid var(--line-strong) !important;
    border-bottom: 1px solid var(--line-strong) !important;
    background: none !important;
    pointer-events: none;
}

/* خطوط عمودی چپ و راست کادرِ عنوان */
#updates .section-header::after {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: auto !important;
    border: 0 !important;
    border-left: 1px solid var(--line-strong) !important;
    border-right: 1px solid var(--line-strong) !important;
    background: none !important;
    box-shadow: none !important;
    pointer-events: none;
}

#updates .section-header h2 {
    margin: 0 0 6px !important;
    font-size: 2rem !important;
}

#updates .section-header p {
    margin: 0 auto !important;
    font-size: .82rem !important;
}

/* ====== لیست لاگ‌ها: تمام‌عرض با دو خط عمودی ====== */
.update-timeline {
    position: relative;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.update-timeline::before,
.update-timeline::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--line-px);
    z-index: 2;
    pointer-events: none;
}

.update-timeline::before { left: 0; }
.update-timeline::after  { right: 0; }

/* ====== هر ردیف لاگ ====== */
.update-item {
    position: relative;
    margin: 0;
    padding: 22px 38px;
    background: transparent;
    transition: background 0.3s ease;
}

/* خط افقی بالای هر ردیف — از چپ و راست تا لبه صفحه */
.update-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: calc(-1 * var(--line-ext));
    right: calc(-1 * var(--line-ext));
    height: 1px;
    background: var(--line-px);
    z-index: 1;
    pointer-events: none;
}

/* خط بسته‌شدن لیست در آخرین ردیف */
.update-item:last-child::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: calc(-1 * var(--line-ext));
    right: calc(-1 * var(--line-ext));
    height: 1px;
    background: var(--line-px);
    z-index: 1;
    pointer-events: none;
}

.update-item:hover {
    background: rgba(255, 255, 255, 0.012);
}

[data-theme="light"] .update-item:hover {
    background: rgba(0, 0, 0, 0.015);
}

/* ====== هدر ردیف ====== */
.update-header {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 12px;
    flex-wrap: wrap;
}

/* خط زیر هدر — تمام‌عرض */
.update-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: calc(-1 * var(--line-ext));
    right: calc(-1 * var(--line-ext));
    height: 1px;
    background: var(--line-px);
    z-index: 1;
    pointer-events: none;
}

.update-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.update-title {
    font-family: 'Vazirmatn', 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
}

.update-server {
    font-family: 'Vazirmatn', 'Inter', sans-serif;
    font-size: 0.85rem;
    color: var(--text-muted);
    opacity: 0.6;
    letter-spacing: 0.3px;
}

/* بج وضعیت */
.update-badge {
    font-family: 'Vazirmatn', 'Inter', sans-serif;
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 4px 10px;
    border: 1px solid;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 1;
    flex: 0 0 auto;
}
.update-badge.danger {
    color: #ff5f56;
    border-color: rgba(255, 95, 86, 0.4);
    background: rgba(255, 95, 86, 0.06);
}
.update-badge.warning {
    color: #ffbd2e;
    border-color: rgba(255, 189, 46, 0.4);
    background: rgba(255, 189, 46, 0.06);
}
.update-badge.ok {
    color: var(--accent);
    border-color: rgba(72, 255, 145, 0.4);
    background: rgba(72, 255, 145, 0.06);
}

/* ====== متن لاگ ====== */
.update-body {
    font-family: 'Vazirmatn', 'Inter', sans-serif;
    font-size: 0.88rem;
    line-height: 1.8;
    color: var(--text);
    opacity: 0.65;
    padding: 16px 0;
}

/* ====== فوتر ردیف (تاریخ و شناسه) ====== */
.update-footer {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-family: 'Vazirmatn', 'Inter', sans-serif;
    font-size: 0.9rem;
    color: var(--text-muted);
    padding-top: 10px;
}

/* خط بالای فوتر — تمام‌عرض */
.update-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: calc(-1 * var(--line-ext));
    right: calc(-1 * var(--line-ext));
    height: 1px;
    background: var(--line-px);
    z-index: 1;
    pointer-events: none;
}

.update-time {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.update-time::before {
    content: '⏱';
    color: var(--accent);
    font-size: 1rem;
}

.update-log-id {
    font-size: 0.85rem;
    opacity: 0.5;
    letter-spacing: 1px;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 768px) {
    .update-calendar-section { padding: 55px 0; }

    #updates .section-header {
        margin-bottom: 28px !important;
        padding: 18px 16px !important;
    }

    #updates .section-header h2 { font-size: 1.45rem !important; }

    #updates .section-header::before {
        left: -1200px !important;
        right: -1200px !important;
    }

    #updates .section-header p { font-size: .78rem !important; }

    .update-item { padding: 18px; }

    .update-item::before,
    .update-item:last-child::after,
    .update-header::after,
    .update-footer::before {
        left: -1200px;
        right: -1200px;
    }

    .update-title { font-size: 0.92rem; }
    .update-badge { font-size: 0.72rem; padding: 3px 8px; }
    .update-body { font-size: 0.82rem; padding: 14px 0; }
    .update-footer {
        font-size: 0.82rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

@media (max-width: 480px) {
    .update-calendar-section { padding: 45px 0; }

    #updates .section-header { padding: 16px 14px !important; }
    #updates .section-header h2 { font-size: 1.2rem !important; }

    .update-item { padding: 16px 14px; }

    .update-title { font-size: 0.85rem; }
    .update-server { font-size: 0.78rem; }
    .update-body { font-size: 0.78rem; line-height: 1.7; padding: 12px 0; }
}
