/*
Theme Name: Al-Muharrar Times
Theme URI: https://al-muharrar.my.id/
Description: Times Writer newspaper styling for Al-Muharrar (Fiqh Masail wal Aqwal). Homepage and single post render via PHP templates (home.php, single.php) for pixel-faithful output.
Author: Atoy
Template: fresh-blog-lite
Version: 2.3.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: al-muharrar-times
*/

/* ============================================================
   0. TOKENS & BASE
   ============================================================ */
:root {
  --accent: #31609c;
  --ink: #000000;
  --muted: #555555;
  --rule: #e0e0e0;
  --meta: #999999;
  --soft: #f1efe9;
  --tagline: #797979;
  --nav-ink: #494949;
  --title-hover: #cccccc;
}
body {
  font-family: "Libre Franklin", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: #000;
  background: #fff;
  margin: 0;
}
a { color: var(--accent); }
img { max-width: 100%; }

/* ============================================================
   1. HEADER  (parts/header.html — block template part)
   ============================================================ */
.times-masthead { text-align: center; padding: 20px 0 16px; border-top: 1px solid #000; margin-top: 0 !important; margin-bottom: 0 !important; }
.times-logo { display: inline-block; line-height: 0; }
.times-logo img { height: 44px; width: auto; max-width: 100%; }
.times-masthead .wp-block-site-title,
.times-masthead .wp-block-site-title a {
  font-family: "Cormorant Garamond", "Bodoni Moda", serif;
  font-weight: 600;
  font-size: 50px;
  line-height: 1.1;
  color: #000;
  text-decoration: none;
  margin: 0;
}
.times-masthead .wp-block-site-tagline {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--tagline);
  margin-top: 5px;
}
.times-navwrap {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}
.times-nav .wp-block-navigation__container { justify-content: center; }
.times-nav a,
.times-nav .wp-block-navigation-item__content {
  font-size: 16px;
  font-weight: 400;
  text-transform: uppercase;
  line-height: 40px;
  padding: 0 12px;
  color: #494949 !important;
  text-decoration: none;
}
.times-nav .current-menu-item > a,
.times-nav a:hover { color: #000; }
.times-nav .current-menu-item > a { box-shadow: inset 0 2px 0 #000; }

/* ============================================================
   2. HOMEPAGE  (home.php)
   ============================================================ */
.times-main { max-width: 1170px; margin: 0 auto; padding: 0 20px; }

/* ---- lead grid ---- */
.lead-grid {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) 190px;
  gap: 18px;
  padding: 18px 0 28px;
}
.rail-left { padding-right: 18px; border-right: 1px solid var(--rule); }
.rail-right {
  padding-left: 18px;
  border-left: 1px solid var(--rule);
  display: grid;
  gap: 34px;
  align-content: start;
}

/* ---- story cards ---- */
.story { min-width: 0; }
.story img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  filter: saturate(.82) contrast(1.04);
}
.rail-left .story img { aspect-ratio: 3 / 4; }
.story-kicker {
  margin: 10px 0 5px;
  color: var(--accent);
  font-family: "Libre Franklin", sans-serif;
  font-size: 10px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.story-kicker a { color: var(--accent); text-decoration: none; }
.story h2, .story h3 {
  font-family: "Tinos", serif;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
}
.story h2 a, .story h3 a { color: #000; text-decoration: none; }
.story h2 a:hover, .story h3 a:hover,
.category-card h3 a:hover, .archive-item h3 a:hover, .latest-item h3 a:hover {
  text-decoration: underline;
  text-decoration-color: var(--title-hover);
}
.story p { color: var(--muted); margin: 9px 0 0; font-size: 12.5px; line-height: 1.45; }
.read-more {
  display: inline-block;
  margin-top: 13px;
  color: var(--accent);
  font-family: "Libre Franklin", sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
}

/* ---- hero ---- */
.hero { text-align: center; }
.hero-media { overflow: hidden; background: var(--soft); }
.hero-media img {
  height: min(46vw, 460px);
  min-height: 320px;
  aspect-ratio: auto;
  object-fit: cover;
  object-position: center 48%;
  filter: sepia(.08) saturate(.85) contrast(1.06);
}
.hero .story-kicker { margin-top: 10px; }
.hero h2 { width: min(92%, 720px); margin: 4px auto 0; font-size: 26px; line-height: 1.08; }

/* ---- dates ---- */
.article-date {
  margin: 11px 0 5px;
  color: var(--meta);
  font-family: "Libre Franklin", sans-serif;
  font-size: 13px;
  line-height: 1.3;
}

/* ---- sections ---- */
.content-section { padding: 0 0 34px; scroll-margin-top: 12px; }
.section-head { display: flex; align-items: center; gap: 14px; padding: 30px 0 13px; }
.section-head::after { content: ""; flex: 1 1 auto; height: 1px; background: var(--rule); }
.section-head h2 {
  margin: 0;
  font-family: "Libre Franklin", sans-serif;
  font-size: 14px;
  line-height: 1.3;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  white-space: nowrap;
}
.section-view-all {
  display: block;
  width: max-content;
  margin: 22px auto 0;
  color: var(--accent);
  font-family: "Libre Franklin", sans-serif;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  text-transform: uppercase;
  text-decoration: none;
}
.section-view-all:hover { color: var(--accent); }

/* ---- category grid (lead + 4 text cards) ---- */
.category-grid { display: grid; grid-template-columns: 1.28fr 1fr 1fr; gap: 0; padding-top: 20px; }
.category-card { min-width: 0; padding: 0 20px 20px; border-left: 1px solid var(--rule); }
.category-card:nth-child(2), .category-card:nth-child(3) { border-bottom: 1px solid var(--rule); }
.category-card:nth-child(4), .category-card:nth-child(5) { padding-top: 20px; }
.category-lead { grid-row: span 2; padding: 0 24px 0 0; border-left: 0; }
.category-lead img { aspect-ratio: 4 / 3; }
.category-card h3 { margin: 0; font-family: "Tinos", serif; font-size: 26px; font-weight: 700; line-height: 1.2; }
.category-card h3 a { color: #000; text-decoration: none; }
.category-lead h3 { line-height: 1.08; }
.category-card p { color: var(--muted); font-size: 12.5px; line-height: 1.45; margin: 9px 0 0; }

/* ---- archive list ---- */
.archive-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 24px;
  margin-top: 22px;
  border-top: 1px solid #000;
}
.archive-item { min-width: 0; padding: 14px 0 13px; border-bottom: 1px solid var(--rule); }
.archive-item .article-date { margin: 0 0 4px; }
.archive-item h3 { margin: 0; font-family: "Tinos", serif; font-size: 26px; font-weight: 700; line-height: 1.25; }
.archive-item h3 a { color: #000; text-decoration: none; }

/* ---- terkini / latest list ---- */
.latest-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; padding-top: 20px; }
.latest-item { min-width: 0; padding: 0 20px 20px; border-left: 1px solid var(--rule); }
.latest-item:nth-child(4n+1) { padding-left: 0; border-left: 0; }
.latest-item:nth-child(n+5) { padding-top: 20px; border-top: 1px solid var(--rule); }
.latest-item .story-kicker { margin-top: 0; }
.latest-item h3 { margin: 0; font-family: "Tinos", serif; font-size: 26px; font-weight: 700; line-height: 1.18; }
.latest-item h3 a { color: #000; text-decoration: none; }
.latest-item .article-date { margin: 7px 0 0; }

/* ============================================================
   3. SINGLE POST  (single.php)
   ============================================================ */
.progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--accent); z-index: 1000; }
.article-wrap { max-width: 660px; margin: 0 auto; padding: 0 20px; }
.cat a {
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
  font-family: "Libre Franklin", sans-serif;
}
.cat a:hover { border-bottom-color: var(--accent); }
.article-header { padding-top: 60px; }
.article-header h1 {
  font-family: "Tinos", serif;
  font-weight: 400;
  font-size: 51px;
  line-height: 1.15;
  color: #000;
  margin-top: 2rem;
  margin-bottom: 0;
}
.article-meta { display: flex; align-items: center; gap: 10px; margin-top: 3rem; font-size: 13px; color: var(--meta); }
.article-meta .by { display: inline-flex; align-items: center; gap: 7px; }
.article-meta .avatar {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent); color: #fff;
  font-size: 12px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.article-meta .dot { opacity: .6; }
figure.thumb { margin: 3rem -60px 0; }
figure.thumb img { width: 100%; height: auto; display: block; }
.article-body { margin-top: 3rem; font-family: "Lora", serif; font-size: 18px; line-height: 1.7; color: #000; }
.article-body p { margin: 0 0 1.5em; }
.article-body blockquote { background: #eee; border-left: 2px solid var(--accent); padding: 1em 1.5em; margin: 0 0 1.5em; }
.article-body a { color: var(--accent); }
.article-body ol, .article-body ul { margin: 0 0 1.5em 1.4em; }
.share { margin-top: 3rem; display: flex; justify-content: center; gap: 8px; }
.share a {
  width: 32px; height: 32px; border-radius: 50%;
  background: #eee; display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.share a svg { width: 16px; height: 16px; fill: #555; }
.share a:hover { background: var(--accent); }
.share a:hover svg { fill: #fff; }
.authorbox { margin-top: 3rem; border: 1px solid #ddd; padding: 2em; display: flex; gap: 1.2em; align-items: flex-start; }
.authorbox .avatar {
  flex: none; width: 90px; height: 90px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 34px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.authorbox .avatar img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
}
}
.authorbox .name { font-weight: 700; font-size: 1.3em; margin-bottom: 10px; }
.authorbox .bio { font-size: 15px; color: var(--muted); line-height: 1.4; }
.related { max-width: 1170px; margin: 4rem auto 0; padding: 0 20px 4rem; }
.related h2 {
  text-align: center; font-weight: 400; font-size: 20px;
  letter-spacing: 2px; text-transform: uppercase; margin: 0 0 2rem;
  font-family: "Libre Franklin", sans-serif;
}
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.related-item img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; display: block; }
.related-item .date { font-size: 13px; color: var(--meta); margin-top: 12px; font-family: "Libre Franklin", sans-serif; }
.related-item h3 { font-family: "Tinos", serif; font-weight: 700; font-size: 18px; margin: 6px 0 0; line-height: 1.35; }
.related-item h3 a { color: #000; text-decoration: none; }
.related-item h3 a:hover { text-decoration: underline; text-decoration-color: #ccc; }
.dock {
  position: fixed; left: 0; bottom: 30px; width: 300px;
  background: #fff; box-shadow: 3px 8px 10px rgba(0,0,0,.3);
  z-index: 900; transform: translateX(-120%); transition: transform .3s;
}
.dock.show { transform: translateX(0); }
.dock h4 {
  background: #000; color: #fff; font-size: 12px; text-transform: uppercase;
  letter-spacing: 1px; font-weight: 400; padding: 6px 28px 6px 14px; margin: 0;
  position: relative; font-family: "Libre Franklin", sans-serif;
}
.dock .close {
  position: absolute; top: 1px; right: 0; width: 24px; height: 24px;
  background: none; border: none; color: #fff; font-size: 16px; cursor: pointer;
}
.dock ul { list-style: none; margin: 0; padding: 0; }
.dock li { display: flex; gap: 10px; padding: 10px 14px; border-top: 1px solid #f0f0f0; align-items: center; }
.dock li img { width: 64px; height: 48px; object-fit: cover; flex: none; }
.dock li a { font-size: 13px; color: #000; text-decoration: none; line-height: 1.4; font-family: "Tinos", serif; }

/* ============================================================
   4. RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .article-header h1 { font-size: 44px; }
}
@media (max-width: 850px) {
  .lead-grid { grid-template-columns: 1fr; gap: 26px; }
  .hero-wrap { order: -1; }
  .hero-media img { height: 56vw; min-height: 280px; max-height: 420px; }
  .rail-left, .rail-right { padding: 0; border: 0; }
  .rail-left { border-top: 1px solid var(--rule); padding-top: 20px; }
  .rail-right { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .rail-left .story { display: grid; grid-template-columns: 40% 1fr; gap: 16px; align-items: start; }
  .rail-left .story img { aspect-ratio: 4 / 3; }
  .rail-left .story-kicker { margin-top: 0; }
  .category-grid { grid-template-columns: 1fr 1fr; }
  .archive-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .latest-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .latest-item:nth-child(odd) { padding-left: 0; border-left: 0; }
  .latest-item:nth-child(even) { padding-left: 20px; border-left: 1px solid var(--rule); }
}
@media (max-width: 840px) {
  .dock { display: none; }
}
@media (max-width: 600px) {
  .section-head h2 { font-size: 26px !important; line-height: 1.2; }
  .subbab-tabs { white-space: normal; overflow-x: visible; }
  .subbab-tabs a { margin-right: 18px; margin-bottom: 6px; }
  /* nav mobile: tampil langsung tanpa hamburger */
  .times-nav .wp-block-navigation__responsive-container-open,
  .times-nav .wp-block-navigation__responsive-container-close { display: none !important; }
  .times-nav .wp-block-navigation__responsive-container {
    display: block !important;
    position: static !important;
    width: auto !important;
    height: auto !important;
    background: transparent !important;
    padding: 0 !important;
  }
  .times-nav .wp-block-navigation__container { flex-wrap: wrap; justify-content: center; gap: 0; }
  .times-nav a,
  .times-nav .wp-block-navigation-item__content {
    font-size: 12px !important;
    line-height: 34px !important;
    padding: 0 8px !important;
  }
  .times-masthead .wp-block-site-title,
  .times-masthead .wp-block-site-title a { font-size: 34px; }
  .article-header { padding-top: 1.8rem; }
  .article-header h1 { font-size: 32px; }
  .article-meta { margin-top: 1.8rem; }
  figure.thumb { margin: 1.8rem 0 0; }
  .article-body { margin-top: 1.8rem; font-size: 16px; }
  .share, .authorbox { margin-top: 1.8rem; }
  .authorbox { padding: 1em; }
  .authorbox .avatar { width: 54px; height: 54px; font-size: 22px; }
  .related-grid { grid-template-columns: 1fr; }
  .related-item h3 { font-size: 15px; }
}
@media (max-width: 520px) {
  .hero-media img { height: 64vw; min-height: 240px; }
  .hero h2 { width: 100%; }
  .rail-left .story { grid-template-columns: 1fr; }
  .rail-right { grid-template-columns: 1fr; }
  .rail-right .story { display: grid; grid-template-columns: 42% 1fr; gap: 14px; align-items: start; }
  .rail-right .story .story-kicker { margin-top: 0; }
  .section-head { padding-top: 26px; }
  .category-grid { grid-template-columns: 1fr; }
  .category-card { padding: 18px 0; border-left: 0; border-bottom: 1px solid var(--rule); }
  .category-card:first-child { padding: 0 0 22px; border-bottom: 1px solid #000; grid-row: auto; }
  .archive-list { grid-template-columns: 1fr; }
  .latest-list { grid-template-columns: 1fr; padding-top: 6px; }
  .latest-item { padding: 16px 0; border-left: 0; border-top: 1px solid var(--rule); }
}

/* ============================================================
   5. FOOTER (sesuai acuan — simpel, tanpa Quick Links/Recent Posts)
   ============================================================ */
.times-footer {
  overflow: hidden;
  border-top: 1px solid #eaeaea;
  padding: 30px 0 0;
  background: #fafafa;
  color: #555;
  font-size: 11px;
}
.times-footer .page { width: min(1170px, calc(100% - 36px)); margin: 0 auto; }
.footer-top { display: grid; grid-template-columns: 1.1fr 1fr; gap: 50px; align-items: start; }
.footer-brand strong { color: #000; font-family: "Bodoni Moda", serif; font-size: 25px; line-height: 1; font-weight: 400; }
.footer-brand strong a { color: #000; text-decoration: none; }
.footer-brand p { margin: 6px 0 0; font-family: "Libre Franklin", sans-serif; font-size: 12px; }
.footer-links { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px 20px; }
.footer-links a {
  color: #000; text-decoration: none; font-family: "Libre Franklin", sans-serif;
  font-size: 10px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
}
.footer-links a:hover { color: #31609c; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  margin-top: 24px;
  padding: 20px 0;
  border-top: 1px solid #eaeaea;
  background: #fff;
  box-shadow: 0 0 0 100vmax #fff;
  clip-path: inset(0 -100vmax);
}
@media (max-width: 600px) {
  .footer-top { grid-template-columns: 1fr; gap: 20px; }
  .footer-links { justify-content: flex-start; }
  .footer-bottom { flex-direction: column; gap: 8px; }
}

/* ============================================================
   Pilihan pemilik (2026-10-13): tombol share artikel disembunyikan
   ("KEDUANYA": share + ikon medsos footer dihilangkan).
   Hapus blok ini kalau suatu saat mau tombol share tampil lagi.
   ============================================================ */
.share { display: none !important; }

/* ---- pagination (category/archive) ---- */
.pagination { margin: 34px 0 10px; text-align: center; }
.pagination .nav-links { display: inline-flex; gap: 6px; align-items: center; }
.pagination .page-numbers {
  display: inline-block;
  min-width: 38px;
  height: 38px;
  line-height: 38px;
  padding: 0 10px;
  border: 1px solid #e0e0e0;
  color: #494949;
  font-family: "Libre Franklin", sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  text-decoration: none;
  text-transform: uppercase;
}
.pagination .page-numbers.current { background: #000; border-color: #000; color: #fff; }
.pagination a.page-numbers:hover { border-color: #000; color: #000; }

/* ---- sub-bab tabs (category) ---- */
.subbab-tabs { border-bottom: 2px solid #000; margin: 6px 0 26px; overflow-x: auto; white-space: nowrap; scrollbar-width: none; -ms-overflow-style: none; }
.subbab-tabs::-webkit-scrollbar { display: none; }
.subbab-tabs a { display: inline-block; padding: 10px 4px; margin-right: 24px; color: #888; text-decoration: none; font-family: "Libre Franklin", sans-serif; font-size: 13px; text-transform: uppercase; letter-spacing: 1px; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.subbab-tabs a:hover, .subbab-tabs a.on { color: #000; border-bottom-color: #000; }
