/* ===== RESET & DASAR ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Roboto, system-ui, -apple-system, sans-serif;
    background: #f9fafc;
    color: #1e293b;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ===== WRAPPER KONTEN UTAMA ===== */
.entry-content {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1.5rem;
    font-size: 1.125rem;
    color: #334155;
    background: white;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    flex: 1;
}

/* ===== HEADER & NAVIGASI ===== */
header {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
    background: rgba(255,255,255,0.9);
}

header .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

header h1 a {
    color: #0f172a;
    text-decoration: none;
}

header h1 a:hover {
    color: #2563eb;
}

/* Navigasi dengan flex modern */
nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    list-style: none;
    align-items: center;
}

nav ul li a {
    text-decoration: none;
    color: #334155;
    font-weight: 500;
    padding: 0.4rem 0;
    border-bottom: 2px solid transparent;
    transition: 0.2s;
    font-size: 1rem;
}

nav ul li a:hover {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

/* Tombol Contact WhatsApp */
.menu li.menu-contact a {
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white !important;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.3);
    transition: all 0.3s ease;
    margin-left: 0.5rem;
}

.menu li.menu-contact a:hover {
    background: linear-gradient(135deg, #128C7E, #075E54);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(37, 211, 102, 0.4);
    color: white !important;
}

.menu li.menu-contact a:active {
    transform: translateY(0);
}

/* Responsive: pastikan tombol tidak terlalu besar di mobile */
@media (max-width: 768px) {
    .menu li.menu-contact a {
        padding: 0.5rem 1.2rem;
        font-size: 0.95rem;
    }
}

/* Garis pemisah header */
hr {
    border: none;
    height: 1px;
    background: linear-gradient(to right, transparent, #cbd5e1, transparent);
    margin: 0;
}

/* ===== TIPOGRAFI KONTEN ===== */
.entry-content h1 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #0f172a;
    margin: 1.5rem 0 1rem;
    line-height: 1.2;
}

.entry-content h2 {
    font-size: 1.8rem;
    margin: 2rem 0 1rem;
    color: #1e293b;
    border-left: 6px solid #2563eb;
    padding-left: 1rem;
}

.entry-content h3 {
    font-size: 1.4rem;
    margin: 1.5rem 0 0.75rem;
    color: #334155;
}

.entry-content p {
    margin-bottom: 1.5rem;
}

.entry-content a {
    color: #2563eb;
    text-decoration: none;
    border-bottom: 1px dotted #94a3b8;
}

.entry-content a:hover {
    color: #1d4ed8;
    border-bottom-style: solid;
}

/* ===== DAFTAR (LIST) ===== */
.entry-content ul,
.entry-content ol {
    margin: 0 0 1.5rem 1.8rem;
}

.entry-content li {
    margin-bottom: 0.4rem;
}

.entry-content li p {
    display: inline;
}

/* ===== GAMBAR ===== */
.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.alignleft {
    float: left;
    margin: 0.3rem 1.5rem 1rem 0;
    max-width: 50%;
}

.alignright {
    float: right;
    margin: 0.3rem 0 1rem 1.5rem;
    max-width: 50%;
}

.aligncenter {
    display: block;
    margin: 2rem auto;
}

/* ===== GALERI (WORDPRESS GALLERY) ===== */
.wp-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.gallery-item {
    border-radius: 16px;
    overflow: hidden;
    background: #f1f5f9;
    aspect-ratio: 4/3;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* ===== VIDEO CONTAINER ===== */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 20px;
    margin: 2rem 0;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.video-container iframe,
.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ===== HALAMAN BLOG & KATEGORI ===== */
/* Judul halaman blog */
.page-title {
    max-width: 900px;
    margin: 2rem auto 0.5rem;
    padding: 0 1.5rem;
    font-size: 2.5rem;
    color: #0f172a;
}

/* Daftar kategori di blog.php */
.blog-categories {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.blog-categories h3 {
    margin: 0;
    font-size: 1.2rem;
    background: white;
    border-radius: 40px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    transition: 0.2s;
}

.blog-categories h3 a {
    display: block;
    padding: 0.7rem 1.5rem;
    color: #1e293b;
    text-decoration: none;
    font-weight: 500;
    border: 1px solid #e2e8f0;
    border-radius: 40px;
}

.blog-categories h3 a:hover {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

/* Daftar artikel di category.php */
.category-posts {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.2rem;
}

.category-posts h2 {
    margin: 0;
    font-size: 1.4rem;
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
    transition: 0.2s;
    border: 1px solid #eef2f6;
}

.category-posts h2 a {
    display: block;
    padding: 1.2rem 1.8rem;
    color: #0f172a;
    text-decoration: none;
    font-weight: 500;
    border-radius: 20px;
}

.category-posts h2 a:hover {
    background: #f8fafc;
    color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(37,99,235,0.1);
}

/* ===== FOOTER ===== */
footer {
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
    background: white;
    border-top: 1px solid #e2e8f0;
    color: #64748b;
    font-size: 0.95rem;
}

footer hr {
    display: none; /* HR di footer dihilangkan, sudah ada border-top */
}

/* ===== CLEARFIX ===== */
.entry-content::after {
    content: "";
    clear: both;
    display: table;
}

/* ===== INFO TERAKHIR DIPERBAHARUI ===== */
.last-updated {
    margin-top: 2rem;
    font-size: 0.9rem;
    color: #64748b;
    font-style: italic;
    text-align: right;
    border-top: 1px dashed #cbd5e1;
    padding-top: 1rem;
}

/* ===== RECENT UPDATES ===== */
.recent-updates {
    margin-top: 2rem;
    padding: 1.2rem 1.5rem;
    background: #f0f9ff;
    border-left: 4px solid #2563eb;
    border-radius: 12px;
    font-size: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.recent-updates p {
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #0f172a;
}

.recent-updates ul {
    margin: 0.5rem 0 0 1.8rem;
    list-style-type: disc;
}

.recent-updates li {
    margin-bottom: 0.4rem;
}

.recent-updates li a {
    color: #2563eb;
    text-decoration: none;
    border-bottom: 1px dotted #94a3b8;
}

.recent-updates li a:hover {
    color: #1d4ed8;
    border-bottom-style: solid;
}

.recent-updates small {
    color: #64748b;
    font-size: 0.85rem;
    margin-left: 0.3rem;
}

/* ===== RESPONSIVE BREAKPOINTS ===== */
@media (min-width: 640px) {
    .entry-content {
        padding: 0 2rem;
    }
    .category-posts {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .entry-content {
        font-size: 1.2rem;
        padding: 0 2.5rem;
    }
    .category-posts {
        grid-template-columns: repeat(3, 1fr);
    }
    header h1 {
        font-size: 1.8rem;
    }
}

/* ===== PERBAIKAN KECIL UNTUK TABLET ===== */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }
    nav ul {
        justify-content: flex-start;
    }
    .alignleft, .alignright {
        float: none;
        margin: 1rem auto;
        max-width: 100%;
        display: block;
    }
}

/* ===== DARK MODE (OTOMATIS BERDASARKAN PREFERENSI SISTEM) ===== */
@media (prefers-color-scheme: dark) {
    body {
        background: #0a0c10;
        color: #e0e0e0;
    }

    header {
        background: #1a1e24;
        border-bottom-color: #2a2f38;
    }

    header h1 a {
        color: #ffffff;
    }

    nav ul li a {
        color: #b0b0b0;
    }

    nav ul li a:hover {
        color: #80b4ff;
    }

    .menu li.menu-contact a {
        background: linear-gradient(135deg, #1da856, #0e6b5c);
        box-shadow: 0 4px 10px rgba(0,200,0,0.2);
    }

    .entry-content {
        background: #1a1e24;
        color: #cbd5e1;
        box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    }

    .entry-content h1,
    .entry-content h2,
    .entry-content h3 {
        color: #ffffff;
    }

    .entry-content h2 {
        border-left-color: #3b82f6;
    }

    .entry-content a {
        color: #80b4ff;
        border-bottom-color: #3a4a5e;
    }

    .entry-content a:hover {
        color: #a0c4ff;
    }

    .entry-content img {
        box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    }

    .wp-gallery .gallery-item {
        background: #2a2f38;
    }

    .blog-categories h3 a {
        background: #1e1e1e;
        color: #ccc;
        border-color: #2a2f38;
    }

    .blog-categories h3 a:hover {
        background: #3b82f6;
        color: white;
    }

    .category-posts h2 {
        background: #1a1e24;
        border-color: #2a2f38;
    }

    .category-posts h2 a {
        color: #e0e0e0;
    }

    .category-posts h2 a:hover {
        background: #252b33;
        color: #80b4ff;
    }

    .last-updated {
        color: #94a3b8;
        border-top-color: #2a2f38;
    }

    .recent-updates {
        background: #1e293b;
        border-left-color: #3b82f6;
    }

    .recent-updates p {
        color: #ffffff;
    }

    .recent-updates li a {
        color: #80b4ff;
    }

    .recent-updates small {
        color: #94a3b8;
    }

    footer {
        background: #1a1e24;
        border-top-color: #2a2f38;
        color: #94a3b8;
    }
}