:root {
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --text: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --primary-color: #2563eb;
    --link: #0f172a;
    --radius: 10px;
    --max-width: 1080px; /* Diperlebar untuk gaya portal berita */
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0f172a;
        --card-bg: #1e293b;
        --text: #f8fafc;
        --text-muted: #94a3b8;
        --border: #334155;
        --primary-color: #3b82f6;
        --link: #ffffff;
    }
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    overflow-x: hidden;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    padding: 0 16px;
    word-wrap: break-word;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
}

/* Navigasi Header Portal News */
header.news-header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
    margin-bottom: 28px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

header.news-header .nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 16px;
}

header.news-header a.logo {
    font-size: 26px;
    font-weight: 800;
    color: var(--primary-color);
    text-decoration: none;
    letter-spacing: -0.5px;
    text-transform: uppercase;
}

/* GRID HOMEPAGE PORTAL NEWS */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 36px;
}

.news-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.news-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.06);
}

.news-card-thumb {
    width: 100%;
    height: 190px;
    object-fit: cover;
    background: var(--border);
}

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

.news-card-badge {
    align-self: flex-start;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.news-card h2 {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 8px;
}

.news-card h2 a {
    color: var(--text);
    text-decoration: none;
}

.news-card h2 a:hover {
    color: var(--primary-color);
}

.news-card-desc {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 14px;
}

.news-card-meta {
    margin-top: auto;
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--border);
    padding-top: 10px;
}

/* SINGLE POST LAYOUT PORTAL NEWS (720PX CONTAINER) */
.single-container {
    max-width: 760px;
    margin: 0 auto;
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 32px;
    border: 1px solid var(--border);
}

.post-header-news {
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 20px;
}

.post-header-news h1 {
    font-size: 30px;
    font-weight: 800;
    line-height: 1.35;
    color: var(--text);
    margin: 12px 0;
}

.post-meta-news {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* TYPOGRAPHY KONTEN ARTIKEL */
.post-content {
    font-size: 17px;
    line-height: 1.85;
    color: var(--text);
}

.post-content p {
    margin-bottom: 20px;
}

.post-content h2 {
    font-size: 22px;
    font-weight: 700;
    margin: 36px 0 16px 0;
    line-height: 1.35;
    border-left: 4px solid var(--primary-color);
    padding-left: 12px;
}

.post-content figure,
.post-content .wp-block-image {
    max-width: 100% !important;
    width: 100% !important;
    margin: 24px 0 !important;
}

.post-content img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
    border-radius: var(--radius);
}

/* TIKTOK PLAYER RESPONSIVE */
.tiktok-player-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    margin: 24px 0 !important;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
}

/* PAGINATION & FOOTER */
.pagination {
    display: flex;
    justify-content: space-between;
    margin: 30px 0;
}

.pagination a {
    background: var(--card-bg);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 10px 20px;
    border-radius: var(--radius);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

footer {
    border-top: 1px solid var(--border);
    text-align: center;
    padding: 36px 0;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 40px;
    background: var(--card-bg);
}

.ad-container {
    margin: 20px 0;
    text-align: center;
}