/* =========================================
   1. VARIABEL & RESET
   ========================================= */
:root {
    /* Palette Warna */
    --primary-color: #067d00;       /* Hijau Utama */
    --primary-hover: #1dd826;       /* Hijau Gelap (Hover) */
    --accent-color: #dc2626;        /* Merah (Untuk tombol Daftar) */
    --accent-hover: #b91c1c;        /* Merah Gelap */
    --text-dark: #1f2937;           /* Warna Teks Utama */
    --text-light: #6b7280;          /* Warna Teks Meta/Keterangan */
    --bg-body: #f3f4f6;             /* Background Halaman (Abu-abu muda) */
    --bg-card: #ffffff;             /* Background Kartu/Konten */
    
    /* Spacing & Ukuran */
    --container-width: 850px;       /* Lebar maksimal konten bacaan */
    --radius: 12px;                 /* Kebulatan sudut */
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: --bg-body;
    background: var(--bg-body);
    color: var(--text-dark);
    line-height: 1.7;
    font-size: 16px;
    -webkit-font-smoothing: antialiased; /* Font lebih halus di Mac */
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s ease;
}

/* =========================================
   2. LAYOUT & HEADER
   ========================================= */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 20px;
}

header {
    background: #fff;
    padding: 20px 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 4px solid var(--primary-color);
}

header h1 {
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 5px;
}

header p {
    color: var(--text-light);
    font-size: 1rem;
}

nav {
    background: #fff;
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: var(--radius);
    display: inline-block;
}

nav a {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.95rem;
}

nav a:hover {
    text-decoration: underline;
}

/* =========================================
   3. GRID SYSTEM (HOMEPAGE)
   ========================================= */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card h2 {
    font-size: 1.25rem;
    margin-bottom: 10px;
    line-height: 1.4;
    color: #111;
}

.card time {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 15px;
    display: block;
}

.read-more {
    margin-top: auto; /* Mendorong tombol ke bawah */
    color: var(--primary-color);
    font-weight: bold;
    font-size: 0.9rem;
}

.read-more:hover {
    color: var(--primary-hover);
}

/* =========================================
   4. SINGLE POST PAGE (HALAMAN ARTIKEL)
   ========================================= */
.single-post {
    background: #fff;
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* 4.1 Gambar Utama */
.post-image img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 25px;
    border: 1px solid #eee;
}

/* 4.2 Tombol CTA Wrapper */
.cta-wrapper {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 30px 0 40px 0;
    padding: 20px;
    background: #f8fafc;
    border-radius: var(--radius);
    border: 1px dashed #cbd5e1;
}

/* Style Tombol */
.btn {
    display: inline-block;
    padding: 14px 35px;
    border-radius: 50px; /* Tombol bulat lebih modern */
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.95rem;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    min-width: 160px;
}

.btn:active {
    transform: scale(0.98);
    box-shadow: none;
}

/* Tombol Daftar (Merah/Accent - Agar Mendesak) */
.btn-primary {
    background-color: var(--accent-color);
    color: white;
}
.btn-primary:hover {
    background-color: var(--accent-hover);
    box-shadow: 0 6px 12px rgba(220, 38, 38, 0.25);
}

/* Tombol Login (Biru/Primary) */
.btn-secondary {
    background-color: var(--primary-color);
    color: white;
}
.btn-secondary:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 6px 12px rgba(37, 99, 235, 0.25);
}

/* 4.3 Judul & Meta */
.post-title {
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    color: #111;
    margin-bottom: 10px;
    line-height: 1.2;
}

.post-meta {
    text-align: center;
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

/* 4.4 Isi Artikel (Typography Content) */
.post-content {
    font-size: 1.125rem; /* 18px agar enak dibaca */
    color: #374151;
    margin-top: 20px;
}

.post-content p {
    margin-bottom: 1.5em;
}

.post-content h2 { font-size: 1.8rem; margin-top: 40px; margin-bottom: 15px; color: #111; }
.post-content h3 { font-size: 1.5rem; margin-top: 30px; margin-bottom: 10px; color: #111; }

.post-content ul, .post-content ol {
    margin-bottom: 1.5em;
    padding-left: 1.5em;
}
.post-content li { margin-bottom: 0.5em; }

.post-content blockquote {
    border-left: 5px solid var(--primary-color);
    padding-left: 20px;
    font-style: italic;
    color: #555;
    background: #f9fafb;
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
}

/* =========================================
   5. FOOTER
   ========================================= */
footer {
    background: #111;
    color: #888;
    padding: 40px 20px;
    text-align: center;
    margin-top: 60px;
    font-size: 0.9rem;
}

/* =========================================
   6. RESPONSIVE (MOBILE)
   ========================================= */
@media (max-width: 768px) {
    /* Header lebih kecil */
    header h1 { font-size: 1.5rem; }
    
    /* Layout Single Post */
    .single-post { padding: 20px; }
    
    /* Tombol CTA Stack (Atas-Bawah) di HP agar mudah dipencet */
    .cta-wrapper {
        flex-direction: column;
        gap: 15px;
    }
    
    .btn {
        width: 100%; /* Tombol lebar penuh di HP */
    }

    /* Judul lebih kecil di HP */
    .post-title { font-size: 1.8rem; }
    
    .post-content { font-size: 1rem; }
}