/*
Theme Name: Mama Journal Child
Theme URI: https://example.com/mama-journal-child
Template: twentytwentyfour
Author: Lizhihao
Description: Black and white editorial child theme for family and lifestyle storytelling.
Version: 1.5.0
Text Domain: mama-child
*/

:root {
  --bg: #efefef;
  --surface: #f7f7f7;
  --text: #111;
  --muted: #666;
  --line: #c8c8c8;
  --line-strong: #111;
  --serif: "Noto Serif TC", serif;
  --sans: "Noto Sans TC", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

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

a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; max-width: 100%; }

.site-container {
  width: min(1080px, calc(100vw - 30px));
  margin: 0 auto;
}

.site-header { border-bottom: 1px solid var(--line); background: transparent; }

.site-header__bar {
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.site-header__bar-inner {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header__top {
  position: relative;
  text-align: center;
  padding: 28px 0 18px;
}

.brand {
  display: inline-grid;
  justify-items: center;
  gap: 8px;
}

.brand__mark {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #111;
}

.brand__title {
  display: block;
  font-family: var(--serif);
  font-size: clamp(2.1rem, 4.1vw, 3rem);
  line-height: 1.02;
}

.brand__subtitle {
  display: block;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.header-cta {
  position: absolute;
  right: 0;
  top: 28px;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid #111;
  background: #111;
  color: #fff;
  display: inline-flex;
  align-items: center;
  font-size: 11px;
}

.header-cta:hover { background: #fff; color: #111; }

.primary-nav {
  border-top: 3px solid var(--line-strong);
  border-bottom: 1px solid var(--line);
  padding: 11px 0;
}

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

.primary-nav a:hover,
.primary-nav .current-menu-item a,
.primary-nav .current_page_item a {
  text-decoration: underline;
}

main.site-main { padding: 24px 0 46px; }

.home-hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 26px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.hero-card__eyebrow {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 8px;
  border: 1px solid var(--line);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.hero-card h1 {
  margin: 12px 0 10px;
  font-family: var(--serif);
  font-size: clamp(2.2rem, 4vw, 3.35rem);
  line-height: 1.08;
}

.hero-card p,
.hero-note p { margin: 0; color: #2e2e2e; }

.hero-note h3 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 2.4rem;
  line-height: 1.06;
}

.hero-card__actions { margin-top: 14px; display: flex; gap: 9px; flex-wrap: wrap; }

.btn {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid #111;
  display: inline-flex;
  align-items: center;
  font-size: 11px;
}

.btn--solid { background: #111; color: #fff; }
.btn--solid:hover { background: #fff; color: #111; }
.btn--light { background: #fff; }
.btn--light:hover { background: #111; color: #fff; }

.home-section {
  padding-top: 20px;
  margin-bottom: 8px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  margin-bottom: 10px;
}

.section-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.2rem, 3.4vw, 3rem);
  line-height: 1.02;
}

.section-head p { margin: 0; color: var(--muted); font-size: 13px; }

.featured-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 20px;
}

.featured-main img,
.featured-sub img {
  aspect-ratio: 16/9;
  object-fit: cover;
}

.featured-sub { display: grid; gap: 18px; }
.featured-sub img { aspect-ratio: 16/10; }

.featured-body { padding: 10px 0 0; border-bottom: 1px solid var(--line); padding-bottom: 12px; }

.meta-row {
  display: flex;
  gap: 7px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}

.meta-tag {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  background: #111;
  color: #fff;
  font-size: 10px;
}

.featured-title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 2.8vw, 3rem);
  line-height: 1.08;
}

.latest-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 20px;
}

.story-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.story-card__media img {
  aspect-ratio: 4/3;
  object-fit: cover;
}

.story-card__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.story-card__title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.7rem, 2.2vw, 2.55rem);
  line-height: 1.1;
}

.story-card__excerpt { margin: 0; color: #333; font-size: 14px; }

.read-link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
}

.read-link::after { content: "→"; }
.read-link:hover { text-decoration: underline; }

.home-bottom {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.author-panel h3,
.category-panel h3,
.listing-side h3,
.widget-title {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: 2.2rem;
  line-height: 1;
}

.author-top {
  display: grid;
  grid-template-columns: 66px 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.author-avatar { width: 66px; height: 66px; background: #d1d1d1; }
.author-name { margin: 0; font-family: var(--serif); font-size: 2.2rem; line-height: 1; }
.author-title { margin: 4px 0 0; font-size: 11px; color: var(--muted); letter-spacing: 0.08em; }
.author-copy { margin: 0; color: #333; }

.author-links,
.category-chips { margin-top: 10px; display: flex; gap: 7px; flex-wrap: wrap; }

.author-links a,
.category-chips a {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 11px;
  background: #fff;
}

.author-links a:hover,
.category-chips a:hover { border-color: #111; }

.listing-layout,
.single-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 20px;
}

.listing-hero {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.listing-hero h1,
.listing-hero h2 {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-size: clamp(2rem, 3.1vw, 2.8rem);
  line-height: 1.06;
}

.listing-hero p { margin: 0; color: var(--muted); }

.listing-side { display: grid; gap: 14px; }
.listing-side .panel,
.widget { border: 1px solid var(--line); padding: 12px; background: #f9f9f9; }

.widget ul,
.panel ul { margin: 0; padding: 0; list-style: none; }

.widget li,
.panel li { margin-bottom: 7px; padding-left: 10px; position: relative; }

.widget li::before,
.panel li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #111;
}

.single-article {
  background: transparent;
}

.single-header { margin-bottom: 10px; }

.single-header h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.2rem, 3.5vw, 3rem);
  line-height: 1.08;
}

.single-cover { margin: 0 0 14px; }
.single-cover img { aspect-ratio: 16/9; object-fit: cover; }
.single-content p { margin: 0 0 14px; }

.single-content blockquote {
  margin: 18px 0;
  padding: 10px 12px;
  border-left: 4px solid #111;
  background: #f7f7f7;
}

.single-footer {
  margin-top: 18px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
}

.post-nav { display: flex; gap: 10px; }

.pagination { margin-top: 14px; }
.pagination .nav-links { display: flex; gap: 7px; flex-wrap: wrap; }

.pagination .page-numbers {
  min-width: 32px;
  min-height: 32px;
  border: 1px solid var(--line);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.pagination .current { background: #111; color: #fff; border-color: #111; }

.site-footer {
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding: 18px 0;
}

.site-footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.footer-brand { font-family: var(--serif); font-size: 1.9rem; line-height: 1; }
.footer-note { margin: 0; color: var(--muted); font-size: 12px; }

@media (max-width: 980px) {
  .home-hero,
  .featured-grid,
  .home-bottom,
  .listing-layout,
  .single-layout {
    grid-template-columns: 1fr;
  }

  .header-cta {
    position: static;
    margin: 10px auto 0;
    width: fit-content;
  }

  .latest-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .site-container { width: calc(100vw - 18px); }
  .story-card { grid-template-columns: 1fr; }
  .section-head { display: block; }
  .site-footer__inner { flex-direction: column; align-items: flex-start; }
}
