/* updates.css — Updates & Circulars (.up- prefix) */
/* ===============================================================
   UPDATES PAGE - .up- prefix  (newspaper list style)
   =============================================================== */

/* Page banner - NOT a header. Just a title strip below the main header. */

/* .up-search-form - kept in markup for PHP compatibility but hidden here.
   Search is handled by the main .t360-header-search in the top header. */
.up-search-form {
    display: none !important;
}

/* Body layout */
.up-body { padding: 32px 0 48px; background: var(--bg-warm); }
.up-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 40px;
    align-items: start;
}

/* -- Filter bar -- */
.up-filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
}
.up-filter-pills { display: flex; flex-wrap: wrap; gap: 4px; }
.up-filter-pill {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--ink-40);
    text-decoration: none;
    padding: 4px 10px;
    border: 1px solid var(--border);
    border-radius: 2px;
    background: var(--surface);
    transition: all 0.15s;
    display: flex; align-items: center; gap: 5px;
}
.up-filter-pill:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.up-filter-pill--active { background: var(--ink); color: #fff; border-color: var(--ink); }
.up-filter-count {
    font-size: 0.66rem;
    background: rgba(255,255,255,0.2);
    padding: 1px 5px;
    border-radius: 10px;
}
.up-filter-pill--active .up-filter-count { background: rgba(255,255,255,0.2); }
.up-filter-pill:not(.up-filter-pill--active) .up-filter-count { background: var(--ink-10); color: var(--ink-60); }

.up-clear-filter {
    font-size: 0.77rem;
    color: var(--ink-40);
    text-decoration: none;
    transition: color 0.15s;
    white-space: nowrap;
}
.up-clear-filter:hover { color: var(--primary); }

.up-results-count {
    font-size: 0.81rem;
    color: var(--ink-60);
    margin-bottom: 20px;
}

/* -- Shared tag -- */
.up-tag {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--primary);
    background: var(--green-50);
    border: 1px solid var(--green-100);
    padding: 2px 7px;
    border-radius: 2px;
}

/* -- Lead item (first, prominent) -- */
.up-lead-item {
    display: block;
    text-decoration: none;
    padding: 24px 0 24px;
    border-bottom: 2px solid var(--ink);
    margin-bottom: 4px;
    transition: background 0.15s;
}
.up-lead-item:hover { background: var(--green-25); margin: 0 -12px 4px; padding-left: 12px; padding-right: 12px; }
.up-lead-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.up-item-date {
    font-size: 0.73rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-40);
}
.up-lead-title {
    font-family: 'Merriweather', serif;
    font-size: clamp(1.1rem, 2.2vw, 1.45rem);
    font-weight: 700;
    color: var(--ink);
    line-height: 1.3;
    margin: 0 0 10px;
    letter-spacing: -0.01em;
}
.up-lead-summary {
    font-size: 0.89rem;
    color: var(--ink-60);
    line-height: 1.75;
    margin: 0 0 12px;
    font-weight: 300;
}
.up-read-more {
    font-size: 0.77rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--primary);
    text-transform: uppercase;
}

/* -- Standard list items -- */
.up-list { }
.up-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    text-decoration: none;
    padding: 18px 0;
    border-bottom: 1px solid var(--border);
    transition: all 0.15s;
}
.up-list-item:hover { background: var(--green-25); margin: 0 -12px; padding-left: 12px; padding-right: 12px; }
.up-list-item-body { flex: 1; min-width: 0; }
.up-list-item-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.up-list-title {
    font-family: 'Merriweather', serif;
    font-size: 0.97rem;
    font-weight: 700;
    color: var(--ink);
    margin: 0 0 5px;
    line-height: 1.35;
    letter-spacing: -0.01em;
}
.up-list-summary {
    font-size: 0.83rem;
    color: var(--ink-60);
    line-height: 1.65;
    margin: 0;
    font-weight: 300;
}
.up-list-arrow { color: var(--ink-20); font-size: 0.76rem; flex-shrink: 0; transition: all 0.15s; }
.up-list-item:hover .up-list-arrow { color: var(--primary); transform: translateX(3px); }

/* -- Empty state -- */
.up-empty {
    text-align: center;
    padding: 60px 0;
    color: var(--ink-40);
}
.up-empty i { font-size: 2.5rem; margin-bottom: 12px; display: block; }
.up-empty p { font-size: 0.92rem; margin-bottom: 16px; }
.up-empty a { color: var(--primary); font-size: 0.88rem; }

/* -- Pagination -- */
.up-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 28px 0 8px;
    border-top: 1px solid var(--border);
    margin-top: 8px;
}
.up-page-btn {
    font-size: 0.77rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--primary);
    text-decoration: none;
    padding: 7px 14px;
    border: 1px solid var(--border-med);
    border-radius: 2px;
    background: var(--surface);
    transition: all 0.15s;
    white-space: nowrap;
}
.up-page-btn:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.up-page-btn--disabled { color: var(--ink-20); cursor: default; pointer-events: none; }
.up-page-numbers { display: flex; gap: 4px; align-items: center; }
.up-page-num {
    font-size: 0.81rem;
    font-weight: 600;
    color: var(--ink-60);
    text-decoration: none;
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--border);
    border-radius: 2px;
    background: var(--surface);
    transition: all 0.15s;
}
.up-page-num:hover { background: var(--green-50); color: var(--primary); border-color: var(--green-100); }
.up-page-num--active { background: var(--ink); color: #fff; border-color: var(--ink); }
.up-page-ellipsis { font-size: 0.83rem; color: var(--ink-20); padding: 0 4px; }

/* -- Single article -- */
.up-article-breadcrumb {
    font-size: 0.76rem;
    color: var(--ink-40);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.up-article-breadcrumb a { color: var(--primary); text-decoration: none; }
.up-article-breadcrumb a:hover { color: var(--accent); }
.up-article-breadcrumb span:last-child { color: var(--ink-60); }

.up-article {
    background: var(--surface);
    border: 1px solid var(--border);
    border-top: 3px solid var(--ink);
    padding: 36px 40px;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}
.up-article-meta {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 18px; flex-wrap: wrap;
}
.up-article-date { font-size: 0.77rem; color: var(--ink-40); letter-spacing: 0.05em; }
.up-article-author { font-size: 0.77rem; color: var(--ink-40); }

.up-article-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 24px; }
.up-tag-link {
    font-size: 0.70rem; font-weight: 600;
    letter-spacing: 0.07em; text-transform: uppercase;
    color: var(--ink-60); background: var(--ink-05);
    border: 1px solid var(--border); padding: 3px 9px;
    border-radius: 2px; text-decoration: none; transition: all 0.15s;
}
.up-tag-link:hover { background: var(--green-50); color: var(--primary); border-color: var(--green-100); }

.up-article-body { }

/* -- Sidebar -- */
/* Self-contained sticky panel: capped to viewport height with internal
   scroll, so the sidebar stays pinned as you scroll on BOTH the listing
   and the single-update view, regardless of how tall the main column is.
   (Without the cap, the listing's main column is ~the same height as the
   sidebar, leaving no room for sticky to engage.) */
.up-sidebar {
    position: sticky;
    top: calc(var(--nav-height) + 12px);
    align-self: start;
    max-height: calc(100vh - var(--nav-height) - 24px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.up-sidebar::-webkit-scrollbar { width: 0; height: 0; display: none; }

.up-sidebar-block {
    background: var(--surface);
    border: 1px solid var(--border);
    border-top: 2px solid var(--ink);
    margin-bottom: 20px;
}
.up-sidebar-head {
    font-family: 'Merriweather', serif;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink);
    margin: 0;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--ink-05);
}
.up-sidebar-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    transition: background 0.15s;
}
.up-sidebar-item:last-child { border-bottom: none; }
.up-sidebar-item:hover { background: var(--green-25); }
.up-sidebar-item--active { background: var(--green-50); border-left: 3px solid var(--primary); }
.up-sidebar-tag {
    font-size: 0.64rem; font-weight: 700;
    letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--primary); background: var(--green-50);
    border: 1px solid var(--green-100);
    padding: 2px 5px; border-radius: 2px;
    flex-shrink: 0; margin-top: 2px;
}
.up-sidebar-item-title {
    font-size: 0.82rem; color: var(--ink-80);
    line-height: 1.45; font-weight: 400;
}
.up-sidebar-item:hover .up-sidebar-item-title { color: var(--primary); }

.up-sidebar-advisory {
    background: var(--copper-25);
    border: 1px solid var(--copper-100);
    border-top: 3px solid var(--green-700);
    padding: 18px;
    margin-bottom: 20px;
}
.up-sidebar-advisory-label {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--green-700);
    margin: 0 0 8px;
    font-family: var(--font-sans);
}
.up-sidebar-advisory-text {
    font-size: 0.80rem;
    color: var(--ink-60);
    line-height: 1.75;
    margin: 0 0 14px;
    font-weight: 400;
    font-family: var(--font-sans);
}
.up-sidebar-advisory-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    padding: 7px 14px;
    background: var(--green-700);
    border: none;
    border-radius: var(--radius-sm);
    transition: background 0.18s;
    font-family: var(--font-sans);
}
.up-sidebar-advisory-btn:hover { background: var(--green-600); color: #fff; }

/* -- Updates page - responsive -- */
@media (max-width: 991px) {
    .up-layout {
        grid-template-columns: minmax(0, 1fr);
    }
    .up-main { min-width: 0; }
    .up-sidebar { position: static; display: none; }
}
@media (max-width: 640px) {
    .up-filter-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .up-filter-pills { gap: 5px; }
    .up-filter-pill { font-size: 0.68rem; padding: 5px 9px; }
    .up-search-form { width: 100%; }
    .up-search-form input { width: 100%; }
    .up-lead-item { padding: 18px 0; }
    .up-lead-title { font-size: 1rem; }
    .up-lead-summary { display: none; }
    .up-lead-actions { margin-top: 10px; }
    .up-list-item { padding: 12px 0; }
    .up-list-summary { display: none; }
    .up-results-count { font-size: 0.78rem; margin-bottom: 14px; }
    .up-pagination { flex-direction: column; align-items: center; gap: 10px; }
    .up-article { padding: 20px 18px; }
    .up-article-meta { flex-wrap: wrap; gap: 6px; }
    .up-body { padding: 20px 0 40px; }
}




/* -- Table scroll wrapper - all article types -- */
.cl-article .t360-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 16px 0;
    border: 1px solid var(--border);
    max-width: 100%;
}
.cl-article table,
.cr-article table,
.up-article table,
.content-body table,
.gng-article table {
    width: 100%;
    min-width: 400px;
    border-collapse: collapse;
}
.cl-article table th,
.cr-article table th,
.up-article table th,
.content-body table th,
.gng-article table th {
    background: var(--ink-05);
    border: 1px solid var(--border);
    padding: 9px 12px;
    text-align: left;
    font-weight: 700;
    color: var(--ink-60);
}
.cl-article table td,
.cr-article table td,
.up-article table td,
.content-body table td,
.gng-article table td {
    border: 1px solid var(--border);
    padding: 9px 12px;
    color: var(--ink-70);
    vertical-align: top;
}
.cl-article table tr:nth-child(even) td,
.cr-article table tr:nth-child(even) td,
.up-article table tr:nth-child(even) td,
.content-body table tr:nth-child(even) td,
.gng-article table tr:nth-child(even) td { background: var(--bg-warm); }

