/*
Theme Name: Heal with Harmony
Theme URI: https://healwithharmony.ca
Author: Heal with Harmony Therapy
Author URI: https://healwithharmony.ca
Description: Custom therapy-practice theme for Heal with Harmony, built from the original design. Bilingual English/Farsi with RTL support and a simple built-in blog.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: heal-with-harmony
*/

/* ==========================================================================
   1. Design tokens
   ========================================================================== */
:root {
  --brand-50:  #f7f8f6;
  --brand-100: #ecefe9;
  --brand-200: #d9dfd3;
  --brand-300: #bcc7b4;
  --brand-400: #9bad8f;
  --brand-500: #7a8e6e;
  --brand-600: #607255;
  --brand-700: #4c5a44;
  --brand-800: #3f4a39;
  --brand-900: #363f31;

  --slate-500: #64748b;
  --slate-600: #4b5768;
  --slate-700: #34404f;

  --font-serif: "Playfair Display", "Vazirmatn", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", "Vazirmatn", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --max-width: 1280px;
  --radius-lg: 1.5rem;
  --radius-xl: 2rem;
}

/* ==========================================================================
   2. Reset & base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--brand-50);
  color: #1e293b;
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  color: var(--brand-900);
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
  line-height: 1.15;
}
p { margin: 0 0 1em; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.section { padding: 6rem 0; }
.section-sm { padding: 4rem 0; }
.bg-white { background: #fff; }
.bg-brand-50 { background: var(--brand-50); }
.bg-brand-100 { background: var(--brand-100); }
.bg-brand-900 { background: var(--brand-900); color: #fff; }
.bg-brand-600 { background: var(--brand-600); color: #fff; }
.text-center { text-align: center; }

.eyebrow {
  display: inline-block;
  padding: .4rem 1rem;
  margin-bottom: 1.5rem;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brand-700);
  background: var(--brand-200);
  border-radius: 999px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: 1rem 2rem;
  border-radius: 999px;
  font-weight: 500;
  font-size: 1.05rem;
  border: 1px solid transparent;
  transition: all .2s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--brand-600); color: #fff; box-shadow: 0 8px 24px -8px rgba(76,90,68,.5); }
.btn-primary:hover { background: var(--brand-700); }
.btn-outline { background: #fff; color: var(--brand-900); border-color: var(--brand-200); }
.btn-outline:hover { background: var(--brand-50); }
.btn-white { background: #fff; color: var(--brand-700); }
.btn-white:hover { background: var(--brand-50); }
.btn-sm { padding: .65rem 1.4rem; font-size: .9rem; }

/* ==========================================================================
   3. Layout helpers
   ========================================================================== */
.grid { display: grid; gap: 2rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
@media (min-width: 600px) and (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: .5rem; }
.gap-3 { gap: .75rem; }
.gap-4 { gap: 1rem; }

.card {
  background: #fff;
  border: 1px solid var(--brand-100);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

/* ==========================================================================
   4. Header / Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247,248,246,.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--brand-200);
}
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  height: 5rem;
  flex-wrap: nowrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--brand-900);
  min-width: 0;
  flex-shrink: 1;
}
.brand img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--brand-200);
  flex-shrink: 0;
}
.brand .mark {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--brand-400);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  flex-shrink: 0;
}
.primary-nav {
  display: none;
  align-items: center;
  gap: 2rem;
}
.primary-nav a {
  font-size: .92rem;
  font-weight: 500;
  color: var(--slate-600);
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
}
.primary-nav a:hover, .primary-nav a.is-active {
  color: var(--brand-700);
  border-color: var(--brand-400);
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-shrink: 0;
}
.lang-toggle {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .85rem;
  font-weight: 500;
  color: var(--brand-700);
  padding: .4rem .9rem;
  border: 1px solid var(--brand-200);
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}
.lang-toggle:hover { background: var(--brand-100); }
.menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--brand-900);
  padding: .4rem;
  flex-shrink: 0;
  min-width: 2.2rem;
  min-height: 2.2rem;
}
.menu-toggle svg { width: 24px; height: 24px; flex-shrink: 0; }
@media (min-width: 900px) {
  .primary-nav { display: flex; }
  .menu-toggle { display: none; }
}
@media (max-width: 480px) {
  .brand img, .brand .mark { width: 40px; height: 40px; }
  .lang-toggle { padding: .35rem .65rem; font-size: .78rem; }
  .lang-toggle svg { width: 14px; height: 14px; }
}
@media (max-width: 380px) {
  .lang-toggle span, .lang-toggle { font-size: .72rem; padding: .3rem .5rem; }
}
.mobile-nav {
  display: none;
  background: var(--brand-100);
  border-bottom: 1px solid var(--brand-200);
}
.mobile-nav.is-open { display: block; }
.mobile-nav a {
  display: block;
  padding: 1rem;
  font-weight: 500;
  color: var(--slate-600);
  border-radius: 6px;
}
.mobile-nav a.is-active { background: var(--brand-200); color: var(--brand-700); }
.mobile-nav .contact-line { display: flex; align-items: center; gap: .6rem; padding: .5rem 1rem; color: var(--slate-600); font-size: .9rem; }

/* ==========================================================================
   5. Hero — full-bleed background photo with overlay
   ========================================================================== */
.hero {
  position: relative;
  overflow: hidden;
  padding: 6rem 0;
  aspect-ratio: 1.93 / 1;
  min-height: 600px;
  display: flex;
  align-items: center;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 32%;
  background-repeat: no-repeat;
  z-index: 0;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    rgba(28,34,25,.97) 0%,
    rgba(28,34,25,.97) 34%,
    rgba(28,34,25,.93) 38%,
    rgba(28,34,25,.82) 41%,
    rgba(28,34,25,.65) 43.5%,
    rgba(28,34,25,.46) 45.5%,
    rgba(28,34,25,.28) 47%,
    rgba(28,34,25,.14) 48.5%,
    rgba(28,34,25,.05) 50%,
    rgba(28,34,25,0) 52%);
  z-index: 1;
}
.hero .container {
  position: relative;
  z-index: 2;
  max-width: none;
  margin: 0;
  padding-left: clamp(1.5rem, 5vw, 4rem);
  padding-right: 1.5rem;
}
.hero-content { max-width: 32rem; }
.hero h1 { font-size: clamp(3.2rem, 6vw, 5rem); line-height: 1.06; margin-bottom: 1.5rem; color: #fff; }
.hero h1 em { color: var(--brand-300); font-style: italic; }
.hero .lede { font-size: 1.45rem; color: var(--brand-100); margin-bottom: 2rem; }
.hero .eyebrow { font-size: .95rem; }
.hero .btn { font-size: 1.2rem; padding: 1.1rem 2.2rem; }
.hero-badge {
  margin-top: 2.5rem;
  display: inline-flex;
  background: rgba(255,255,255,.95);
  padding: 1.4rem 1.7rem;
  border-radius: 1.2rem;
  box-shadow: 0 20px 30px -10px rgba(0,0,0,.25);
  align-items: center;
  gap: 1rem;
}
.hero-badge .icon {
  width: 3.5rem; height: 3.5rem; border-radius: 50%;
  background: var(--brand-200); color: var(--brand-600);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 1.3rem;
}
.hero-badge strong { display: block; font-size: 1.15rem; color: var(--brand-900); }
.hero-badge span { font-size: .95rem; color: var(--slate-500); }
@media (max-width: 900px) {
  .hero {
    aspect-ratio: 4 / 5;
    min-height: 560px;
    padding: 6rem 0 3rem;
    align-items: flex-end;
  }
  .hero-bg { background-position: center 22%; }
  .hero::before { background: linear-gradient(0deg, rgba(28,34,25,.95) 0%, rgba(28,34,25,.9) 35%, rgba(28,34,25,.55) 60%, rgba(28,34,25,.15) 80%, rgba(28,34,25,0) 100%); }
  .hero .container { padding-left: 1.5rem; padding-right: 1.5rem; }
  .hero-content { max-width: none; }
}

/* ==========================================================================
   6. Sections shared
   ========================================================================== */
.section-head { max-width: 46rem; margin: 0 auto 4rem; text-align: center; }
.section-head h2 { font-size: clamp(2rem, 4vw, 2.75rem); }
.section-head p { font-size: 1.1rem; color: var(--slate-600); }

.icon-card { background: var(--brand-50); border: 1px solid var(--brand-100); border-radius: var(--radius-xl); padding: 2.5rem; }
.icon-card svg, .icon-card .lucide { color: var(--brand-500); margin-bottom: 1.25rem; }
.icon-card h3 { font-size: 1.4rem; }
.icon-card p { color: var(--slate-600); }

.pill-card {
  background: #fff;
  border: 1px solid var(--brand-200);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: border-color .2s;
}
.pill-card:hover { border-color: var(--brand-400); }
.pill-card h4 { font-size: 1.2rem; margin: 0; }

.cta-band { position: relative; overflow: hidden; text-align: center; }
.cta-band h2 { color: #fff; font-size: clamp(2rem, 4vw, 2.75rem); }
.cta-band p { color: var(--brand-100); font-size: 1.15rem; max-width: 36rem; margin: 0 auto 2.5rem; }

/* ==========================================================================
   7. About / Services / Support Groups / Contact
   ========================================================================== */
.page-header { background: var(--brand-100); padding: 5rem 0; text-align: center; }
.page-header h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); }
.page-header p { font-size: 1.2rem; color: var(--slate-600); max-width: 42rem; margin: 0 auto; }

.bio-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 4rem; align-items: start; }
@media (max-width: 900px) { .bio-grid { grid-template-columns: 1fr; } }
.bio-photo { position: relative; }
.bio-photo .frame { aspect-ratio: 4/5; border-radius: var(--radius-xl); overflow: hidden; box-shadow: 0 30px 60px -20px rgba(54,63,49,.35); }
.bio-photo .frame img { width: 100%; height: 100%; object-fit: cover; }
.bio-quote {
  position: absolute; bottom: -2rem; right: -1.5rem;
  background: var(--brand-200); border: 1px solid var(--brand-300);
  padding: 1.75rem; border-radius: var(--radius-lg); max-width: 260px;
  font-family: var(--font-serif); font-style: italic; font-size: 1.1rem; color: var(--brand-900);
}
[dir="rtl"] .bio-quote { right: auto; left: -1.5rem; }
@media (max-width: 700px) { .bio-quote { display: none; } }
.bio-lead { font-size: 1.2rem; font-weight: 500; color: var(--brand-800); }
.cred-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; padding-top: 2rem; margin-top: 2rem; border-top: 1px solid var(--brand-100); }
.cred-grid h4 { font-size: 1.05rem; margin-bottom: 1rem; }
.cred-grid li { display: flex; gap: .5rem; align-items: flex-start; font-size: .9rem; color: var(--slate-600); margin-bottom: .6rem; }

.focus-band { background: var(--brand-900); color: #fff; }
.focus-band h2 { color: #fff; }
.focus-band p.lede { color: var(--brand-200); }
.focus-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 700px) { .focus-grid { grid-template-columns: 1fr; } }
.focus-item {
  display: flex; align-items: center; gap: .75rem;
  background: rgba(63,74,57,.5); border: 1px solid var(--brand-700);
  padding: 1rem; border-radius: .9rem; font-weight: 500;
}
.quote-card {
  aspect-ratio: 1/1; border-radius: var(--radius-xl); background: var(--brand-800);
  display: flex; align-items: center; justify-content: center; text-align: center; padding: 3rem;
}
.quote-card h3 { color: var(--brand-300); font-style: italic; font-size: 1.6rem; }
.quote-card p { color: var(--brand-400); margin: 0; }

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-row { display: flex; align-items: flex-start; gap: 1.25rem; margin-bottom: 1.5rem; }
.contact-row .icon { width: 3rem; height: 3rem; border-radius: 50%; background: var(--brand-100); color: var(--brand-600); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.contact-row h4 { margin: 0; font-size: 1rem; }
.contact-row p { margin: 0; color: var(--slate-600); }
.note-card { background: var(--brand-50); border: 1px solid var(--brand-100); border-radius: var(--radius-lg); padding: 2rem; margin-top: 2.5rem; }

.form-card { background: var(--brand-50); border: 1px solid var(--brand-200); border-radius: var(--radius-xl); padding: 2.5rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-bottom: 1.5rem; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.field label { display: block; font-size: .9rem; font-weight: 500; color: var(--slate-700); margin-bottom: .5rem; }
.field input, .field select, .field textarea {
  width: 100%; padding: .8rem 1rem; border-radius: .8rem; border: 1px solid var(--brand-200);
  background: #fff; font-family: inherit; font-size: 1rem; outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand-400); box-shadow: 0 0 0 3px rgba(122,142,110,.25); }
.field textarea { resize: vertical; }
.submit-btn { width: 100%; padding: 1rem; border: none; border-radius: .8rem; background: var(--brand-600); color: #fff; font-weight: 600; font-size: 1.05rem; }
.submit-btn:hover { background: var(--brand-700); }
.form-notice { padding: 1rem 1.25rem; border-radius: .8rem; margin-bottom: 1.5rem; font-size: .95rem; }
.form-notice.success { background: #ecf5ec; color: #33613b; border: 1px solid #bfe0c4; }
.form-notice.error { background: #fbeaea; color: #7a2c2c; border: 1px solid #f3c6c6; }

/* Support groups */
.group-card { display: flex; flex-direction: column; height: 100%; border-radius: var(--radius-xl); padding: 2rem; border: 1px solid var(--brand-200); }
.group-card .top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 1.25rem; }
.group-card .top .badge { background: #fff; border-radius: 1rem; padding: .6rem; box-shadow: 0 4px 10px -4px rgba(0,0,0,.15); }
.group-card .top .num { font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--brand-400); }
.group-card h3 { font-size: 1.5rem; }
.group-card .desc { color: var(--slate-600); flex-grow: 1; }
.group-card .focus { background: rgba(255,255,255,.5); border: 1px solid rgba(217,223,211,.5); border-radius: .8rem; padding: 1rem; margin-bottom: 1.5rem; }
.group-card .focus p.label { font-weight: 600; color: var(--brand-800); font-size: .85rem; margin: 0 0 .3rem; }
.group-card .focus p.text { font-style: italic; font-size: .85rem; color: var(--slate-500); margin: 0; }

/* ==========================================================================
   8. Blog
   ========================================================================== */
.blog-toolbar { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-bottom: 3rem; }
.blog-search { display: flex; align-items: center; gap: .6rem; background: #fff; border: 1px solid var(--brand-200); border-radius: 999px; padding: .6rem 1.2rem; flex: 1; max-width: 340px; }
.blog-search input { border: none; outline: none; flex: 1; font-family: inherit; font-size: .95rem; background: transparent; }
.blog-cats { display: flex; gap: .6rem; flex-wrap: wrap; }
.blog-cats a { font-size: .85rem; font-weight: 500; padding: .5rem 1.1rem; border-radius: 999px; border: 1px solid var(--brand-200); color: var(--slate-600); }
.blog-cats a.is-active { background: var(--brand-600); color: #fff; border-color: var(--brand-600); }

.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
@media (max-width: 900px) { .blog-grid { grid-template-columns: 1fr; } }
@media (min-width: 601px) and (max-width: 900px) { .blog-grid { grid-template-columns: repeat(2,1fr); } }
.post-card { background: #fff; border: 1px solid var(--brand-100); border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .2s; }
.post-card:hover { box-shadow: 0 20px 40px -20px rgba(54,63,49,.25); }
.post-card .thumb { aspect-ratio: 16/10; overflow: hidden; background: var(--brand-100); }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card .body { padding: 1.5rem; display: flex; flex-direction: column; flex-grow: 1; }
.post-card .cat { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--brand-600); margin-bottom: .6rem; }
.post-card h3 { font-size: 1.25rem; margin-bottom: .6rem; }
.post-card .excerpt { color: var(--slate-600); font-size: .92rem; flex-grow: 1; }
.post-card .meta { display: flex; gap: 1rem; font-size: .78rem; color: var(--slate-500); margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--brand-100); }
.post-card .meta span { display: flex; align-items: center; gap: .3rem; }

.single-post { background: #fff; border-radius: var(--radius-xl); overflow: hidden; border: 1px solid var(--brand-100); box-shadow: 0 20px 50px -30px rgba(54,63,49,.3); }
.single-post .cover { aspect-ratio: 16/7; overflow: hidden; background: var(--brand-100); }
.single-post .cover img { width: 100%; height: 100%; object-fit: cover; }
.single-post .content-area { padding: 2.5rem; max-width: 46rem; margin: 0 auto; }
.single-post .content-area h2 { font-size: 1.6rem; margin-top: 2rem; }
.single-post .content-area p, .single-post .content-area li { color: var(--slate-700); font-size: 1.05rem; line-height: 1.75; }
.back-link { display: inline-flex; align-items: center; gap: .5rem; background: #fff; border: 1px solid var(--brand-100); border-radius: 999px; padding: .6rem 1.2rem; font-weight: 500; color: var(--brand-700); margin-bottom: 2rem; box-shadow: 0 4px 10px -4px rgba(0,0,0,.08); }
.no-posts { text-align: center; padding: 4rem 0; color: var(--slate-500); }

/* ==========================================================================
   9. Footer
   ========================================================================== */
.site-footer { background: var(--brand-900); color: var(--brand-50); padding: 4rem 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem; margin-bottom: 3rem; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h2, .site-footer h3 { color: #fff; }
.site-footer p, .site-footer a { color: var(--brand-200); }
.site-footer a:hover { color: #fff; }
.site-footer ul li { margin-bottom: .9rem; }
.footer-social { display: flex; gap: 1rem; margin-top: 1.25rem; }
.footer-bottom { border-top: 1px solid var(--brand-800); padding-top: 1.5rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; font-size: .85rem; color: var(--brand-400); }
.footer-bottom-links { display: flex; gap: 1.5rem; }

/* ==========================================================================
   10. RTL
   ========================================================================== */
[dir="rtl"] { text-align: right; }
[dir="rtl"] .nav-row,
[dir="rtl"] .contact-row,
[dir="rtl"] .footer-social,
[dir="rtl"] .footer-bottom-links,
[dir="rtl"] .group-card .top { flex-direction: row-reverse; }
[dir="rtl"] .hero::before { background: linear-gradient(270deg, rgba(28,34,25,.97) 0%, rgba(28,34,25,.97) 34%, rgba(28,34,25,.93) 38%, rgba(28,34,25,.82) 41%, rgba(28,34,25,.65) 43.5%, rgba(28,34,25,.46) 45.5%, rgba(28,34,25,.28) 47%, rgba(28,34,25,.14) 48.5%, rgba(28,34,25,.05) 50%, rgba(28,34,25,0) 52%); }
@media (min-width: 901px) {
  [dir="rtl"] .hero-bg { transform: scaleX(-1); }
}
[dir="rtl"] .hero .container { padding-left: 1.5rem; padding-right: clamp(1.5rem, 5vw, 4rem); }
[dir="rtl"] .hero-content { margin-left: auto; }
[dir="rtl"] .hero-badge { flex-direction: row-reverse; }
[dir="rtl"] .btn svg { transform: scaleX(-1); }

/* ==========================================================================
   11. Utility
   ========================================================================== */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.mt-0 { margin-top: 0 !important; }
