/* ════════════════════════════════════════════════════════════
 * GBI Slawi — news.css
 * Halaman daftar berita & artikel
 * ════════════════════════════════════════════════════════════ */

/* ================================================
   BERITA & ARTIKEL
   ================================================ */

.section-berita {
    padding: 100px 24px 100px;
    background: var(--bg);
}

/* ── PAGE HEADER ── */
.news-page-header {
    text-align: center;
    margin-bottom: 56px;
}

.news-page-header h2 {
    font-size: clamp(28px, 4vw, 44px);
    margin: 12px 0 10px;
    color: var(--text);
}

.news-page-header p {
    font-size: 15px;
    color: var(--text2);
    max-width: 480px;
    margin: 0 auto;
}

/* ── TOOLBAR ── */
.news-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 48px;
}

.news-toolbar-right {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    flex: 1;
    justify-content: flex-end;
}

.news-search-wrap {
    position: relative;
    flex: 1;
    min-width: 200px;
    max-width: 320px;
}

.news-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    pointer-events: none;
    opacity: 0.5;
}

.news-search {
    width: 100%;
    padding: 9px 36px 9px 38px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg3);
    color: var(--text);
    font-size: 13px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.news-search:focus {
    border-color: var(--gold-border);
}

.news-search-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text3);
    cursor: pointer;
    font-size: 12px;
    display: none;
}

.news-search-clear.visible {
    display: block;
}

.news-filter-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.news-archive-select {
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg3);
    color: var(--text2);
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    outline: none;
}

.news-archive-select:focus {
    border-color: var(--gold-border);
}

/* ── SECTION DIVIDER ── */
.news-section-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 56px 0 28px;
    color: var(--text3);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.news-section-divider::before,
.news-section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.news-section-divider span {
    color: var(--text3);
    white-space: nowrap;
}

/* ── HERO (Featured + Side) ── */
.news-hero {
    display: grid;
    grid-template-columns: 1.55fr 1fr;
    gap: 2px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 0;
}

/* ── FEATURED ── */
.news-featured {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    background: var(--bg3);
    transition: background 0.2s;
}

.news-featured:hover {
    background: var(--bg4);
}

.news-featured-img {
    position: relative;
    aspect-ratio: 16/9;
    background: var(--bg4);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.news-img-placeholder {
    font-size: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: var(--bg4);
    min-height: 80px;
}

.news-img-placeholder.sm {
    font-size: 24px;
    min-height: 56px;
}

.news-img-placeholder.xs {
    font-size: 18px;
    min-height: 40px;
    width: 40px;
    flex-shrink: 0;
}

.news-img-placeholder.large {
    font-size: 80px;
    min-height: 320px;
    border-radius: 16px;
}

.news-new-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--gold);
    color: #000;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.12em;
    padding: 3px 8px;
    border-radius: 4px;
}

.news-cat-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 4px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.cat-ibadah {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
}

.cat-pelayanan {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

.cat-komunitas {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}

.cat-pengumuman {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.news-featured-body {
    padding: 24px 28px 28px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.news-featured-title {
    font-size: clamp(20px, 2.2vw, 26px);
    font-weight: 700;
    line-height: 1.4;
    color: var(--text);
    margin: 0;
}

.news-featured:hover .news-featured-title {
    color: var(--gold);
}

.news-featured-desc {
    color: var(--text2);
    font-size: 15px;
    line-height: 1.7;
    flex: 1;
    margin: 0;
}

/* ── META ── */
.news-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    font-size: 13px;
    color: var(--text3);
}

.news-dot {
    color: var(--text3);
    opacity: 0.4;
}

.news-author {
    color: var(--text2);
    font-weight: 500;
}

.news-date,
.news-views,
.news-read-time {
    color: var(--text3);
    font-size: 13px;
}

.news-footer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text3);
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid var(--border);
}

.news-likes {
    cursor: pointer;
    transition: transform 0.15s;
    user-select: none;
    font-size: 13px;
    color: var(--text3);
}

.news-likes:hover {
    transform: scale(1.2);
}

.news-likes.liked {
    color: var(--gold);
}

/* ── SIDE LIST ── */
.news-side-list {
    display: flex;
    flex-direction: column;
    background: var(--bg3);
}

.news-side-label {
    padding: 16px 18px 10px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text3);
    margin: 0;
    border-bottom: 1px solid var(--border);
}

.news-side-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    text-decoration: none;
    color: inherit;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
    flex: 1;
}

.news-side-item:last-child {
    border-bottom: none;
}

.news-side-item:hover {
    background: var(--bg4);
}

.news-side-img {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
}

.news-side-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.news-side-meta {
    display: flex;
    gap: 8px;
    align-items: center;
}

.news-side-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--text);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-side-item:hover .news-side-title {
    color: var(--gold);
}

.news-side-foot {
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 12px;
    color: var(--text3);
    margin-top: 2px;
}

/* ── POPULAR GRID ── */
.news-popular-grid {
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.news-popular-item {
    display: flex;
    gap: 16px;
    align-items: center;
    text-decoration: none;
    color: inherit;
    padding: 16px 20px;
    background: var(--bg3);
    transition: background 0.15s;
}

.news-popular-item:hover {
    background: var(--bg4);
}

.news-popular-rank {
    font-size: 22px;
    font-weight: 900;
    color: var(--border);
    font-family: Georgia, serif;
    min-width: 36px;
    line-height: 1;
}

.news-popular-img {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
}

.news-popular-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.news-popular-body h4 {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--text);
    margin: 0;
}

.news-popular-item:hover h4 {
    color: var(--gold);
}

/* ── NEWS GRID ── */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.news-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    background: var(--bg3);
    transition: background 0.15s;
}

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

.news-card-img {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.news-card-img .news-cat-badge {
    position: absolute;
    bottom: 10px;
    left: 10px;
}

.news-card-body {
    padding: 18px 20px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.news-card-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.5;
    color: var(--text);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card:hover .news-card-title {
    color: var(--gold);
}

.news-card-desc {
    font-size: 13px;
    color: var(--text2);
    line-height: 1.7;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

/* ── EMPTY STATE ── */
.news-empty {
    text-align: center;
    padding: 80px 24px;
    color: var(--text3);
}

.news-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.4;
}

.news-empty-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--text2);
    margin-bottom: 6px;
}

.news-empty-sub {
    font-size: 13px;
}

/* ── PAGINATION ── */
.news-pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin: 48px 0 0;
}

.page-btn {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg3);
    color: var(--text2);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.page-btn:hover,
.page-btn.active {
    background: var(--gold);
    color: #000;
    border-color: var(--gold);
    font-weight: 700;
}

.page-next {
    width: auto;
    padding: 0 18px;
    border-radius: 8px;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
    .news-hero {
        grid-template-columns: 1fr;
    }

    .news-toolbar-right {
        justify-content: flex-start;
    }

    .news-search-wrap {
        max-width: 100%;
    }

    .news-popular-rank {
        display: none;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }
}


/* ── DETAIL PAGE ── */
.news-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text3);
    margin-bottom: 40px;
}

.breadcrumb-link {
    color: var(--text2);
    text-decoration: none;
}

.breadcrumb-link:hover {
    color: var(--gold);
}

.breadcrumb-sep {
    color: var(--text3);
}

.breadcrumb-current {
    color: var(--text);
}

.news-detail-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    align-items: flex-start;
}

.news-detail-header {
    margin-bottom: 28px;
}

.news-detail-title {
    font-size: clamp(24px, 3.5vw, 40px);
    font-weight: 700;
    line-height: 1.3;
    margin: 16px 0;
}

.news-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.news-detail-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg4);
    border: 2px solid var(--gold-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.author-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
}

.author-role {
    font-size: 12px;
    color: var(--text3);
}

.news-detail-info {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--text3);
}

.news-detail-img {
    margin-bottom: 32px;
}

.news-img-caption {
    text-align: center;
    font-size: 12px;
    color: var(--text3);
    margin-top: 10px;
    font-style: italic;
}

.news-detail-content {
    font-size: 16px;
    line-height: 1.9;
    color: var(--text2);
    margin-bottom: 40px;
}

.news-detail-content h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    margin: 32px 0 12px;
}

.news-detail-content p {
    margin-bottom: 16px;
}

.news-lead {
    font-size: 18px !important;
    font-weight: 500;
    color: var(--text) !important;
    line-height: 1.7 !important;
}

.news-quote {
    border-left: 3px solid var(--gold);
    padding: 16px 24px;
    margin: 28px 0;
    background: var(--gold-dim);
    border-radius: 0 12px 12px 0;
}

.news-quote p {
    color: var(--text);
    font-style: italic;
    font-size: 16px;
    margin: 0 0 8px;
}

.news-quote cite {
    font-size: 13px;
    color: var(--text3);
    font-style: normal;
}

/* ── DETAIL ACTIONS ── */
.news-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    padding: 24px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin-bottom: 40px;
}

.news-action-btn {
    padding: 10px 20px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg3);
    color: var(--text2);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.news-action-btn:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.news-action-btn.liked {
    background: var(--gold-dim);
    border-color: var(--gold);
    color: var(--gold);
}

.news-share-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.news-share-label {
    font-size: 13px;
    color: var(--text3);
}

.news-share-btn {
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: transparent;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    color: var(--text2);
}

.news-share-btn.wa:hover {
    border-color: #25D366;
    color: #25D366;
}

.news-share-btn.copy:hover {
    border-color: var(--gold);
    color: var(--gold);
}

/* ── KOMENTAR ── */
.news-comments {
    margin-bottom: 48px;
}

.news-comments-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 24px;
}

.comment-form {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
    align-items: flex-start;
}

.comment-form-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    border: 2px solid var(--border);
}

.comment-form-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.comment-input,
.comment-textarea {
    width: 100%;
    padding: 10px 16px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg3);
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
    resize: vertical;
}

.comment-input:focus,
.comment-textarea:focus {
    border-color: var(--gold-border);
}

.comment-submit {
    align-self: flex-end;
}

.comment-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.comment-item {
    display: flex;
    gap: 12px;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    border: 2px solid var(--border);
}

.comment-body {
    flex: 1;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.comment-name {
    font-weight: 700;
    font-size: 13px;
    color: var(--text);
}

.comment-date {
    font-size: 11px;
    color: var(--text3);
}

.comment-text {
    font-size: 14px;
    color: var(--text2);
    line-height: 1.6;
    margin-bottom: 10px;
}

.comment-actions {
    display: flex;
    gap: 10px;
}

.comment-like-btn,
.comment-reply-btn {
    background: none;
    border: none;
    font-size: 12px;
    color: var(--text3);
    cursor: pointer;
    padding: 2px 8px;
    border-radius: 6px;
    transition: all 0.2s;
    font-family: inherit;
}

.comment-like-btn:hover {
    background: var(--gold-dim);
    color: var(--gold);
}

.comment-reply-btn:hover {
    background: var(--bg4);
    color: var(--text2);
}

/* ── SIDEBAR ── */
.news-detail-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 90px;
}

.sidebar-widget {
    padding: 24px;
}

.sidebar-widget-title {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 16px;
}

.sidebar-news-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.sidebar-news-item {
    display: flex;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

.sidebar-news-item:hover .sidebar-news-title {
    color: var(--gold);
}

.sidebar-news-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-news-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text);
    transition: color 0.2s;
}

.sidebar-news-date {
    font-size: 11px;
    color: var(--text3);
}

.sidebar-categories {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-cat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text2);
    font-size: 13px;
    transition: all 0.2s;
}

.sidebar-cat-item:hover {
    background: var(--bg4);
    color: var(--text);
}

.sidebar-cat-count {
    background: var(--bg4);
    color: var(--text3);
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 999px;
}

/* ── NAVIGASI BERITA ── */
.news-nav-btns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 40px;
}

.news-nav-btn {
    padding: 20px 24px;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.news-nav-btn:hover {
    border-color: var(--gold-border);
}

.news-nav-right {
    text-align: right;
}

.news-nav-dir {
    font-size: 12px;
    color: var(--gold);
    font-weight: 700;
    letter-spacing: 0.04em;
}

.news-nav-title {
    font-size: 13px;
    color: var(--text2);
    line-height: 1.5;
}

/* ── RESPONSIVE BERITA ── */
@media (max-width: 1024px) {
    .news-detail-layout {
        grid-template-columns: 1fr;
    }

    .news-detail-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .section-berita {
        padding-top: calc(65px + 48px);
        padding-left: 16px;
        padding-right: 16px;
    }

    .news-highlight-grid {
        grid-template-columns: 1fr;
    }

    .news-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .news-filter-tabs {
        justify-content: center;
    }

    .news-popular-item {
        flex-wrap: wrap;
    }

    .news-popular-rank {
        font-size: 20px;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .news-nav-btns {
        grid-template-columns: 1fr;
    }

    .news-nav-right {
        text-align: left;
    }

    .news-notif-bar {
        flex-direction: column;
        text-align: center;
    }

    .news-detail-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .news-detail-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .comment-form {
        flex-direction: column;
    }

    .comment-form-avatar {
        display: none;
    }
}
