/* Announcements page */
.ann-section { padding: clamp(2rem, 4vw, 3.5rem) 0 clamp(2.5rem, 5vw, 4.5rem); }

/* Latest video */
.ann-video {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: clamp(1.25rem, 3vw, 2.5rem);
    align-items: center;
    margin-bottom: clamp(2.5rem, 5vw, 4rem);
    padding: clamp(1rem, 2vw, 1.5rem);
    border: 1px solid var(--border);
    border-radius: 1rem;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}
.ann-video-frame {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border: 0;
    border-radius: 0.75rem;
    background: #000;
    cursor: pointer;
}
.ann-video-frame img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.25s ease; }
.ann-video-frame:hover img { transform: scale(1.02); }
.ann-video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ann-video-play {
    position: absolute;
    top: 50%;
    left: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(8, 31, 59, 0.85);
    color: #fff;
    font-size: 1.5rem;
    transform: translate(-50%, -50%);
}
.ann-video-text h2 { margin-bottom: 0.5rem; font-size: clamp(1.25rem, 1.05rem + 1vw, 1.75rem); font-weight: 700; line-height: 1.45; }
.ann-video-text p { color: var(--text-muted); line-height: 1.8; }
.ann-video-text .news-category { display: inline-block; margin-bottom: 0.5rem; }

/* Filters */
.ann-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.625rem; margin-bottom: 2rem; }
.ann-filter {
    min-height: 44px;
    padding: 0.5rem 1.125rem;
    border: 1px solid var(--border);
    border-radius: 99px;
    background: var(--surface);
    color: var(--text-muted);
    font: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.ann-filter:hover { border-color: var(--primary); color: var(--primary); }
.ann-filter[aria-pressed="true"] { border-color: var(--primary); background: var(--primary); color: #fff; }
[data-theme="dark"] .ann-filter[aria-pressed="true"] { color: #04121f; }

/* Cards */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 1.5rem; align-items: stretch; }
.post-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 1rem;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.post-card:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.post-card[hidden] { display: none; }
.post-media { position: relative; display: block; width: 100%; padding: 0; aspect-ratio: 1; overflow: hidden; border: 0; background: var(--primary-light); cursor: pointer; }
.post-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.post-card:hover .post-media img { transform: scale(1.03); }
.post-count {
    position: absolute;
    inset-block-end: 0.625rem;
    inset-inline-start: 0.625rem;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    border-radius: 99px;
    background: rgba(8, 31, 59, 0.82);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
}
.post-body { display: flex; flex: 1; flex-direction: column; padding: 1.25rem; }
.post-body .news-category { margin-bottom: 0.375rem; }
.post-title { margin-bottom: 0.5rem; font-size: 1.125rem; font-weight: 700; line-height: 1.55; }
.post-title, .post-excerpt { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; }
.post-title { -webkit-line-clamp: 2; }
.post-excerpt { margin-bottom: 0.75rem; color: var(--text-muted); font-size: 1rem; line-height: 1.75; -webkit-line-clamp: 3; }
.post-open {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 44px;
    margin-top: auto;
    padding: 0;
    border: 0;
    background: none;
    color: var(--primary);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
}
.post-open:hover { text-decoration: underline; text-underline-offset: 0.25em; }

.ann-more { margin-top: 2rem; text-align: center; }
.ann-empty { padding: 2rem 0; color: var(--text-muted); text-align: center; }

/* Reader */
.post-dialog {
    width: min(760px, calc(100vw - 2rem));
    max-height: calc(100dvh - 2rem);
    margin: auto;
    padding: 0;
    overflow: auto;
    border: 0;
    border-radius: 1rem;
    background: var(--surface);
    color: var(--text-main);
    box-shadow: var(--shadow-lg);
}
.post-dialog::backdrop { background: rgba(2, 6, 23, 0.7); }
.post-dialog-close {
    position: sticky;
    top: 0.75rem;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: 0.75rem 0.75rem -56px auto;
    border: 0;
    border-radius: 50%;
    background: rgba(8, 31, 59, 0.85);
    color: #fff;
    font-size: 1.125rem;
    cursor: pointer;
}
[dir="rtl"] .post-dialog-close { margin: 0.75rem auto -56px 0.75rem; }
.post-gallery-main { width: 100%; max-height: 60dvh; object-fit: contain; background: #081f3b; }
.post-thumbs { display: flex; gap: 0.5rem; padding: 0.75rem 1.25rem 0; overflow-x: auto; }
.post-thumb { flex: none; width: 72px; height: 72px; padding: 0; overflow: hidden; border: 2px solid transparent; border-radius: 0.5rem; background: none; cursor: pointer; }
.post-thumb[aria-current="true"] { border-color: var(--primary); }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-dialog-title { display: none; }
.post-dialog-body { padding: 1.25rem 1.25rem 1.5rem; }
.post-dialog-text { font-size: 1.0625rem; line-height: 1.95; overflow-wrap: anywhere; white-space: pre-line; }
.post-dialog-link { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px; margin-top: 0.75rem; color: var(--primary); font-weight: 600; }

@media (max-width: 768px) {
    .ann-video { grid-template-columns: minmax(0, 1fr); }
    .post-dialog { width: 100vw; max-width: 100vw; max-height: 100dvh; height: 100dvh; margin: 0; border-radius: 0; }
    .ann-video-play { width: 60px; height: 60px; }
}

/* Publish date */
.post-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.25rem 0.75rem; margin-bottom: 0.5rem; }
.post-meta .news-category { margin-bottom: 0; }
.post-date { color: var(--text-muted); font-size: 0.875rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.post-date i { margin-inline-end: 0.25rem; }
.post-dialog-date { margin-bottom: 0.625rem; color: var(--text-muted); font-size: 0.9375rem; font-weight: 600; }
