/* Import Font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700;800&display=swap');

/* Variabel Warna */
:root {
  --bg-light-gradient: linear-gradient(135deg, #e0c3fc 0%, #8ec5fc 100%);
  --text-light: #212529;
  --glass-bg-light: rgba(255, 255, 255, 0.45);
  --glass-border-light: rgba(255, 255, 255, 0.25);
  --primary-color: #0d6efd;
  --meta-text-light: #555;
  
  --bg-dark-gradient: linear-gradient(135deg, #232526 0%, #414345 100%);
  --text-dark: #e0e0e0;
  --glass-bg-dark: rgba(30, 30, 30, 0.6);
  --glass-border-dark: rgba(255, 255, 255, 0.1);
  --meta-text-dark: #adb5bd;
}

/* Style Dasar */
body { font-family: 'Inter', sans-serif; margin: 0; color: var(--text-light); transition: background 0.5s, color 0.3s; background: var(--bg-light-gradient); background-attachment: fixed; }
body.dark-mode { color: var(--text-dark); background: var(--bg-dark-gradient); background-attachment: fixed; }
.container { max-width: 800px; margin: 0 auto; padding: 20px; }
h1, h2 { font-weight: 800; }

/* Preloader */
#preloader { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 9999; display: flex; align-items: center; justify-content: center; background: #1a1a1a; transition: opacity 0.75s ease, visibility 0.75s ease; }
#preloader.hidden { opacity: 0; visibility: hidden; }
.loader-text { color: #fff; font-size: 3rem; font-weight: 800; letter-spacing: 5px; }
.loader-text span { display: inline-block; animation: wave 1.5s infinite ease-in-out; }
@keyframes wave { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-20px); } }
.loader-text span:nth-child(1) { animation-delay: 0.1s; } .loader-text span:nth-child(2) { animation-delay: 0.2s; } .loader-text span:nth-child(3) { animation-delay: 0.3s; } .loader-text span:nth-child(4) { animation-delay: 0.4s; } .loader-text span:nth-child(5) { animation-delay: 0.5s; } .loader-text span:nth-child(6) { animation-delay: 0.6s; } .loader-text span:nth-child(7) { animation-delay: 0.7s; } .loader-text span:nth-child(8) { animation-delay: 0.8s; } .loader-text span:nth-child(9) { animation-delay: 0.9s; }

/* Efek Kaca */
.glass-effect { background: var(--glass-bg-light); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-radius: 16px; box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1); border: 1px solid var(--glass-border-light); }
body.dark-mode .glass-effect { background: var(--glass-bg-dark); border: 1px solid var(--glass-border-dark); }

/* Header & Navigasi */
.site-header { padding: 15px 30px; display: flex; justify-content: space-between; align-items: center; position: sticky; top: 15px; margin: 0 15px 15px 15px; z-index: 10; }
.site-header .logo { font-weight: 800; font-size: 1.5rem; text-decoration: none; color: inherit; }
.site-header nav a { margin-left: 20px; text-decoration: none; color: inherit; font-weight: 700; }
.theme-switch { background: none; border: 1px solid var(--glass-border-light); color: inherit; border-radius: 50%; width: 40px; height: 40px; cursor: pointer; font-size: 1.2rem; }
body.dark-mode .theme-switch { border-color: var(--glass-border-dark); }

/* --- KARTU POSTINGAN (MOBILE FIRST) --- */
.page-header { text-align: center; margin-bottom: 40px; }
.page-header h1 { font-size: 2.5rem; margin-bottom: 0; }
.page-header p { font-size: 1.1rem; }
.post-card-link { text-decoration: none; color: inherit; }
.post-excerpt { padding: 0; margin-bottom: 25px; overflow: hidden; transition: transform 0.2s ease-in-out; }
.post-excerpt:hover { transform: translateY(-5px); }
.post-excerpt-image { width: 100%; height: 200px; object-fit: cover; display: block; }
.post-excerpt-content { padding: 25px; }
.post-excerpt-content h2 { margin-top: 0; margin-bottom: 10px; }
.post-meta { font-size: 0.9rem; color: var(--meta-text-light); margin-bottom: 15px; }
body.dark-mode .post-meta { color: var(--meta-text-dark); }
.post-tags { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 8px; }
.tag { display: inline-flex; align-items: center; background-color: rgba(0, 0, 0, 0.05); padding: 5px 10px; border-radius: 20px; font-size: 0.8rem; font-weight: 700; }
body.dark-mode .tag { background-color: rgba(255, 255, 255, 0.1); }
.tag svg { width: 1em; height: 1em; margin-right: 6px; }

/* Halaman Postingan Penuh */
.post-full { padding: 30px; }
.back-link { display: inline-block; margin-bottom: 20px; text-decoration: none; font-weight: 700; }
.post-full-header { text-align: left; margin-bottom: 30px; }
.post-full-header h1 { font-size: 2.2rem; margin-bottom: 15px; margin-top: 0; }
.post-full-image { border-radius: 8px; margin-bottom: 30px; width: 100%; }
.content-body { line-height: 1.8; font-size: 1.1rem; }
.content-body img { max-width: 100%; height: auto; display: block; margin: 30px auto; border-radius: 12px; box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1); }
body.dark-mode .content-body img { box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2); }
.post-divider { border: 0; height: 1px; background-color: var(--glass-border-light); margin: 40px 0; }
body.dark-mode .post-divider { background-color: var(--glass-border-dark); }

/* Tombol Berbagi & Pagination */
.share-buttons { text-align: center; }
.share-btn { display: inline-block; padding: 10px 20px; border-radius: 8px; color: white !important; text-decoration: none; font-weight: bold; margin: 5px; border: none; cursor: pointer; transition: opacity 0.2s; }
.share-btn:hover { opacity: 0.9; }
.twitter { background-color: #1DA1F2; } .facebook { background-color: #1877F2; } .whatsapp { background-color: #25D366; } .copy-link { background-color: #6c757d; }
.pagination { text-align: center; margin-top: 40px; }
.pagination a { color: inherit; text-decoration: none; padding: 10px 15px; margin: 0 5px; border-radius: 8px; background-color: var(--glass-bg-light); border: 1px solid var(--glass-border-light); }
.pagination a.active { background-color: var(--primary-color); color: white !important; border-color: var(--primary-color); }
body.dark-mode .pagination a { background-color: var(--glass-bg-dark); border: 1px solid var(--glass-border-dark); }
body.dark-mode .pagination a.active { background-color: var(--primary-color); }

/* Footer */
.site-footer { text-align: center; padding: 40px 20px; margin-top: 40px; }

/* STYLE KHUSUS DESKTOP (GRID LAYOUT) */
@media (min-width: 768px) {
  .posts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); gap: 25px; }
  .post-excerpt { margin-bottom: 0; display: flex; flex-direction: column; height: 100%; padding: 0; }
  .post-excerpt-image { width: 100%; height: 200px; object-fit: cover; border-radius: 16px 16px 0 0; margin: 0; }
  .post-excerpt-content { padding: 25px; display: flex; flex-direction: column; flex-grow: 1; }
  .post-excerpt .post-tags { margin-top: auto; padding-top: 15px; }
}
