/* =========================================
   HALAMAN INFO (BERITA & PENGUMUMAN)
   Gaya: editorial sekolah, palet navy gelap
   Aksen emas #f5b33c
   ========================================= */

:root {
    --ink: #e8eefb;
    --ink-soft: #c9d6ec;
    --ink-faint: #8fa3c4;
    --paper: #040c1c;
    --card: #101c36;
    --line: rgba(159, 179, 209, 0.16);
    --accent: #f5b33c;
    --accent-soft: rgba(245, 179, 60, 0.12);
    --ink-on-accent: #0b1220;
    --media-bg: #0b1220;
    --font-display: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
    background-color: var(--paper);
    font-family: var(--font-body);
}

.hidden {
    display: none !important;
}

.info-page {
    max-width: 1040px;
    margin: 48px auto 110px;
    padding: 0 22px;
    color: var(--ink);
    font-family: var(--font-body);
}

/* ---------- HEADER ---------- */
.info-header {
    text-align: left;
    margin-bottom: 40px;
    padding-bottom: 24px;
    border-bottom: 2px solid var(--ink);
}

.info-header h1 {
    font-family: var(--font-display);
    font-size: 2.9rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.5px;
    margin: 12px 0 10px;
    color: var(--ink);
}

.info-header p {
    color: var(--ink-soft);
    max-width: 580px;
    margin: 0;
    font-size: 1rem;
    line-height: 1.65;
}

.badge-outline {
    display: inline-block;
    padding: 3px 0;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 1.4px;
    text-transform: uppercase;
    border-bottom: 1px solid var(--accent);
}

/* ---------- FILTER KATEGORI ---------- */
.news-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 6px 22px;
    margin-bottom: 36px;
    border-bottom: 1px solid var(--line);
}

.filter-chip {
    position: relative;
    border: none;
    background: none;
    color: var(--ink-faint);
    padding: 10px 0 12px;
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.15s ease;
}

.filter-chip::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: transparent;
    transition: background 0.15s ease;
}

.filter-chip:hover,
.filter-chip.active {
    color: var(--ink);
}

.filter-chip.active::after {
    background: var(--accent);
}

/* ---------- GRID BERITA ---------- */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 28px 24px;
    align-items: stretch;
}

.news-card {
    position: relative;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow: hidden;
    transition: border-color 0.2s ease;
    min-height: 100%;
}

.news-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: transparent;
    transition: background 0.2s ease;
}

.news-card:hover {
    border-color: rgba(245, 179, 60, 0.45);
}

.news-card:hover::before {
    background: var(--accent);
}

.news-card-latest {
    border-color: var(--accent);
}

.news-card-latest::before {
    background: var(--accent);
}

.latest-tag {
    display: inline-block;
    align-self: flex-start;
    background: var(--accent);
    color: var(--ink-on-accent);
    font-family: var(--font-body);
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 3px 8px;
    border-radius: 2px;
    margin-bottom: 2px;
}

/* Foto sampul: blur di belakang + foto utuh di depan */
.news-card-cover-wrap {
    position: relative;
    width: calc(100% + 44px);
    margin: -22px -22px 14px;
    height: 230px;
    overflow: hidden;
    background: var(--media-bg);
    border-bottom: 1px solid var(--line);
}

.news-card-cover-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(22px) brightness(0.9) saturate(0.85);
    transform: scale(1.12);
}

.news-card-cover {
    position: relative;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.news-card-cover-video,
.news-modal-cover-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.news-card-cover-wrap + .latest-tag,
.news-card-cover-wrap + .news-meta {
    margin-top: 12px;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-family: var(--font-body);
    font-size: 0.76rem;
    color: var(--ink-faint);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* Kategori: satu aksen per kategori, saturasi rendah supaya tidak ramai */
.news-category {
    padding: 2px 8px;
    border-radius: 2px;
    font-family: var(--font-body);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    background: rgba(159, 179, 209, 0.08);
    color: var(--ink-soft);
    border: 1px solid var(--line);
    white-space: nowrap;
}

.news-category[data-cat="Kegiatan"]   { background: rgba(91, 141, 214, 0.15); color: #9dc0f0; border-color: rgba(91, 141, 214, 0.35); }
.news-category[data-cat="Pengumuman"] { background: rgba(224, 92, 75, 0.15); color: #f2a095; border-color: rgba(224, 92, 75, 0.35); }
.news-category[data-cat="Seminar"]    { background: rgba(245, 179, 60, 0.12); color: #f5b33c; border-color: rgba(245, 179, 60, 0.35); }
.news-category[data-cat="Lomba"]      { background: rgba(120, 200, 150, 0.14); color: #9fdcb9; border-color: rgba(120, 200, 150, 0.35); }

.news-card h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.3;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card p {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--ink-soft);
    line-height: 1.6;
    margin: 0;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more {
    align-self: flex-start;
    margin-top: 6px;
    background: none;
    border: none;
    padding: 0;
    font-family: var(--font-body);
    color: var(--accent);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}

.read-more:hover {
    text-decoration-thickness: 2px;
}

/* ---------- SKELETON ---------- */
.skeleton-card {
    pointer-events: none;
}

.skeleton-line {
    background: linear-gradient(90deg, #16233f 25%, #1e2d50 50%, #16233f 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.4s infinite;
    border-radius: 2px;
}

.skeleton-badge { width: 72px; height: 18px; border-radius: 2px; }
.skeleton-title { width: 100%; height: 18px; margin-top: 8px; }
.skeleton-title.short { width: 55%; }
.skeleton-text { width: 100%; height: 12px; }

@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ---------- EMPTY STATE ---------- */
.admin-empty {
    grid-column: 1 / -1;
    text-align: left;
    color: var(--ink-faint);
    font-size: 0.92rem;
    padding: 48px 0;
    border-top: 1px dashed var(--line);
}

/* ---------- MODAL BACA BERITA ---------- */
.news-modal {
    position: fixed;
    inset: 0;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    padding-top: 90px;
}

.news-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(3, 7, 16, 0.75);
}

.news-modal-card {
    position: relative;
    background: var(--card);
    max-width: 660px;
    width: 100%;
    max-height: 88vh;
    overflow-y: auto;
    border-radius: 4px;
    padding: 36px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
}

.news-modal-cover-wrap {
    position: relative;
    width: calc(100% + 72px);
    margin: -36px -36px 22px;
    height: 360px;
    overflow: hidden;
    cursor: zoom-in;
    background: var(--media-bg);
    border-bottom: 1px solid var(--line);
}

.news-modal-cover-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(24px) brightness(0.9) saturate(0.85);
    transform: scale(1.12);
}

.news-modal-cover {
    position: relative;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.news-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: var(--card);
    border: 1px solid var(--line);
    width: 34px;
    height: 34px;
    border-radius: 2px;
    font-size: 0.9rem;
    cursor: pointer;
    color: var(--ink);
    line-height: 1;
    z-index: 2;
}

.news-modal-close:hover {
    border-color: var(--accent);
}

.news-modal-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.news-modal-date {
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: var(--ink-faint);
    font-weight: 600;
}

.news-modal-card h2 {
    font-family: var(--font-display);
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--ink);
    margin: 0 0 18px;
    line-height: 1.25;
    padding-right: 24px;
}

.news-modal-body {
    font-family: var(--font-body);
    color: var(--ink-soft);
    font-size: 0.96rem;
    line-height: 1.8;
    white-space: pre-wrap;
}

/* Galeri */
.news-modal-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 26px;
}

.news-modal-gallery-item {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    border-radius: 2px;
    cursor: zoom-in;
    background: var(--media-bg);
}

.news-modal-gallery-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(18px) brightness(0.9) saturate(0.85);
    transform: scale(1.12);
}

.news-modal-gallery-img {
    position: relative;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* ---------- LIGHTBOX ---------- */
.img-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(3, 7, 16, 0.95);
    padding: 30px;
    cursor: zoom-out;
}

.img-lightbox img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 2px;
}

.img-lightbox-close {
    position: absolute;
    top: 20px;
    right: 24px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.25);
    width: 40px;
    height: 40px;
    border-radius: 2px;
    color: #ffffff;
    font-size: 1rem;
    cursor: pointer;
    z-index: 2;
}

.img-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ---------- VIDEO ---------- */
.news-modal-video-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    margin-top: 22px;
    border-radius: 2px;
    overflow: hidden;
    background: #000;
}

.news-modal-video-wrap video {
    width: 100%;
    height: 100%;
    display: block;
}

/* ---------- SHARE ---------- */
.news-share-block {
    margin: 4px 0 16px;
}

.share-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 14px;
    border-radius: 2px;
    border: 1px solid var(--line);
    background: rgba(159, 179, 209, 0.06);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 0.15s ease;
}

.share-toggle-btn:hover {
    border-color: var(--accent);
}

.share-options {
    display: none;
    gap: 8px;
}

.news-share-block.expanded .share-toggle-btn {
    display: none;
}

.news-share-block.expanded .share-options {
    display: flex;
}

.share-icon-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 14px;
    border-radius: 2px;
    border: 1px solid var(--line);
    background: rgba(159, 179, 209, 0.06);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.15s ease;
}

.share-icon-btn:hover {
    border-color: var(--accent);
}

.share-icon-btn.wa {
    background: var(--accent-soft);
    border-color: rgba(245, 179, 60, 0.35);
    color: var(--accent);
}

.share-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: var(--ink-on-accent);
    padding: 10px 18px;
    border-radius: 2px;
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 600;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.share-toast.show {
    opacity: 1;
}

.share-icon-img,
.share-icon-svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 600px) {
    .info-header h1 {
        font-size: 2.2rem;
    }

    .news-card-cover-wrap {
        height: 200px;
    }

    .news-modal-card {
        padding: 24px 20px;
    }

    .news-modal-cover-wrap {
        width: calc(100% + 40px);
        margin: -24px -20px 16px;
        height: 260px;
    }

    .news-modal-gallery-item {
        height: 180px;
    }
}