/*
Theme Name: Millah Abraham
Theme URI: https://millahabraham.info
Author: Millah Abraham
Description: Tema kustom berdasarkan desain Figma "MA" (Beranda dan Dasar Ajaran).
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: millah-abraham
*/

:root {
  --ma-black: #000;
  --ma-white: #fff;
  --ma-beige: #f4f0ea;
  --ma-text: #111;
  --ma-muted: #555;
  --ma-line: #222;
  --ma-wrap: 1040px;
  --ma-head: "Montserrat", system-ui, sans-serif;
  --ma-body: "Nunito", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--ma-body);
  font-size: 15px;
  line-height: 1.65;
  color: var(--ma-text);
  background: var(--ma-white);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--ma-head); line-height: 1.2; margin: 0 0 .5em; }
p { margin: 0 0 1em; }

.wrap { width: min(var(--ma-wrap), 100% - 32px); margin-inline: auto; }
.screen-reader-text { position: absolute; left: -9999px; }

/* ---------- Bahasa ---------- */
.lang-switch {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid #999; border-radius: 999px; padding: 3px 10px;
  font-size: 12px; background: #fff; color: #111; cursor: pointer;
}
.lang-switch .flag { width: 14px; height: 10px; background: linear-gradient(#e70011 50%, #fff 50%); border: 1px solid #ddd; }

/* ---------- Header beranda ---------- */
.hero-banner {
  background: #000 center/cover no-repeat;
  color: #fff; text-align: center;
  padding: 44px 16px 36px;
}
.hero-banner h1 { font-size: clamp(26px, 4vw, 40px); font-weight: 800; letter-spacing: .02em; margin: 0 0 6px; }
.hero-banner p { font-family: var(--ma-head); font-size: clamp(14px, 2vw, 20px); font-weight: 600; margin: 0; }

.masthead { padding: 14px 0 0; position: relative; }
.masthead .lang-wrap { text-align: right; }
.masthead .site-title {
  text-align: center; font-family: var(--ma-head); font-weight: 800;
  font-size: clamp(22px, 3vw, 28px); letter-spacing: .03em; margin: 8px 0 12px;
}
.masthead .site-title a { text-decoration: none; }
.main-nav { border-top: 1px solid var(--ma-line); border-bottom: 1px solid var(--ma-line); }
.main-nav ul { display: flex; justify-content: center; gap: 28px; list-style: none; margin: 0; padding: 7px 0; flex-wrap: wrap; }
.main-nav a { font-family: var(--ma-head); font-size: 11px; font-weight: 600; text-decoration: none; }
.main-nav a:hover, .main-nav .current-menu-item a { text-decoration: underline; }

/* ---------- Header bar hitam (halaman dalam) ---------- */
.bar-header { background: #000; color: #fff; }
.bar-header .wrap { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; width: min(1120px, 100% - 32px); }
.bar-header .brand { font-family: var(--ma-head); font-weight: 800; font-size: 14px; text-decoration: none; letter-spacing: .02em; }
.bar-header nav ul { display: flex; align-items: center; gap: 22px; list-style: none; margin: 0; padding: 0; }
.bar-header nav a { font-family: var(--ma-head); font-size: 11px; font-weight: 600; text-decoration: none; }

/* ---------- Beranda: unggulan ---------- */
.featured { display: grid; grid-template-columns: 1fr 1.6fr .9fr; gap: 22px; padding: 28px 0 24px; align-items: start; }
.featured h2 { font-size: clamp(22px, 2.6vw, 30px); font-weight: 800; }
.featured .lead { font-size: 13px; }
.featured .hero-img img { width: 100%; aspect-ratio: 4/5; object-fit: cover; }
.featured aside { border-left: 1px solid #bbb; padding-left: 16px; }
.featured aside h3 { font-size: 13px; font-weight: 800; margin-bottom: 12px; }
.mini-post { display: grid; grid-template-columns: 1fr 1.1fr; gap: 10px; margin-bottom: 12px; text-decoration: none; }
.mini-post.no-thumb { grid-template-columns: 1fr; }
.mini-post img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.mini-post strong { display: block; font-family: var(--ma-head); font-size: 11px; line-height: 1.3; }
.mini-post span { font-size: 10px; color: var(--ma-muted); }

.intro-center { text-align: center; max-width: 700px; margin: 24px auto 40px; font-size: 14px; }

/* ---------- Visi & Misi ---------- */
.visimisi { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-bottom: 44px; }
.visimisi .col small { display: block; font-family: var(--ma-head); font-weight: 600; font-size: 12px; }
.visimisi .col h2 { font-size: clamp(20px, 2.2vw, 26px); font-weight: 800; }
.visimisi .col img { width: 100%; aspect-ratio: 16/9; object-fit: cover; margin-bottom: 18px; }
.visimisi .col.right { text-align: right; }
.visimisi p { font-size: 12.5px; }

/* ---------- Banner kutipan ---------- */
.quote-banner {
  background: #111 center/cover no-repeat; color: #fff; text-align: center;
  padding: 34px 24px; margin: 0 auto 56px; position: relative;
}
.quote-banner::before { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.55); }
.quote-banner > * { position: relative; }
.quote-banner small { display: block; font-family: var(--ma-head); font-size: 10px; font-weight: 700; margin-bottom: 12px; }
.quote-banner blockquote { margin: 0 auto 16px; max-width: 760px; font-family: var(--ma-head); font-weight: 700; font-size: clamp(14px, 1.8vw, 18px); }
.btn { display: inline-block; font-family: var(--ma-head); font-size: 11px; font-weight: 700; padding: 5px 14px; text-decoration: none; border: 0; cursor: pointer; }
.btn-light { background: #fff; color: #000; }
.btn-dark { background: #000; color: #fff; }

/* ---------- Artikel ---------- */
.section-title { text-align: center; font-size: 18px; font-weight: 800; margin-bottom: 26px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card { text-decoration: none; display: block; }
.card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; margin-bottom: 8px; background: #ddd; }
.card .cat { font-family: var(--ma-head); font-size: 10px; font-weight: 700; display: block; margin-bottom: 6px; }
.card h3 { font-size: 15px; font-weight: 800; margin-bottom: 6px; }
.card p { font-size: 11px; color: var(--ma-muted); }
.more-link { display: block; text-align: center; margin: 34px 0 60px; font-family: var(--ma-head); font-size: 12px; font-weight: 700; }

/* ---------- Kontak ---------- */
.join { background: var(--ma-beige); padding: 56px 0; }
.join .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
.join h2 { font-size: 20px; font-weight: 800; }
.join p { font-size: 12.5px; }
.join form label { display: block; font-family: var(--ma-head); font-size: 10px; font-weight: 700; margin-bottom: 4px; }
.join form input[type=text], .join form input[type=email], .join form textarea {
  width: 100%; border: 0; background: #fff; padding: 8px 10px; font: inherit; margin-bottom: 12px;
}
.join form textarea { min-height: 110px; }
.join .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.join .notice { font-size: 12px; margin-top: 10px; }

/* ---------- Footer ---------- */
.site-footer { background: #000; color: #ddd; text-align: center; padding: 42px 16px 24px; font-size: 10px; }
.site-footer .disclaimer { max-width: 780px; margin: 0 auto 40px; }
.site-footer .copy { font-size: 9px; }

/* ---------- Halaman Dasar Ajaran ---------- */
.da-hero { height: 240px; background: #cfcfcf center/cover no-repeat; }
.da-title { background: #fff; width: min(330px, 80%); margin: -80px auto 0; text-align: center; padding: 26px 20px 20px; position: relative; }
.da-title h1 { font-size: clamp(20px, 2.4vw, 24px); font-weight: 800; margin: 0 0 14px; }
.da-title hr { width: 56px; border: 0; border-top: 2px solid #000; margin: 0 auto; }
.da-intro { max-width: 760px; margin: 26px auto; text-align: center; font-size: 12.5px; }
.da-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 760px; margin: 0 auto 40px; }
.da-card { background: var(--ma-beige); cursor: pointer; text-align: left; border: 0; padding: 0; font: inherit; display: block; }
.da-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.da-card .body { padding: 16px 18px 20px; }
.da-card h3 { font-size: 14px; font-weight: 800; }
.da-card p { font-size: 11px; margin: 0; }
.da-card.wide { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1.2fr; align-items: stretch; }
.da-card.wide .body { display: flex; flex-direction: column; justify-content: center; }
.da-card.wide img { aspect-ratio: auto; height: 100%; }

/* ---------- Modal ---------- */
.ma-modal { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: none; align-items: flex-start; justify-content: center; z-index: 999; overflow-y: auto; padding: 40px 16px; }
.ma-modal.open { display: flex; }
.ma-modal .box { background: var(--ma-beige); width: min(700px, 100%); position: relative; }
.ma-modal .box img.cover { width: 100%; height: 150px; object-fit: cover; }
.ma-modal .inner { padding: 26px 34px 40px; font-size: 12px; }
.ma-modal h2 { text-align: center; font-size: 20px; font-weight: 800; margin-bottom: 18px; }
.ma-modal .close { position: absolute; top: 8px; right: 12px; background: rgba(0,0,0,.5); color: #fff; border: 0; width: 28px; height: 28px; border-radius: 50%; cursor: pointer; font-size: 16px; line-height: 1; }
body.modal-open { overflow: hidden; }

/* ---------- Artikel tunggal / arsip ---------- */
.entry { max-width: 720px; margin: 40px auto 60px; }
.entry h1 { font-size: clamp(24px, 3vw, 34px); font-weight: 800; }
.entry .meta { color: var(--ma-muted); font-size: 12px; margin-bottom: 24px; }
.entry img.feat { width: 100%; margin-bottom: 24px; }
.archive-head { text-align: center; margin: 40px 0 28px; }

/* ---------- Responsif ---------- */
@media (max-width: 820px) {
  .featured { grid-template-columns: 1fr; }
  .featured aside { border-left: 0; padding-left: 0; }
  .visimisi, .join .wrap, .da-grid { grid-template-columns: 1fr; }
  .visimisi .col.right { text-align: left; }
  .cards { grid-template-columns: 1fr; }
  .da-card.wide { grid-template-columns: 1fr; }
  .bar-header .wrap { flex-wrap: wrap; gap: 10px; }
}
