/*
Theme Name: Digithic Lite
Theme URI: https://digithic.com
Author: Dwi Andika Pratama
Author URI: https://dwiandikapratama.com
Description: Theme WordPress super ringan. Tanpa jQuery, tanpa font eksternal, satu file CSS. Punya template Blank Canvas untuk landing page HTML murni (tanpa page builder) dan 4 variasi layout arsip blog via Customizer.
Version: 1.4.2
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: digithic-lite
Tags: blog, one-column, custom-logo, custom-colors, threaded-comments, translation-ready
*/

/* ==========================================================
   1. Reset ringan + variabel
   ========================================================== */
:root {
  --dl-accent: #A0813A;
  --dl-text: #21242b;
  --dl-muted: #6b7280;
  --dl-bg: #ffffff;
  --dl-surface: #f7f7f5;
  --dl-border: #e6e6e2;
  --dl-radius: 10px;
  --dl-container: 1160px;
  --dl-content: 720px;
  --dl-wide: 960px;
  --dl-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--dl-font);
  font-size: 17px;
  line-height: 1.7;
  color: var(--dl-text);
  background: var(--dl-bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

a { color: var(--dl-accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--dl-accent); outline-offset: 2px; }

h1, h2, h3, h4, h5, h6 { line-height: 1.25; margin: 1.4em 0 .5em; }
h1 { font-size: 2.1rem; } h2 { font-size: 1.6rem; } h3 { font-size: 1.3rem; }

.screen-reader-text {
  clip: rect(1px,1px,1px,1px); clip-path: inset(50%);
  height: 1px; width: 1px; overflow: hidden; position: absolute !important;
}

/* ==========================================================
   2. Layout dasar
   ========================================================== */
.dl-container { max-width: var(--dl-container); margin: 0 auto; padding: 0 20px; }
.dl-content   { max-width: var(--dl-content);   margin: 0 auto; padding: 0 20px; }
.dl-content.is-wide { max-width: var(--dl-wide); }

.site-main { padding: 48px 0 72px; }

/* ==========================================================
   3. Header
   ========================================================== */
.site-header {
  border-bottom: 1px solid var(--dl-border);
  background: var(--dl-bg);
}
.site-header .dl-container {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; min-height: 68px; flex-wrap: wrap;
}
.site-branding { display: flex; align-items: center; gap: 12px; }
.site-branding img { max-height: 44px; width: auto; }
.site-title { margin: 0; font-size: 1.25rem; font-weight: 700; }
.site-title a { color: var(--dl-text); }
.site-title a:hover { text-decoration: none; color: var(--dl-accent); }
.site-description { margin: 0; font-size: .82rem; color: var(--dl-muted); }

.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; }
.main-nav a {
  display: block; padding: 8px 12px; color: var(--dl-text);
  font-size: .95rem; font-weight: 500; border-radius: 6px;
}
.main-nav a:hover { background: var(--dl-surface); text-decoration: none; color: var(--dl-accent); }
.main-nav .current-menu-item > a,
.main-nav .current_page_item > a,
.main-nav .current-menu-ancestor > a,
.main-nav .current_page_parent > a {
  background: var(--dl-surface); color: var(--dl-accent); font-weight: 600;
}
.main-nav .sub-menu { display: none; } /* simpel: submenu disembunyikan; pakai menu satu level */

/* Toggle menu mobile — hamburger ala Astra */
.menu-toggle {
  display: none; background: none; border: 1px solid var(--dl-border);
  border-radius: 8px; padding: 11px 12px; cursor: pointer; line-height: 0;
}
.menu-toggle .hamburger { display: block; width: 22px; }
.menu-toggle .hamburger span {
  display: block; height: 2px; width: 100%; background: var(--dl-text);
  border-radius: 2px; transition: transform .2s ease, opacity .2s ease;
}
.menu-toggle .hamburger span + span { margin-top: 5px; }
.menu-toggle[aria-expanded="true"] .hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .hamburger span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.menu-toggle:hover { border-color: var(--dl-accent); }
.menu-toggle:hover .hamburger span { background: var(--dl-accent); }
@media (max-width: 782px) {
  .menu-toggle { display: inline-block; }
  .main-nav { display: none; width: 100%; }
  .main-nav.is-open { display: block; padding-bottom: 12px; }
  .main-nav ul { flex-direction: column; }
}

/* ==========================================================
   4. Arsip blog — 4 variasi layout
   ========================================================== */
.archive-header { margin-bottom: 36px; }
.archive-header h1 { margin-top: 0; }
.archive-header p { color: var(--dl-muted); margin: 0; }

.post-card {
  background: var(--dl-bg);
  border: 1px solid var(--dl-border);
  border-radius: var(--dl-radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: box-shadow .18s ease, transform .18s ease;
}
.post-card:hover { box-shadow: 0 10px 28px rgba(0,0,0,.08); transform: translateY(-2px); }
.post-card .card-thumb { display: block; aspect-ratio: 16/9; overflow: hidden; background: var(--dl-surface); }
.post-card .card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-card .card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post-card .card-meta { font-size: .8rem; color: var(--dl-muted); display: flex; gap: 10px; flex-wrap: wrap; }
.post-card .card-meta .cat { color: var(--dl-accent); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.post-card h2 { margin: 0; font-size: 1.15rem; }
.post-card h2 a { color: var(--dl-text); }
.post-card h2 a:hover { color: var(--dl-accent); text-decoration: none; }
.post-card .card-excerpt { margin: 0; font-size: .93rem; color: var(--dl-muted); }

/* --- Layout: List (klasik) --- */
.dl-archive.layout-list { display: flex; flex-direction: column; gap: 28px; }
.layout-list .post-card { flex-direction: row; }
.layout-list .post-card .card-thumb { flex: 0 0 320px; aspect-ratio: 4/3; }
.layout-list .post-card h2 { font-size: 1.35rem; }
@media (max-width: 700px) {
  .layout-list .post-card { flex-direction: column; }
  .layout-list .post-card .card-thumb { flex: none; aspect-ratio: 16/9; }
}

/* --- Layout: Grid 2 & Grid 3 --- */
.dl-archive.layout-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.dl-archive.layout-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 900px) { .dl-archive.layout-grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
  .dl-archive.layout-grid-2, .dl-archive.layout-grid-3 { grid-template-columns: 1fr; }
}

/* --- Layout: Magazine (post pertama gede) --- */
.dl-archive.layout-magazine { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.layout-magazine .post-card:first-child { grid-column: 1 / -1; flex-direction: row; }
.layout-magazine .post-card:first-child .card-thumb { flex: 0 0 55%; aspect-ratio: 16/9; }
.layout-magazine .post-card:first-child .card-body { justify-content: center; padding: 32px; }
.layout-magazine .post-card:first-child h2 { font-size: 1.6rem; }
@media (max-width: 900px) { .dl-archive.layout-magazine { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px) {
  .dl-archive.layout-magazine { grid-template-columns: 1fr; }
  .layout-magazine .post-card:first-child { flex-direction: column; }
  .layout-magazine .post-card:first-child .card-thumb { flex: none; }
  .layout-magazine .post-card:first-child .card-body { padding: 20px 22px 22px; }
}

/* Pagination */
.dl-pagination { margin-top: 44px; text-align: center; }
.dl-pagination .nav-links { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.dl-pagination .page-numbers {
  display: inline-block; min-width: 40px; padding: 8px 12px;
  border: 1px solid var(--dl-border); border-radius: 8px; color: var(--dl-text);
}
.dl-pagination .page-numbers.current { background: var(--dl-accent); border-color: var(--dl-accent); color: #fff; }
.dl-pagination a.page-numbers:hover { border-color: var(--dl-accent); color: var(--dl-accent); text-decoration: none; }

/* ==========================================================
   5. Single & Page
   ========================================================== */
.entry-header { margin-bottom: 28px; }
.entry-header h1 { margin-top: 0; margin-bottom: 8px; }
.entry-meta { color: var(--dl-muted); font-size: .88rem; }
.entry-thumb { margin: 0 0 32px; border-radius: var(--dl-radius); overflow: hidden; }
.entry-thumb img { display: block; width: 100%; }

.entry-content > * { margin-top: 0; }
.entry-content p:not([class]), .entry-content ul:not([class]), .entry-content ol:not([class]) { margin-bottom: 1.2em; }
.entry-content blockquote {
  margin: 1.5em 0; padding: 4px 24px; border-left: 4px solid var(--dl-accent);
  background: var(--dl-surface); border-radius: 0 var(--dl-radius) var(--dl-radius) 0;
}
.entry-content pre {
  background: #1e222a; color: #e8e8e8; padding: 18px 20px;
  border-radius: var(--dl-radius); overflow-x: auto; font-size: .88rem;
}
.entry-content code { background: var(--dl-surface); padding: 2px 6px; border-radius: 4px; font-size: .9em; }
.entry-content pre code { background: none; padding: 0; }
.entry-content img { border-radius: var(--dl-radius); }
.entry-content .wp-block-image { margin: 1.5em 0; }
.entry-content iframe { max-width: 100%; }

.post-tags { margin-top: 36px; display: flex; gap: 8px; flex-wrap: wrap; }
.post-tags a {
  font-size: .8rem; padding: 5px 12px; background: var(--dl-surface);
  border-radius: 999px; color: var(--dl-muted);
}
.post-tags a:hover { background: var(--dl-accent); color: #fff; text-decoration: none; }

/* Widget: Sidebar Kanan (Artikel) */
.dl-single-layout.has-sidebar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 48px;
  align-items: start;
}
.dl-single-layout.has-sidebar .dl-content { max-width: none; margin: 0; padding: 0; }
.dl-sidebar { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 20px; }
.dl-sidebar .widget {
  background: var(--dl-surface); border: 1px solid var(--dl-border);
  border-radius: var(--dl-radius); padding: 22px 24px; font-size: .93rem;
}
.dl-sidebar .widget-title { margin: 0 0 12px; font-size: 1.05rem; }
.dl-sidebar .widget > *:last-child { margin-bottom: 0; }
.dl-sidebar .widget ul { margin: 0; padding-left: 18px; }
.dl-sidebar .widget li { margin-bottom: 8px; }
@media (max-width: 1000px) {
  .dl-single-layout.has-sidebar { grid-template-columns: 1fr; }
  .dl-sidebar { position: static; }
}

/* Widget: Bawah Artikel */
.post-widgets { margin-top: 40px; display: flex; flex-direction: column; gap: 20px; }
.post-widgets .widget {
  background: var(--dl-surface); border: 1px solid var(--dl-border);
  border-radius: var(--dl-radius); padding: 22px 26px;
}
.post-widgets .widget-title { margin: 0 0 10px; font-size: 1.1rem; }
.post-widgets .widget > *:last-child { margin-bottom: 0; }
.post-widgets .widget ul { margin: 0; padding-left: 18px; }

.post-nav {
  margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--dl-border);
  display: flex; justify-content: space-between; gap: 20px; font-size: .92rem;
}
.post-nav span { display: block; color: var(--dl-muted); font-size: .78rem; margin-bottom: 4px; }
.post-nav .next { text-align: right; margin-left: auto; }

/* Komentar */
.comments-area { margin-top: 56px; }
.comment-list { list-style: none; padding: 0; }
.comment-list .comment { padding: 18px 0; border-top: 1px solid var(--dl-border); }
.comment-list .children { list-style: none; padding-left: 28px; }
.comment-meta { font-size: .85rem; color: var(--dl-muted); }
.comment-form textarea, .comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"] {
  width: 100%; padding: 10px 14px; border: 1px solid var(--dl-border);
  border-radius: 8px; font: inherit;
}
.comment-form .submit, .wp-block-button__link, button, input[type="submit"] {
  background: var(--dl-accent); color: #fff; border: 0; padding: 11px 22px;
  border-radius: 8px; font: inherit; font-weight: 600; cursor: pointer;
}

/* ==========================================================
   6. Footer
   ========================================================== */
footer.site-footer {
  background: var(--dl-bg);
  color: var(--dl-muted);
  border-top: 1px solid var(--dl-border);
  padding: 28px 0; margin-top: 40px;
  font-size: .88rem;
}
footer.site-footer .dl-container { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
footer.site-footer a { color: var(--dl-accent); }
footer.site-footer p { margin: 0; }
footer.site-footer.is-center .dl-container {
  flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 6px;
}

/* ==========================================================
   7. Utility
   ========================================================== */
/* Full Width: konten nempel flush ke header & footer, tanpa gap */
.page-template-template-full-width .site-main { padding: 0; }
.page-template-template-full-width .site-footer { margin-top: 0; }
.page-template-template-full-width .entry-content > *:first-child { margin-top: 0; }
.page-template-template-full-width .entry-content > *:last-child { margin-bottom: 0; }

/* Full Width: HTML landing page berkuasa penuh. Theme tidak menata
   paragraf, gambar, blockquote, atau code di dalamnya. */
.page-template-template-full-width .entry-content { max-width: none; }
.page-template-template-full-width .entry-content img { border-radius: 0; }
.page-template-template-full-width .entry-content blockquote {
  margin: 0; padding: 0; border-left: 0; background: none; border-radius: 0;
}
.page-template-template-full-width .entry-content pre {
  background: none; color: inherit; padding: 0; border-radius: 0;
}
.page-template-template-full-width .entry-content code { background: none; padding: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Kredit footer (tampil saat lisensi belum aktif) */
footer.site-footer .dl-credit { font-size: .82rem; opacity: .85; }

/* ==========================================================
   Breadcrumb
   ========================================================== */
.dl-breadcrumb {
  font-size: .82rem; color: var(--dl-muted);
  margin-bottom: 20px; display: flex; flex-wrap: wrap;
  align-items: center; gap: 8px; line-height: 1.5;
}
.dl-breadcrumb a { color: var(--dl-muted); }
.dl-breadcrumb a:hover { color: var(--dl-accent); text-decoration: none; }
.dl-breadcrumb .sep { color: var(--dl-border); }
.dl-breadcrumb [aria-current="page"] { color: var(--dl-text); font-weight: 500; }

/* ==========================================================
   Daftar Isi (TOC)
   ========================================================== */
.dl-toc {
  background: var(--dl-surface);
  border: 1px solid var(--dl-border);
  border-radius: var(--dl-radius);
  padding: 16px 22px 18px;
  margin: 0 0 32px;
}
.dl-toc-toggle {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; background: none; border: 0; padding: 0; cursor: pointer;
  font: inherit; font-weight: 700; font-size: .95rem; color: var(--dl-text);
}
.dl-toc-toggle:hover { color: var(--dl-accent); }
.dl-toc-arrow { transition: transform .18s ease; font-size: .8rem; color: var(--dl-muted); }
.dl-toc.is-closed .dl-toc-arrow { transform: rotate(-90deg); }
.dl-toc.is-closed .dl-toc-list { display: none; }

.dl-toc-list {
  list-style: none; margin: 14px 0 0; padding: 0;
  counter-reset: dl-toc;
}
.dl-toc-list li { margin: 0 0 7px; line-height: 1.5; }
.dl-toc-list li:last-child { margin-bottom: 0; }
.dl-toc-list li.lvl-3 { padding-left: 20px; }
.dl-toc-list a {
  color: var(--dl-text); font-size: .92rem;
  text-decoration: none; border-bottom: 1px solid transparent;
}
.dl-toc-list a:hover { color: var(--dl-accent); border-bottom-color: var(--dl-accent); }
.dl-toc-list li.lvl-3 a { color: var(--dl-muted); font-size: .88rem; }
.dl-toc-list li.lvl-3 a:hover { color: var(--dl-accent); }

/* Offset anchor agar heading tidak tertutup admin bar */
.entry-content h2[id], .entry-content h3[id] { scroll-margin-top: 24px; }
