/* =======================================================
   GLOBAL THEME VARIABLES
======================================================= */
:root {
    --bg: #f3f4f6;
    --bg-soft: #e5e7eb;
    --card: #ffffff;
    --text: #111827;
    --text-muted: #6b7280;
    --accent: #2563eb;
    --accent-soft: #dbeafe;
    --radius: 18px;
    --shadow: 0 14px 35px rgba(15,23,42,0.12);
}

/* =======================================================
   RESET & BODY
======================================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(circle at top left, #eff6ff, #f9fafb);
    color: var(--text);
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* wrapper utama */
.site-wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 18px 14px 40px;
}

/* =======================================================
   HEADER (LOGO DI TENGAH + NAV DI BAWAH)
======================================================= */

.site-header {
    margin-bottom: 18px;
    padding-top: 8px;
    padding-bottom: 4px;
}

.site-logo {
    font-size: 1.7rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    text-align: center;
    margin-bottom: 8px;
}

.site-logo a {
    color: inherit;
    text-decoration: none;
}

.site-nav {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
}

.site-nav a {
    font-size: 0.9rem;
    color: var(--text-muted);
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
    transition: background 0.2s ease, color 0.2s ease, transform 0.1s ease;
}

.site-nav a:hover {
    background: var(--accent-soft);
    color: var(--accent);
    text-decoration: none;
    transform: translateY(-1px);
}

/* Tagline disembunyikan (kalau masih ada di HTML) */
.site-tagline {
    display: none !important;
}

/* =======================================================
   LIST / HOMEPAGE LAYOUT
======================================================= */

.mag-layout {
    display: grid;
    grid-template-columns: minmax(0, 2.1fr) minmax(0, 1.4fr);
    gap: 22px;
    margin-top: 10px;
}

@media (max-width: 900px) {
    .mag-layout {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* -------------------------------
   HERO CARD
-------------------------------- */

.mag-hero {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.mag-hero img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    display: block;
}

.mag-hero-body {
    padding: 18px 18px 16px;
}

.mag-hero-cat {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 6px;
    letter-spacing: 0.06em;
}

.mag-hero-title {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.mag-hero-title a {
    color: var(--text);
    text-decoration: none;
}

.mag-hero-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.mag-hero-excerpt {
    font-size: 0.95rem;
    color: var(--text);
}

/* -------------------------------
   SIDEBAR LIST
-------------------------------- */

.mag-sidebar-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mag-side-card {
    display: flex;
    gap: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 14px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.mag-side-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.15);
}

.mag-side-card img {
    width: 100px;
    height: 68px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.mag-side-body {
    flex: 1;
}

.mag-side-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text);
}

.mag-side-title a {
    color: inherit;
}

.mag-side-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* -------------------------------
   GRID BERIKUTNYA
-------------------------------- */

.mag-grid {
    margin-top: 24px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 18px;
}

.mag-card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.mag-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
}

.mag-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}

.mag-card-body {
    padding: 12px 13px 14px;
}

.mag-card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.mag-card-title a {
    color: var(--text);
}

.mag-card-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.mag-card-excerpt {
    font-size: 0.87rem;
    color: var(--text);
}

/* =======================================================
   LOAD MORE / INFINITE SCROLL BUTTON
======================================================= */

.load-more-wrap {
    text-align: center;
    margin: 26px 0 10px;
}

.load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 999px;
    border: none;
    background: var(--accent);
    color: #ffffff;
    font-size: 0.9rem;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.3);
    transition: transform 0.1s ease, box-shadow 0.1s ease, opacity 0.1s ease;
}

.load-more-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 32px rgba(37, 99, 235, 0.4);
}

.load-more-btn[disabled] {
    opacity: 0.5;
    cursor: default;
    box-shadow: none;
}

/* =======================================================
   SINGLE POST (POST-CONTAINER) – DIAMBIL DARI post.php
======================================================= */

.post-container {
    background: var(--card);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    margin: 0 auto 40px;
    max-width: 760px;
}

.post-title {
    font-size: 2.1rem;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 10px;
    color: var(--text);
}

.post-meta {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.post-featured {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto 22px;
    border-radius: 12px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    padding: 6px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.06);
    object-fit: cover;
}

.post-content {
    font-size: 1.02rem;
    line-height: 1.7;
    color: var(--text);
}

/* gambar di dalam artikel */
.post-content img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 16px auto;
    border-radius: 12px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    padding: 6px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.06);
}

/* =======================================================
   CROSSLINK BOX DALAM ARTIKEL
======================================================= */

.crosslink-box {
    margin: 18px 0;
    padding: 12px 14px;
    border-radius: 12px;
    background: #f3f4ff;
    border: 1px solid #d4d7ff;
}

.crosslink-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #4f46e5;
    margin-bottom: 4px;
    font-weight: 600;
}

.crosslink-link {
    display: inline-block;
    font-size: 0.98rem;
    font-weight: 600;
    color: #111827;
    text-decoration: none;
}

.crosslink-link:hover {
    text-decoration: underline;
}

.crosslink-cat {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 2px;
}

/* =======================================================
   RELATED POSTS DI SINGLE
======================================================= */

.related-title {
    font-size: 1.3rem;
    margin: 10px auto 15px;
    font-weight: 700;
    max-width: 1100px;
}

.related-grid {
    max-width: 1100px;
    margin: 0 auto 40px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 22px;
}

.related-card {
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: 0.25s ease;
    text-decoration: none;
    color: var(--text);
    display: flex;
    flex-direction: column;
}

.related-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.1);
}

.related-img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.related-body {
    padding: 12px;
}

.related-title-text {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.35;
}

/* =======================================================
   FOOTER
======================================================= */

.site-footer {
    max-width: 1180px;
    margin: 0 auto;
    padding: 16px 14px 26px;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
    border-top: 1px solid rgba(148, 163, 184, 0.3);
}

.site-footer a {
    color: var(--text-muted);
    margin: 0 4px;
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--accent);
    text-decoration: underline;
}

/* =======================================================
   RESPONSIVE TWEAKS
======================================================= */

@media (max-width: 800px) {
    .post-container {
        padding: 18px;
        margin: 0 auto 30px;
    }

    .post-title {
        font-size: 1.7rem;
    }

    .site-wrap {
        padding: 14px 10px 32px;
    }

    .site-logo {
        font-size: 1.4rem;
    }
}

@media (max-width: 500px) {
    .mag-card img {
        height: 140px;
    }

    .mag-hero img {
        height: 220px;
    }
}
.header-ads {
    text-align: center;
    margin: 18px 0;
}
