/*
Theme Name: Janaz
Theme URI: https://janaz.org
Author: Sam Jackson
Author URI: https://janaz.org
Description: The official Janaz theme — a nonprofit platform ensuring no janāzah is missed. Community care beyond life. Clean, mobile-first, and spiritually grounded design.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: janaz
Tags: custom-menu, custom-logo, featured-images, full-width-template, responsive-layout, accessibility-ready
*/

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  --forest:         #2D5016;
  --forest-dark:    #1e3a0e;
  --forest-mid:     #3a6b1d;
  --moss:           #4a7c2a;
  --sage:           #8aad6b;
  --sage-light:     #c4d9ae;
  --cream:          #f5f2eb;
  --cream-warm:     #ede8de;
  --parchment:      #e8e2d6;
  --white:          #ffffff;
  --ink:            #1a1a1a;
  --ink-soft:       #3d3d3d;
  --ink-muted:      #6b6b6b;
  --border:         #d4cfc5;
  --border-light:   #e8e4dc;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'DM Sans', 'Helvetica Neue', sans-serif;
  --font-arabic:  'Amiri', serif;

  --r-sm:   6px;
  --r-md:   12px;
  --r-lg:   20px;
  --r-xl:   28px;
  --r-pill: 999px;

  --shadow-sm: 0 1px 4px rgba(45,80,22,.07);
  --shadow-md: 0 4px 16px rgba(45,80,22,.10);
  --shadow-lg: 0 12px 40px rgba(45,80,22,.14);

  --header-h: 72px;
  --max-w: 1160px;
  --trans: 250ms ease;
}

/* ============================================================
   RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color var(--trans); }
ul, ol { list-style: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }

/* ── CRITICAL: Global SVG guard ──────────────────────────────────
   Prevents inline SVGs without explicit dimensions from expanding
   to the browser's default 300×150 or full viewport width.        */
svg {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  overflow: visible;
}
svg:not([width]):not([height]) {
  width: 1em;
  height: 1em;
}
/* ──────────────────────────────────────────────────────────────── */

/* ============================================================
   LAYOUT
   ============================================================ */
.wrap {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: clamp(1rem, 5vw, 2.5rem);
}
.wrap--sm { max-width: 680px; }
.wrap--md { max-width: 860px; }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
}
h1 { font-size: clamp(2.2rem, 6vw, 4rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 3vw, 1.6rem); }
p  { line-height: 1.7; }

.arabic {
  font-family: var(--font-arabic);
  direction: rtl;
}
.label {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--moss);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  padding: .7rem 1.4rem;
  font-size: .875rem;
  font-weight: 600;
  letter-spacing: .01em;
  border-radius: var(--r-pill);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--trans);
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  min-height: 44px;
}
.btn-primary { background: var(--forest); color: var(--white); border-color: var(--forest); }
.btn-primary:hover { background: var(--forest-dark); border-color: var(--forest-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-outline { background: transparent; color: var(--forest); border-color: var(--forest); }
.btn-outline:hover { background: var(--forest); color: var(--white); }
.btn-ghost { background: var(--white); color: var(--ink-soft); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--forest); color: var(--forest); }
.btn-white { background: var(--white); color: var(--forest); border-color: var(--white); }
.btn-white:hover { background: var(--cream); }
.btn-lg { padding: .95rem 2rem; font-size: 1rem; }
.btn-sm { padding: .45rem .9rem; font-size: .8rem; min-height: 36px; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(245,242,235,.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
  transition: box-shadow var(--trans), background var(--trans);
}
.site-header.is-scrolled {
  box-shadow: var(--shadow-sm);
  background: rgba(245,242,235,.97);
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 1.5rem;
}

/* Logo */
.site-logo { flex-shrink: 0; }
.site-logo img { height: 34px; width: auto; }

/* Desktop nav */
.nav-primary {
  display: flex;
  align-items: center;
  gap: .25rem;
}
.nav-primary a {
  font-size: .875rem;
  font-weight: 500;
  color: var(--ink-soft);
  padding: .45rem .75rem;
  border-radius: var(--r-sm);
  transition: all 150ms ease;
}
.nav-primary a:hover { color: var(--forest); background: rgba(45,80,22,.06); }
.nav-primary a.current-menu-item { color: var(--forest); font-weight: 600; }

/* Header CTA buttons */
.header-cta {
  display: flex;
  align-items: center;
  gap: .5rem;
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px; height: 44px;
  background: none;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
  gap: 5px;
  padding: 11px;
  -webkit-tap-highlight-color: transparent;
  transition: border-color var(--trans);
}
.nav-toggle:hover { border-color: var(--forest); }
.nav-toggle span {
  display: block;
  width: 20px; height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: all var(--trans);
  transform-origin: center;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; width: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile drawer */
.nav-drawer {
  display: none;
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(340px, 90vw);
  z-index: 99;
  background: var(--white);
  flex-direction: column;
  padding: calc(var(--header-h) + 1.5rem) 1.5rem 2rem;
  transform: translateX(100%);
  transition: transform 350ms cubic-bezier(.4,0,.2,1);
  box-shadow: -8px 0 40px rgba(0,0,0,.12);
  overflow-y: auto;
}
.nav-drawer.is-open { transform: translateX(0); }
.nav-drawer-links {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.nav-drawer-links a {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--ink);
  padding: .9rem 0;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-drawer-links a:hover { color: var(--forest); }
.nav-drawer-links a::after {
  content: '→';
  font-family: var(--font-body);
  font-size: .9rem;
  opacity: .3;
  transition: opacity var(--trans), transform var(--trans);
}
.nav-drawer-links a:hover::after { opacity: .7; transform: translateX(4px); }

.nav-drawer-actions {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  margin-top: 2rem;
}
.nav-drawer-actions .btn { width: 100%; padding: 1rem; border-radius: var(--r-lg); }

.nav-scrim {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 98;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.nav-scrim.is-open { display: block; }

/* Responsive header */
@media (max-width: 960px) {
  .nav-primary { display: none; }
  .header-cta .btn { display: none; }
  .header-cta .btn.btn-icon { display: flex; }
  .nav-toggle { display: flex; }
  .nav-drawer { display: flex; }
  --header-h: 64px;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  padding: clamp(4rem, 12vw, 9rem) 0 clamp(3rem, 8vw, 7rem);
  text-align: center;
  overflow: hidden;
  background: var(--cream);
}
/* Subtle geometric Islamic-inspired background */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 15% 60%, rgba(45,80,22,.045) 0%, transparent 100%),
    radial-gradient(ellipse 40% 60% at 85% 20%, rgba(45,80,22,.03) 0%, transparent 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Ccircle cx='40' cy='40' r='37' fill='none' stroke='%232D5016' stroke-width='.4' stroke-opacity='.06'/%3E%3Ccircle cx='40' cy='40' r='26' fill='none' stroke='%232D5016' stroke-width='.4' stroke-opacity='.04'/%3E%3Cline x1='40' y1='3' x2='40' y2='77' stroke='%232D5016' stroke-width='.3' stroke-opacity='.04'/%3E%3Cline x1='3' y1='40' x2='77' y2='40' stroke='%232D5016' stroke-width='.3' stroke-opacity='.04'/%3E%3C/svg%3E");
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; }

.hero-bismillah {
  font-family: var(--font-arabic);
  font-size: clamp(1rem, 3vw, 1.4rem);
  color: var(--moss);
  opacity: .75;
  margin-bottom: 1.5rem;
  direction: rtl;
  display: block;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 8vw, 5.2rem);
  font-weight: 700;
  line-height: 1.03;
  letter-spacing: -.03em;
  color: var(--ink);
  margin-bottom: 1.2rem;
}
.hero-title em {
  font-style: italic;
  color: var(--forest);
}
.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  color: var(--ink-muted);
  max-width: 480px;
  margin: 0 auto 2.5rem;
  line-height: 1.65;
}
.hero-search-wrap { max-width: 540px; margin: 0 auto 1rem; }

.search-form {
  display: flex;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--r-pill);
  padding: 5px 5px 5px 18px;
  box-shadow: var(--shadow-md);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.search-form:focus-within {
  border-color: var(--forest);
  box-shadow: var(--shadow-lg), 0 0 0 4px rgba(45,80,22,.07);
}
.search-form input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: .9375rem;
  min-width: 0;
}
.search-form input::placeholder { color: var(--ink-muted); }
.search-form button {
  flex-shrink: 0;
  background: var(--forest);
  color: var(--white);
  border: none;
  border-radius: var(--r-pill);
  padding: .65rem 1.35rem;
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: .4rem;
  transition: background 150ms ease;
}
.search-form button:hover { background: var(--forest-dark); }

.hero-locate {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .875rem;
  color: var(--ink-muted);
  transition: color 150ms ease;
}
.hero-locate:hover { color: var(--forest); }

@media (max-width: 580px) {
  .search-form {
    flex-direction: column;
    border-radius: var(--r-xl);
    padding: .9rem;
    gap: .6rem;
  }
  .search-form input { padding: .25rem 0; font-size: 1rem; }
  .search-form button {
    border-radius: var(--r-lg);
    padding: .85rem;
    justify-content: center;
    font-size: .95rem;
  }
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section { padding: clamp(2.5rem,8vw,5rem) 0; }
.section-sm { padding: clamp(2rem,5vw,3.5rem) 0; }

.section-dark { background: var(--forest); }
.section-parchment { background: var(--parchment); }
.section-white { background: var(--white); }

.section-head { margin-bottom: clamp(1.5rem,4vw,2.5rem); }
.section-head.center { text-align: center; }
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem,4vw,2.5rem);
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.15;
}
.section-subtitle {
  margin-top: .5rem;
  font-size: .95rem;
  color: var(--ink-muted);
  max-width: 460px;
  line-height: 1.65;
}
.section-head.center .section-subtitle { margin-inline: auto; }
.section-dark .section-title { color: var(--white); }
.section-dark .section-subtitle { color: rgba(255,255,255,.7); }

/* ============================================================
   FILTER BAR
   ============================================================ */
.filter-bar {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.filter-group {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  flex: 1;
  min-width: 150px;
}
.filter-label {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.filter-input {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  padding: .6rem 1rem;
  font-size: .875rem;
  color: var(--ink);
  outline: none;
  transition: border-color 150ms ease;
  -webkit-appearance: none;
  appearance: none;
}
.filter-input:focus { border-color: var(--forest); }
select.filter-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b6b6b' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 2.4rem;
  cursor: pointer;
}

/* ============================================================
   ANNOUNCEMENT CARDS
   ============================================================ */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
@media (max-width: 900px) { .cards-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 580px) { .cards-grid { grid-template-columns: 1fr; } }

.card {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--r-xl);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: all var(--trans);
  position: relative;
  overflow: hidden;
}
.card::after {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--forest), var(--sage));
  opacity: 0;
  transition: opacity var(--trans);
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); border-color: var(--sage-light); }
.card:hover::after { opacity: 1; }

.card-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
}
.card-masjid {
  font-size: .8rem;
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  gap: .3rem;
  margin-top: .15rem;
}
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
}
.card-meta-item {
  display: flex;
  align-items: center;
  gap: .3rem;
  font-size: .8rem;
  color: var(--ink-muted);
}
.card-meta-item svg { width: 13px; height: 13px; color: var(--moss); flex-shrink: 0; }

.card-note {
  font-size: .8rem;
  color: var(--ink-muted);
  background: var(--cream);
  border-left: 2px solid var(--sage-light);
  padding: .5rem .9rem;
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}
.card-actions {
  display: flex;
  gap: .5rem;
  margin-top: auto;
}
.card-actions .btn { flex: 1; font-size: .78rem; padding: .5rem .75rem; min-height: 38px; }

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: .75rem;
  border-top: 1px solid var(--border-light);
  font-size: .75rem;
  color: var(--ink-muted);
}
.card-foot-left { display: flex; gap: .75rem; }
.card-count { display: flex; align-items: center; gap: .3rem; }
.card-count svg { width: 12px; height: 12px; }

.verified {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .75rem;
  color: var(--forest);
  font-weight: 600;
}
.verified svg { width: 13px; height: 13px; }

/* card-top: name + verified badge side by side */
.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .5rem;
  margin-bottom: .5rem;
}

/* italic sub-name e.g. "(Test John Doe)" */
.card-subname {
  display: block;
  font-family: var(--font-body);
  font-size: .78rem;
  font-weight: 400;
  color: var(--ink-muted);
  font-style: italic;
  margin-top: .15rem;
}

/* source attribution in card footer */
.card-source {
  font-size: .72rem;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}

/* ============================================================
   ABOUT / VALUES (dark section)
   ============================================================ */
.values-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 2rem;
  margin-top: 2.5rem;
}
@media (max-width: 700px) { .values-grid { grid-template-columns: 1fr; gap: 1.25rem; } }

.value-item { text-align: center; }
.value-icon-wrap {
  width: 54px; height: 54px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}
.value-icon-wrap svg { width: 22px; height: 22px; color: rgba(255,255,255,.9); }
.value-name { font-family: var(--font-display); font-size: 1.2rem; color: var(--white); font-weight: 600; margin-bottom: .4rem; }
.value-desc { font-size: .875rem; color: rgba(255,255,255,.7); line-height: 1.6; }

/* ============================================================
   NOTIFICATION FORM
   ============================================================ */
.notify-card {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--r-xl);
  padding: clamp(1.5rem,5vw,3rem);
  max-width: 520px;
  margin-inline: auto;
  text-align: center;
  box-shadow: var(--shadow-md);
}
.notify-bell {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(45,80,22,.08);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}
.notify-bell svg { width: 22px; height: 22px; color: var(--forest); }
.notify-title { font-family: var(--font-display); font-size: 1.7rem; font-weight: 600; margin-bottom: .4rem; }
.notify-subtitle { font-size: .9375rem; color: var(--ink-muted); margin-bottom: 1.75rem; }

.notify-form { display: flex; flex-direction: column; gap: 1rem; text-align: left; }
.form-row label {
  display: block;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: .35rem;
}
.form-row input {
  width: 100%;
  background: var(--cream);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  padding: .75rem 1rem;
  font-size: .9375rem;
  outline: none;
  transition: border-color 150ms, background 150ms;
}
.form-row input:focus { border-color: var(--forest); background: var(--white); }

.freq-toggle {
  display: flex;
  background: var(--cream);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  padding: 3px;
  gap: 3px;
}
.freq-opt {
  flex: 1;
  padding: .55rem;
  border-radius: calc(var(--r-md) - 3px);
  font-size: .8125rem;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition: all 150ms;
  color: var(--ink-muted);
  border: none;
  background: none;
}
.freq-opt.active {
  background: var(--white);
  color: var(--ink);
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.radio-list { display: flex; flex-direction: column; gap: .5rem; }
.radio-opt {
  display: flex;
  align-items: flex-start;
  gap: .9rem;
  padding: .85rem 1rem;
  border: 1.5px solid var(--border-light);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: border-color 150ms;
}
.radio-opt:has(input:checked) { border-color: var(--forest); background: rgba(45,80,22,.025); }
.radio-opt input { width: 17px; height: 17px; accent-color: var(--forest); flex-shrink: 0; margin-top: 2px; }
.radio-opt-title { font-size: .875rem; font-weight: 600; }
.radio-opt-desc { font-size: .78rem; color: var(--ink-muted); margin-top: 2px; }

.notify-form .btn-primary {
  width: 100%;
  padding: 1rem;
  border-radius: var(--r-lg);
  font-size: 1rem;
  margin-top: .25rem;
}
.notify-legal { font-size: .72rem; color: var(--ink-muted); text-align: center; line-height: 1.5; margin-top: .75rem; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--cream-warm);
  border-top: 1px solid var(--border);
  padding: 2rem 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.footer-logo img { height: 26px; opacity: .65; transition: opacity var(--trans); }
.footer-logo:hover img { opacity: 1; }
.footer-center { flex: 1; text-align: center; }
.footer-tagline { font-size: .8rem; color: var(--ink-muted); }
.footer-bismillah { font-family: var(--font-arabic); font-size: .9rem; color: var(--moss); opacity: .6; direction: rtl; margin-top: .2rem; }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { font-size: .8rem; color: var(--ink-muted); }
.footer-links a:hover { color: var(--forest); }
@media (max-width: 640px) {
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }
}

/* ============================================================
   CONTENT / PAGE TEMPLATES
   ============================================================ */
.page-content { padding: clamp(2.5rem,8vw,5rem) 0; min-height: 55vh; }
.entry-content { max-width: 700px; margin-inline: auto; }
.entry-content h1,.entry-content h2,.entry-content h3 { margin-top: 2rem; margin-bottom: .9rem; }
.entry-content h1:first-child,.entry-content h2:first-child { margin-top: 0; }
.entry-content p { margin-bottom: 1.25rem; color: var(--ink-soft); }
.entry-content a { color: var(--forest); text-decoration: underline; text-decoration-color: rgba(45,80,22,.35); text-underline-offset: 3px; }
.entry-content a:hover { text-decoration-color: var(--forest); }
.entry-content ul { list-style: disc; padding-left: 1.5rem; margin-bottom: 1.25rem; }
.entry-content ol { list-style: decimal; padding-left: 1.5rem; margin-bottom: 1.25rem; }
.entry-content li { margin-bottom: .5rem; }
.entry-content blockquote {
  border-left: 3px solid var(--sage);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: var(--parchment);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-style: italic;
  color: var(--ink-soft);
}

/* ============================================================
   WP ALIGNMENT & CORE BLOCKS
   ============================================================ */
.alignleft { float: left; margin-right: 1.5rem; margin-bottom: 1rem; }
.alignright { float: right; margin-left: 1.5rem; margin-bottom: 1rem; }
.aligncenter { display: block; margin-inline: auto; }
.alignfull { width: 100vw; margin-left: calc(50% - 50vw); }
.alignwide { max-width: 1100px; margin-inline: auto; }

/* ============================================================
   UTILITIES
   ============================================================ */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap;
}
.text-center { text-align: center; }
.mt-sm { margin-top: .75rem; }
.mt-md { margin-top: 1.5rem; }
.mt-lg { margin-top: 2.5rem; }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.anim-fadein { animation: fadeUp .5s ease both; }
.anim-delay-1 { animation-delay: .1s; }
.anim-delay-2 { animation-delay: .2s; }
.anim-delay-3 { animation-delay: .3s; }

/* ============================================================
   MOBILE APP FEEL — extra polish on small screens
   ============================================================ */
@media (max-width: 580px) {
  :root { --header-h: 60px; }

  .card { border-radius: var(--r-lg); padding: 1.25rem; }
  .notify-card { border-radius: var(--r-lg); }

  .btn { border-radius: var(--r-lg); }

  /* Bottom safe area for modern phones */
  .site-footer { padding-bottom: max(2rem, env(safe-area-inset-bottom, 1rem)); }

  /* Remove hover effects that feel wrong on touch */
  .card:hover { transform: none; }
}
