/**
 * Text Page template (template-text.php).
 * Loaded after pages.css (shared .page-hero) only on this template.
 * Everything is scoped to .text-hero / .text-main so other pages are unaffected.
 */

/* ---------- Banner ----------
   Uses the same classes as the About banner (page-hero services-hero about-hero),
   so size, spacing, heading and watermark come from the theme. */
.text-hero .wrap { width: 100%; }
.text-hero .lead { max-width: 760px; }

/* ---------- Body ---------- */
.text-main {
  padding: 70px 0 90px;
  background: #fff;
  color: var(--ink);
}
.text-main .wrap.text-width-narrow .text-content { max-width: 680px; }
.text-main .wrap.text-width-standard .text-content { max-width: 820px; }
.text-main .wrap.text-width-wide .text-content { max-width: none; }

.text-content {
  font-size: 1.06rem;
  line-height: 1.75;
  overflow-wrap: break-word;
}
.text-content > * + * { margin-top: 1.1em; }
.text-content > :first-child { margin-top: 0; }

.text-content h2,
.text-content h3,
.text-content h4 {
  color: var(--ink);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.text-content h2 { margin-top: 2.1em; }
.text-content h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); margin-top: 1.8em; }
.text-content h4 { font-size: 1.1rem; margin-top: 1.5em; }
.text-content h2 + *,
.text-content h3 + *,
.text-content h4 + * { margin-top: 0.6em; }

.text-content p,
.text-content li { color: var(--muted); }
.text-content strong,
.text-content b { color: var(--ink); }

.text-content a {
  color: #4e702c;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.text-content a:hover { color: var(--forest); }

.text-content ul,
.text-content ol { padding-left: 1.4em; }
.text-content li + li { margin-top: 0.4em; }

.text-content blockquote {
  margin-left: 0;
  padding: 4px 0 4px 22px;
  border-left: 3px solid var(--leaf);
  color: var(--ink);
  font-size: 1.15rem;
}

.text-content img,
.text-content video,
.text-content iframe {
  max-width: 100%;
  height: auto;
}
.text-content figure { margin-left: 0; margin-right: 0; }
.text-content figcaption {
  margin-top: 8px;
  font-size: 0.9rem;
  color: var(--muted);
}

.text-content hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2.2em 0;
}

.text-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.98rem;
}
.text-content th,
.text-content td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.text-content th { color: var(--ink); font-weight: 600; }

/* FAQ-style accordion: add a "Details" block in the editor (summary = question). */
.text-content details {
  border-bottom: 1px solid var(--line);
  margin-top: 0;
}
.text-content details:first-of-type { border-top: 1px solid var(--line); }
.text-content summary {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0;
  color: var(--ink);
  font-size: 1.15rem;
  cursor: pointer;
  list-style: none;
}
.text-content summary::-webkit-details-marker { display: none; }
.text-content summary::marker { content: ""; }
.text-content summary:after { content: "+"; font-size: 1.4rem; flex: none; }
.text-content details[open] summary:after { content: "\2212"; }
.text-content summary:hover { color: #4e702c; }
.text-content summary:focus-visible { outline: 2px solid #4e702c; outline-offset: 6px; }
.text-content details > :not(summary) { max-width: 90%; }
.text-content details > :last-child { padding-bottom: 22px; }

/* Block editor buttons / alignment */
.text-content .wp-block-button__link {
  text-decoration: none;
}
.text-content .alignleft { float: left; margin: 0.4em 1.4em 1em 0; }
.text-content .alignright { float: right; margin: 0.4em 0 1em 1.4em; }
.text-content .aligncenter { display: block; margin-left: auto; margin-right: auto; }
.text-content:after { content: ""; display: block; clear: both; }

/* ---------- Privacy Policy template ---------- */
.text-hero .text-updated {
  margin-top: 18px;
  font-size: 0.95rem;
  color: #bdc7bc;
}
.policy-toc {
  margin: 0 0 2.4em;
  padding: 24px 28px;
  background: var(--paper);
  border: 1px solid var(--line);
}
.text-width-narrow .policy-toc { max-width: 680px; }
.text-width-standard .policy-toc { max-width: 820px; }
.policy-toc h2 {
  margin: 0 0 12px;
  font-size: 1.1rem;
  font-weight: 600 !important;
  letter-spacing: 0;
}
.policy-toc ol { margin: 0; padding-left: 1.4em; columns: 2; column-gap: 40px; }
.policy-toc li { margin: 0 0 6px; break-inside: avoid; }
.policy-toc a { color: #4e702c; text-decoration: none; }
.policy-toc a:hover { text-decoration: underline; }
@media (max-width: 700px) { .policy-toc ol { columns: 1; } }
.policy-main .text-content h2 { scroll-margin-top: 100px; }
