/*
Theme Name: Sedekah Shubuh
Theme URI: https://sedekahshubuh.com
Author: Yayasan Bina Amal Indonesia
Description: Theme ringan, mobile-friendly, dan SEO-friendly untuk sedekahshubuh.com. Tampilan artikel bergaya Medium.com (tipografi serif, kolom baca sempit, estimasi waktu baca). Homepage disediakan lewat plugin "Sedekah Shubuh Homepage".
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL v2 or later
Text Domain: sedekahshubuh
*/

/* ===================================================================
   1. CSS VARIABLES / RESET
=================================================================== */
:root {
  --color-bg: #FBF7EF;
  --color-surface: #FFFFFF;
  --color-text: #000000;
  --color-brand: #A31621;
  --color-brand-tint: rgba(163, 22, 33, 0.05);
  --color-accent: #C9A24B;
  --color-whatsapp: #25D366;
  --font-heading: 'Fraunces', Georgia, serif;
  --font-body: 'Work Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-read: 'Lora', Georgia, serif;
  --content-width: 1160px;
  --reading-width: 700px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
}

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

a { color: var(--color-brand); text-decoration: none; }
a:hover { opacity: 0.85; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-optical-sizing: auto;
  color: var(--color-brand);
  line-height: 1.2;
  margin: 0 0 0.5em;
}

.container {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 24px;
}

.screen-reader-text {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

/* ===================================================================
   2. HEADER / NAV
=================================================================== */
.site-header {
  width: 100%;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  background: var(--color-bg);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header__inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-logo {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--color-brand);
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.primary-nav ul {
  list-style: none;
  display: flex;
  gap: 28px;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.primary-nav a {
  color: var(--color-text);
  font-size: 15px;
  font-weight: 500;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-body);
  border: none;
  cursor: pointer;
}

.btn-whatsapp {
  background: var(--color-whatsapp);
  color: #ffffff;
}

.btn-outline {
  border: 1.5px solid var(--color-brand);
  color: var(--color-brand);
  background: transparent;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

/* ===================================================================
   3. FOOTER
=================================================================== */
.site-footer {
  padding: 48px 24px 32px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.site-footer__brand {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--color-brand);
}

.site-footer__text {
  font-size: 14px;
  max-width: 560px;
  line-height: 1.6;
}

.site-footer__links {
  display: flex;
  gap: 20px;
  margin-top: 4px;
}

.site-footer__links a {
  font-size: 14px;
  color: var(--color-text);
}

.site-footer__copy {
  font-size: 14px;
  margin-top: 8px;
}

/* ===================================================================
   4. BLOG LISTING (index / archive / search)
=================================================================== */
.post-list {
  max-width: var(--reading-width);
  margin: 0 auto;
  padding: 56px 24px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.post-card__eyebrow {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.post-card__title {
  font-size: 28px;
  margin-bottom: 8px;
}

.post-card__title a { color: var(--color-brand); }

.post-card__meta {
  font-size: 14px;
  color: var(--color-text);
  opacity: 0.65;
  margin-bottom: 12px;
}

.post-card__excerpt {
  font-family: var(--font-read);
  font-size: 17px;
  line-height: 1.7;
}

.post-card__thumb {
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 16px;
}

.pagination {
  max-width: var(--reading-width);
  margin: 0 auto;
  padding: 0 24px 56px;
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 600;
}

/* ===================================================================
   5. SINGLE ARTICLE — gaya Medium.com
=================================================================== */
.article-cover {
  width: 100%;
  max-height: 480px;
  overflow: hidden;
}

.article-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-header {
  max-width: var(--reading-width);
  margin: 0 auto;
  padding: 48px 24px 24px;
  text-align: left;
}

.article-header__eyebrow {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}

.article-title {
  font-size: 40px;
  line-height: 1.15;
  margin-bottom: 20px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-family: var(--font-body);
  color: var(--color-text);
  opacity: 0.75;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.article-meta__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-brand-tint);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-brand);
}

.article-body {
  max-width: var(--reading-width);
  margin: 0 auto;
  padding: 8px 24px 64px;
  font-family: var(--font-read);
  font-size: 20px;
  line-height: 1.8;
}

.article-body p { margin: 0 0 1.6em; }

.article-body h2 {
  font-size: 30px;
  margin-top: 1.6em;
  margin-bottom: 0.6em;
}

.article-body h3 {
  font-size: 24px;
  margin-top: 1.4em;
  margin-bottom: 0.5em;
}

.article-body blockquote {
  margin: 1.8em 0;
  padding-left: 24px;
  border-left: 3px solid var(--color-brand);
  font-style: italic;
  font-size: 22px;
}

.article-body img,
.article-body figure {
  margin: 2em 0;
}

.article-body figure.alignfull img,
.article-body img.alignfull {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
}

.article-body a { text-decoration: underline; text-underline-offset: 3px; }

.article-body ul, .article-body ol {
  padding-left: 1.4em;
  margin: 0 0 1.6em;
}

.article-footer {
  max-width: var(--reading-width);
  margin: 0 auto;
  padding: 24px 24px 64px;
  border-top: 1px solid rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

/* ===================================================================
   6. PAGE (halaman biasa: Tentang, Kontak, dll)
=================================================================== */
.page-header {
  max-width: var(--reading-width);
  margin: 0 auto;
  padding: 56px 24px 16px;
}

.page-title { font-size: 36px; }

.page-body {
  max-width: var(--reading-width);
  margin: 0 auto;
  padding: 8px 24px 64px;
  font-family: var(--font-read);
  font-size: 18px;
  line-height: 1.75;
}

.page-body p { margin: 0 0 1.4em; }

/* ===================================================================
   7. MISC
=================================================================== */
.no-results {
  max-width: var(--reading-width);
  margin: 0 auto;
  padding: 80px 24px;
  text-align: center;
  font-family: var(--font-read);
  font-size: 18px;
}

/* ===================================================================
   8. RESPONSIVE
=================================================================== */
@media (max-width: 640px) {
  .primary-nav ul { display: none; }
  .menu-toggle { display: inline-flex; }
  .primary-nav.is-open ul {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg);
    padding: 20px 24px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
  }
  .article-title { font-size: 30px; }
  .article-body { font-size: 18px; }
  .post-card__title { font-size: 22px; }
}
