/**
 * guide-article.css — Distinct long-form reading layout for Auckland guides.
 * Scoped under body.guide-page so service/location pages stay unchanged.
 */

body.guide-page.theme-akl-pro {
  /* Wide desktop reading shell: TOC + flexible prose, uses side margins */
  --guide-max: min(1400px, 100%);
  --guide-rail: clamp(15rem, 18vw, 18.5rem);
  --guide-gap: clamp(1.5rem, 3vw, 2.75rem);
  --guide-toc-top: 5.5rem; /* clear site header while floating */
  --guide-surface: #f3f6f2;
  --guide-paper: #fffcf7;
  --guide-ink: #102a2a;
  --guide-muted: #4d6564;
  --guide-line: rgba(16, 42, 42, 0.12);
  --guide-accent: #08766b;
  --guide-accent-soft: rgba(8, 118, 107, 0.1);
  --guide-callout: #e7f3ef;
  --guide-warn: #f7efe4;
  background: var(--guide-surface);
}

/* Sticky fails if any ancestor clips overflow — site #wrapper uses overflow:hidden */
body.guide-page #wrapper {
  overflow: visible;
}

/* Hub refinements when used as guide entry */
body.guide-page .blog-hub {
  background: transparent;
  padding-top: clamp(2rem, 4vw, 3.25rem);
}

body.guide-page .blog-hub__intro h1 {
  font-family: var(--font-display, "Playfair Display", Georgia, serif);
  font-size: clamp(1.85rem, 4vw, 2.65rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--guide-ink);
  max-width: 22ch;
  margin: 0 auto 0.75rem;
}

body.guide-page .blog-hub__intro p {
  max-width: 46rem;
  margin-left: auto;
  margin-right: auto;
  color: var(--guide-muted);
}

/* Practical hub header: clearer copy + topic shortcuts */
body.guide-page .blog-hub__eyebrow {
  text-align: center;
  display: block;
}

body.guide-page .blog-hub__lede {
  font-size: 1.05rem;
  line-height: 1.55;
  margin-bottom: 1.35rem;
}

body.guide-page .blog-hub__jump-label {
  margin: 0 auto 0.55rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #405754;
}

body.guide-page .blog-hub__topics {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 0.55rem;
  max-width: 44rem;
  margin: 0 auto 1rem;
}

body.guide-page .blog-hub__topic {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(8, 118, 107, 0.28);
  background: #fff;
  color: var(--guide-ink, #16302e);
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(16, 42, 42, 0.04);
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

body.guide-page .blog-hub__topic:hover,
body.guide-page .blog-hub__topic:focus-visible {
  border-color: rgba(8, 118, 107, 0.55);
  background: rgba(8, 118, 107, 0.08);
  color: #0a5c54;
  outline: none;
}

body.guide-page .blog-hub__browse {
  margin-top: 0.35rem;
  margin-bottom: 0;
  font-size: 0.95rem;
}

body.guide-page .blog-hub__browse strong {
  color: var(--guide-ink, #16302e);
  font-weight: 700;
}

@media (max-width: 599px) {
  body.guide-page .blog-hub__topics {
    justify-content: flex-start;
  }

  body.guide-page .blog-hub__intro {
    text-align: left;
  }

  body.guide-page .blog-hub__intro h1 {
    margin-left: 0;
    max-width: none;
  }

  body.guide-page .blog-hub__intro p,
  body.guide-page .blog-hub__jump-label {
    margin-left: 0;
    margin-right: 0;
  }

  body.guide-page .blog-hub__eyebrow {
    text-align: left;
  }
}

/* Article shell */
.guide-article {
  background: transparent;
  color: var(--guide-ink);
  padding: 0 0 clamp(2rem, 4vw, 3rem);
}

.guide-article__header {
  background:
    linear-gradient(180deg, rgba(232, 242, 238, 0.95) 0%, rgba(243, 246, 242, 0.2) 100%);
  border-bottom: 1px solid var(--guide-line);
  padding: clamp(1.75rem, 4vw, 3rem) var(--page-gutter, clamp(18px, 4.5vw, 72px)) clamp(1.5rem, 3vw, 2.25rem);
}

.guide-article__header-inner {
  max-width: var(--guide-max);
  margin: 0 auto;
  width: 100%;
}

/* Desktop: title/lede use left width; lead photo sits smaller on the right */
@media (min-width: 980px) {
  .guide-article__header-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 32%);
    column-gap: clamp(1.25rem, 3vw, 2.5rem);
    row-gap: 0.35rem;
    align-items: start;
  }

  .guide-article__header-inner > *:not(.guide-article__lead-media) {
    grid-column: 1;
  }

  .guide-article__header-inner > .guide-article__lead-media {
    grid-column: 2;
    grid-row: 1 / span 8;
    margin: 0;
    max-width: none;
    width: 100%;
    aspect-ratio: 4 / 3;
    align-self: start;
  }

  .guide-article__header h1 {
    max-width: none;
  }

  .guide-article__lede {
    max-width: none;
  }
}

.guide-article__crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.65rem;
  align-items: center;
  font-size: 0.88rem;
  color: var(--guide-muted);
  margin: 0 0 1rem;
  list-style: none;
  padding: 0;
}

.guide-article__crumb a {
  color: var(--guide-accent);
  text-decoration: none;
  font-weight: 600;
}

.guide-article__crumb a:hover {
  text-decoration: underline;
}

.guide-article__crumb li:not(:last-child)::after {
  content: "/";
  margin-left: 0.65rem;
  opacity: 0.45;
  font-weight: 400;
}

.guide-article__eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--guide-accent);
  margin: 0 0 0.65rem;
}

.guide-article__header h1 {
  font-family: var(--font-display, "Playfair Display", Georgia, serif);
  font-size: clamp(1.85rem, 4.2vw, 2.75rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 0.85rem;
  max-width: 22ch;
  color: var(--guide-ink);
}

.guide-article__lede {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  line-height: 1.55;
  color: var(--guide-muted);
  max-width: 52rem;
  margin: 0 0 1.1rem;
}

.guide-article__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.1rem;
  font-size: 0.9rem;
  color: var(--guide-muted);
  margin: 0;
  padding: 0;
  list-style: none;
}

.guide-article__meta li {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.guide-article__meta li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--guide-accent);
  opacity: 0.7;
}

/* Lead + in-article figures — smaller; side space reserved for text */
.guide-article__lead-media {
  margin: 1.15rem 0 0;
  max-width: min(28rem, 100%);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--guide-line);
  box-shadow: 0 10px 26px rgba(16, 42, 42, 0.08);
  background: #e8f0ec;
  aspect-ratio: 4 / 3;
}

.guide-article__lead-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.guide-figure {
  margin: 1.15rem 0 1.25rem;
  max-width: min(22rem, 100%);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--guide-line);
  background: #eef4f1;
  box-shadow: 0 8px 22px rgba(16, 42, 42, 0.06);
}

.guide-figure img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
}

.guide-figure figcaption {
  margin: 0;
  padding: 0.45rem 0.7rem 0.55rem;
  font-size: 0.82rem;
  color: var(--guide-muted);
  background: var(--guide-paper);
  border-top: 1px solid var(--guide-line);
}

/* Desktop: image sits in the section with text wrapping into side space */
@media (min-width: 900px) {
  .guide-prose {
    overflow: visible;
  }

  /* Do NOT clear floats on h2 — figures live under h2, text wraps beside them */
  .guide-prose h2 {
    clear: both;
  }

  .guide-figure {
    float: right;
    width: min(40%, 17.5rem);
    max-width: 17.5rem;
    margin: 0.1rem 0 1rem 1.25rem;
    shape-outside: margin-box;
  }

  /* Alternate side so layout feels balanced across long articles */
  .guide-prose h2:nth-of-type(4n + 1) + .guide-figure,
  .guide-prose h2:nth-of-type(4n + 2) + .guide-figure {
    float: right;
    margin: 0.1rem 0 1rem 1.25rem;
  }

  .guide-prose h2:nth-of-type(4n + 3) + .guide-figure,
  .guide-prose h2:nth-of-type(4n + 4) + .guide-figure {
    float: left;
    margin: 0.1rem 1.25rem 1rem 0;
  }

  /* Next heading clears previous section float so it never sits under an orphan image */
  .guide-prose h2 {
    clear: both;
  }

  .guide-related,
  .guide-soft-cta,
  .guide-callout,
  .guide-checklist,
  .guide-keyfacts {
    clear: both;
  }
}

@media (max-width: 899px) {
  .guide-figure {
    float: none;
    width: 100%;
    max-width: min(28rem, 100%);
    margin: 1rem auto;
  }

  .guide-article__lead-media {
    max-width: min(32rem, 100%);
  }
}

.guide-article__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--guide-gap);
  max-width: var(--guide-max);
  width: 100%;
  margin: 0 auto;
  padding: clamp(1.25rem, 3vw, 2rem) clamp(16px, 3.5vw, 48px) 0;
  box-sizing: border-box;
}

@media (min-width: 980px) {
  .guide-article__layout {
    /* TOC fixed width + prose takes remaining width of the wide shell */
    grid-template-columns: var(--guide-rail) minmax(0, 1fr);
    align-items: start;
    gap: clamp(1.75rem, 3.5vw, 3rem);
    padding-left: clamp(20px, 4vw, 56px);
    padding-right: clamp(20px, 4vw, 56px);
  }
}

@media (min-width: 1280px) {
  body.guide-page.theme-akl-pro {
    --guide-max: min(1520px, 100%);
    --guide-rail: clamp(16rem, 16vw, 19rem);
  }
}

/* Floating TOC rail */
.guide-toc {
  background: var(--guide-paper);
  border: 1px solid var(--guide-line);
  border-radius: 16px;
  padding: 1rem 1rem 1.1rem;
  box-shadow: 0 10px 28px rgba(16, 42, 42, 0.06);
}

@media (min-width: 980px) {
  .guide-toc {
    position: sticky;
    top: var(--guide-toc-top);
    max-height: calc(100vh - var(--guide-toc-top) - 1.25rem);
    overflow: auto;
    z-index: 5;
    align-self: start;
    /* Float feel */
    box-shadow:
      0 12px 32px rgba(16, 42, 42, 0.08),
      0 2px 8px rgba(16, 42, 42, 0.04);
  }
}

.guide-toc__title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--guide-muted);
  margin: 0 0 0.65rem;
}

.guide-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
}

.guide-toc li {
  margin: 0;
  border-top: 1px solid rgba(16, 42, 42, 0.06);
}

.guide-toc li:first-child {
  border-top: 0;
}

.guide-toc a {
  display: block;
  padding: 0.55rem 0.15rem;
  color: var(--guide-ink);
  text-decoration: none;
  font-size: 0.92rem;
  line-height: 1.35;
  font-weight: 500;
}

.guide-toc a:hover,
.guide-toc a:focus-visible {
  color: var(--guide-accent);
}

/* Prose column — deliberately NOT beauty-section marketing pairs */
.guide-article__body {
  background: var(--guide-paper);
  border: 1px solid var(--guide-line);
  border-radius: 20px;
  padding: clamp(1.25rem, 3vw, 2.25rem);
  box-shadow: 0 14px 36px rgba(16, 42, 42, 0.06);
  min-width: 0;
}

.guide-prose > * + * {
  margin-top: 1rem;
}

.guide-prose h2 {
  font-family: var(--font-display, "Playfair Display", Georgia, serif);
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 2rem 0 0.75rem;
  padding-top: 0.35rem;
  scroll-margin-top: 1.25rem;
  color: var(--guide-ink);
  border-top: 1px solid var(--guide-line);
  padding-top: 1.35rem;
}

.guide-prose h2:first-child {
  margin-top: 0;
  border-top: 0;
  padding-top: 0;
}

.guide-prose h3 {
  font-family: var(--font-display, "Playfair Display", Georgia, serif);
  font-size: 1.15rem;
  margin: 1.4rem 0 0.5rem;
  scroll-margin-top: 1.25rem;
  color: var(--guide-ink);
}

.guide-prose p {
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--guide-ink);
  /* Fill the prose column; floats reclaim space beside images */
  max-width: none;
}

.guide-prose ul,
.guide-prose ol {
  margin: 0.35rem 0 0.75rem;
  padding-left: 1.25rem;
  max-width: none;
  color: var(--guide-ink);
}

.guide-prose ul {
  list-style: disc;
}

.guide-prose ol {
  list-style: decimal;
}

.guide-prose li {
  margin: 0.35rem 0;
  line-height: 1.55;
  font-size: 1rem;
}

.guide-prose li::marker {
  color: var(--guide-accent);
}

.guide-prose strong {
  font-weight: 700;
  color: var(--guide-ink);
}

.guide-prose a {
  color: var(--guide-accent);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Callouts / checklists — guide-only components */
.guide-callout {
  background: var(--guide-callout);
  border-left: 4px solid var(--guide-accent);
  border-radius: 0 14px 14px 0;
  padding: 0.95rem 1.1rem;
  margin: 1.25rem 0;
  max-width: none;
  clear: both;
}

.guide-callout--warn {
  background: var(--guide-warn);
  border-left-color: #b06a1a;
}

.guide-callout__label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--guide-accent);
  margin-bottom: 0.35rem;
}

.guide-callout--warn .guide-callout__label {
  color: #8a5314;
}

.guide-callout p {
  margin: 0;
  font-size: 0.98rem;
}

.guide-checklist {
  background: #f8faf8;
  border: 1px dashed rgba(8, 118, 107, 0.35);
  border-radius: 14px;
  padding: 1rem 1.1rem 1rem 1rem;
  margin: 1.15rem 0;
  max-width: none;
  list-style: none;
  clear: both;
}

/* Checklist left, figure right — figure matches standard .guide-figure body size */
.guide-media-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.15rem;
  align-items: start;
  clear: both;
  margin: 1.15rem 0 1.35rem;
}

.guide-media-row .guide-checklist--beside {
  clear: none;
  margin: 0;
}

.guide-media-row .guide-figure--beside {
  float: none;
  width: min(100%, 17.5rem);
  max-width: 17.5rem;
  margin: 0 auto;
}

@media (min-width: 700px) {
  .guide-media-row {
    /* Match other body figures: ~40% / 17.5rem max */
    grid-template-columns: minmax(0, 1fr) min(40%, 17.5rem);
    gap: 1.25rem;
  }

  .guide-media-row .guide-figure--beside {
    width: 100%;
    max-width: 17.5rem;
    margin: 0;
  }
}

.guide-checklist li {
  position: relative;
  padding-left: 1.6rem;
  margin: 0.45rem 0;
  list-style: none;
}

.guide-checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--guide-accent);
  font-weight: 700;
}

.guide-keyfacts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin: 1.25rem 0 1.5rem;
  max-width: none;
  clear: both;
}

.guide-keyfacts div {
  background: var(--guide-accent-soft);
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
}

.guide-keyfacts strong {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--guide-accent);
  margin-bottom: 0.25rem;
}

.guide-keyfacts span {
  font-size: 0.95rem;
  line-height: 1.35;
  color: var(--guide-ink);
}

/* Related + soft CTA */
.guide-related {
  margin-top: 2.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--guide-line);
}

.guide-related h2 {
  border: 0 !important;
  margin-top: 0 !important;
  padding-top: 0 !important;
  font-size: 1.35rem !important;
}

.guide-related__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
  margin-top: 0.85rem;
  list-style: none;
  padding: 0;
}

.guide-related__grid a {
  display: block;
  background: #f4f8f6;
  border: 1px solid var(--guide-line);
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  text-decoration: none;
  color: var(--guide-ink);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.35;
}

.guide-related__grid a:hover {
  border-color: rgba(8, 118, 107, 0.45);
  background: var(--guide-callout);
}

.guide-soft-cta {
  margin-top: 1.75rem;
  background: linear-gradient(135deg, #0d3a36 0%, #08766b 55%, #315f7d 100%);
  color: #fff;
  border-radius: 18px;
  padding: 1.25rem 1.35rem;
}

.guide-soft-cta h2 {
  color: #fff !important;
  border: 0 !important;
  margin: 0 0 0.5rem !important;
  padding: 0 !important;
  font-size: 1.35rem !important;
}

.guide-soft-cta p {
  color: rgba(255, 255, 255, 0.92);
  margin: 0 0 1rem;
  max-width: none;
}

.guide-soft-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.guide-soft-cta__actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  font-size: 0.95rem;
}

.guide-soft-cta__actions a.primary {
  background: #fff;
  color: #055a52;
}

.guide-soft-cta__actions a.secondary {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.75);
}

/* Guide pages: keep FAQ/form chrome but soften top spacing */
body.guide-page .faq-section {
  margin-top: 0.5rem;
}

body.guide-page main > .beauty-section,
body.guide-page main > .inner-banner,
body.guide-page main > .trust-bar {
  /* safety: should not appear on guide pages */
  display: none !important;
}

@media (max-width: 767px) {
  .guide-article__header h1 {
    max-width: none;
  }
  .guide-toc {
    margin-bottom: 0.25rem;
  }
  .guide-article__body {
    padding: 1.1rem 1rem 1.35rem;
  }
  .guide-prose p,
  .guide-prose li {
    font-size: 0.98rem;
  }
}
/* Accessible touch targets for long-form navigation and related links. */
.guide-toc a,
.guide-related a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding-top: 6px;
  padding-bottom: 6px;
}
