/* =============================================================
   announcements.css — Site News / Announcement cards
   ============================================================= */

/* ── Section wrapper ───────────────────────────────────────── */
.announcements-section { margin-bottom: 1.5rem; }

.announcements-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
}

.announcements-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #212529;
    margin: 0;
}

.ann-total-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #0d6efd;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    padding: 0 5px;
}

/* ── Individual card ───────────────────────────────────────── */
.announcement-card {
    position: relative;
    display: flex;
    gap: 0.85rem;
    padding: 0.85rem 2.6rem 0.85rem 1rem;
    border-radius: 0.5rem;
    border-left: 4px solid var(--ann-border, #9ec5fe);
    background-color: var(--ann-bg, #cfe2ff);
    margin-bottom: 0.6rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease,
                opacity 0.35s ease, max-height 0.4s ease,
                margin-bottom 0.4s ease, padding 0.4s ease;
}

.announcement-card:last-child { margin-bottom: 0; }

.announcement-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.announcement-card.pinned { border-left-width: 5px; }

/* ── Icon column ───────────────────────────────────────────── */
.announcement-icon {
    flex-shrink: 0;
    width: 26px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 0.15rem;
    font-size: 1.1rem;
    color: var(--ann-color, #0a58ca);
}

/* ── Text body ─────────────────────────────────────────────── */
.announcement-body  { flex: 1; min-width: 0; }

.announcement-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.93rem;
    font-weight: 600;
    color: var(--ann-color, #0a58ca);
    margin: 0 0 0.3rem;
    line-height: 1.3;
}

.ann-pin-badge {
    font-size: 0.62rem;
    background: var(--ann-color, #0a58ca);
    color: #fff;
    padding: 1px 6px;
    border-radius: 10px;
    font-weight: 600;
    letter-spacing: 0.03em;
    opacity: 0.85;
}

.ann-type-badge {
    font-size: 0.62rem;
    border: 1px solid var(--ann-border, #9ec5fe);
    color: var(--ann-color, #0a58ca);
    padding: 1px 6px;
    border-radius: 10px;
    font-weight: 500;
    background: rgba(255,255,255,0.5);
}

.announcement-content {
    font-size: 0.875rem;
    color: #333;
    line-height: 1.55;
    margin: 0;
    word-break: break-word;
}

.announcement-meta {
    display: flex;
    gap: 0.85rem;
    flex-wrap: wrap;
    font-size: 0.7rem;
    color: #666;
    margin-top: 0.4rem;
}

.announcement-meta i { margin-right: 0.2rem; }

/* ── Dismiss × button ──────────────────────────────────────── */
.announcement-dismiss {
    position: absolute;
    top: 0.55rem;
    right: 0.6rem;
    background: none;
    border: none;
    color: var(--ann-color, #0a58ca);
    opacity: 0.3;
    cursor: pointer;
    font-size: 0.82rem;
    padding: 0.2rem 0.35rem;
    line-height: 1;
    border-radius: 3px;
    transition: opacity 0.2s, background 0.15s;
}

.announcement-dismiss:hover {
    opacity: 0.75;
    background: rgba(0,0,0,0.08);
}

/* ── Dark theme ────────────────────────────────────────────── */
[data-theme="dark"] .announcements-title { color: var(--text-dark); }

[data-theme="dark"] .announcement-card {
    background: var(--ann-dark-bg, rgba(10,88,202,0.15));
    border-left-color: var(--ann-dark-color, #6ea8fe);
}

[data-theme="dark"] .announcement-icon,
[data-theme="dark"] .announcement-title {
    color: var(--ann-dark-color, #6ea8fe);
}

[data-theme="dark"] .ann-pin-badge {
    background: var(--ann-dark-color, #6ea8fe);
    color: #121212;
}

[data-theme="dark"] .ann-type-badge {
    border-color: var(--ann-dark-color, #6ea8fe);
    color: var(--ann-dark-color, #6ea8fe);
    background: rgba(255,255,255,0.06);
}

[data-theme="dark"] .announcement-content { color: #cfd3d7; }
[data-theme="dark"] .announcement-meta    { color: #8a9ab0; }

[data-theme="dark"] .announcement-dismiss {
    color: var(--ann-dark-color, #6ea8fe);
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 576px) {
    .announcement-card {
        padding: 0.7rem 2.2rem 0.7rem 0.75rem;
        gap: 0.6rem;
    }
    .announcement-icon { width: 20px; font-size: 1rem; }
    .announcement-title { font-size: 0.85rem; }
}