/* Content pages: FAQ, guides, location landing pages. Reuses tokens from /styles.css (loaded first).
   --cp-deep is a darker teal for text on light backgrounds and hero backgrounds (7:1+ with white). */
.content-page {
  --cp-deep: #00607a;
  --cp-soft: #f7f3ec;
  --cp-line: #c5dbe3;
  --cp-muted: #3f4f57;
}

.content-page a {
  color: var(--cp-deep);
}

.content-page a:hover {
  color: var(--color-black);
}

.cp-wrap {
  width: 100%;
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 0 var(--space-3);
}

/* Hero */
.cp-hero {
  padding: calc(var(--header-h) + var(--space-4)) 0 var(--space-5);
  background: var(--cp-soft);
  color: var(--color-black);
}

.cp-hero h1 {
  margin: 0 0 var(--space-2);
  max-width: 26ch;
  font-size: clamp(1.9rem, 6vw, 3.1rem);
  line-height: 1.1;
  font-weight: 700;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.cp-hero__intro {
  margin: 0;
  max-width: 40rem;
  font-size: clamp(1.05rem, 2.4vw, 1.25rem);
  line-height: 1.5;
}

.cp-eyebrow {
  margin: 0 0 var(--space-2);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-coastal-text);
}

/* Breadcrumb */
.cp-breadcrumb {
  margin: 0 0 var(--space-3);
  font-size: 0.9rem;
}

.cp-breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cp-breadcrumb li + li::before {
  content: "/";
  margin-right: 0.5rem;
  opacity: 0.8;
}

.content-page .cp-breadcrumb a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  min-width: 2.75rem;
  color: var(--cp-deep);
}

.content-page .cp-breadcrumb a:hover {
  color: var(--color-black);
}

.cp-breadcrumb li > span {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  min-width: 2.75rem;
}

/* Sections and prose */
.cp-section {
  padding-top: var(--space-5);
}

.content-page h2 {
  margin: 0 0 var(--space-2);
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  line-height: 1.2;
  font-weight: 700;
  color: var(--color-black);
  text-wrap: balance;
}

.content-page h3 {
  margin: var(--space-3) 0 var(--space-1);
  font-size: 1.15rem;
  line-height: 1.3;
  color: var(--color-black);
}

.cp-prose {
  max-width: 42rem;
}

/* Long-form guides: text runs the full width of the section, left aligned under its heading */
.cp-article--full .cp-prose,
.cp-article--full .cp-note {
  max-width: none;
  text-align: left;
}

.cp-prose p,
.cp-prose li {
  line-height: 1.65;
}

.cp-prose p {
  margin: 0 0 var(--space-2);
}

.cp-prose ul {
  margin: 0 0 var(--space-2);
  padding-left: 1.25rem;
}

.cp-prose li {
  margin-bottom: 0.35rem;
}

.cp-lead {
  font-size: 1.15rem;
}

.cp-note {
  max-width: 42rem;
  margin: var(--space-3) 0 0;
  padding: var(--space-2) var(--space-3);
  background: var(--cp-soft);
  border-left: 4px solid var(--cp-deep);
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
  line-height: 1.6;
}

.cp-figure {
  margin: var(--space-4) 0 0;
  max-width: 42rem;
}

/* The pages added in the SEO update (retreats, services, locations, vouchers, guides, swim dates): text
   runs the full width of each section, and a picture sits beside its words
   (stacked under them on narrow screens) */
.cp-wide .cp-hero h1,
.cp-wide .cp-hero__intro,
.cp-wide .cp-prose,
.cp-wide .cp-faq {
  max-width: none;
}

.cp-split {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: var(--space-4);
  align-items: center; /* the shorter of the text and the picture sits on the other's middle */
}

/* outer margins on the first and last paragraph or list (and a list's last item) would push the
   text off centre */
.cp-split .cp-prose > :first-child {
  margin-top: 0;
}

.cp-split .cp-prose > :last-child,
.cp-split .cp-prose > :last-child > li:last-child {
  margin-bottom: 0;
}

.cp-split > * {
  min-width: 0;
}

.cp-split .cp-figure {
  margin: 0;
  max-width: none;
}

.cp-split .cp-figure img {
  max-height: 30rem;
  object-fit: cover;
}

@media (max-width: 760px) {
  .cp-split {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }
}

.cp-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-card);
}

.cp-figure figcaption {
  margin-top: var(--space-1);
  font-size: 0.9rem;
  color: var(--cp-muted);
}

/* In-page jump list and link cards */
.cp-toc {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin: 0;
  padding: var(--space-3) 0 0;
  list-style: none;
}

.cp-toc a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  min-width: 2.75rem;
  padding: 0 var(--space-2);
  border: 2px solid var(--cp-line);
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  background: var(--color-white);
}

.cp-toc a:hover,
.cp-toc a:focus-visible {
  border-color: var(--cp-deep);
}

.cp-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Six cards as two rows of three; two across on tablets, one on phones */
.cp-cards--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 900px) {
  .cp-cards--three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .cp-cards--three {
    grid-template-columns: minmax(0, 1fr);
  }
}

.cp-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-2) 0 0;
  border-top: 1px solid rgba(15, 20, 25, 0.16);
}

.cp-card h3 {
  margin: 0;
}

.cp-card p {
  margin: 0;
  line-height: 1.55;
}

.cp-card__list {
  margin: 0;
  padding-left: 1.1rem;
  line-height: 1.55;
}

.cp-card__list li + li {
  margin-top: 0.35rem;
}

.cp-card a.cp-card__link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  min-width: 2.75rem;
  font-weight: 700;
}

/* FAQ accordions (details/summary, no JS) */
.cp-faq-group + .cp-faq-group {
  padding-top: var(--space-4);
}

.cp-faq {
  max-width: 48rem;
  border-top: 1px solid var(--cp-line);
}

.cp-faq details {
  border-bottom: 1px solid var(--cp-line);
}

.cp-faq summary {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  min-width: 2.75rem;
  padding: 0.75rem 2.5rem 0.75rem 0;
  font-weight: 700;
  line-height: 1.35;
  cursor: pointer;
  list-style: none;
}

.cp-faq summary::-webkit-details-marker {
  display: none;
}

.cp-faq summary::after {
  content: "+";
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  line-height: 1;
  color: var(--cp-deep);
}

.cp-faq details[open] summary::after {
  content: "\2212";
}

.cp-faq summary:focus-visible {
  outline: 3px solid var(--cp-deep);
  outline-offset: 2px;
}

.cp-faq__answer {
  padding: 0 0 var(--space-2);
}

.cp-faq__answer p {
  margin: 0 0 var(--space-1);
  line-height: 1.65;
}

/* Closing call to action */
.cp-cta {
  margin-top: var(--space-6);
  padding: var(--space-6) 0;
  background: var(--cp-soft);
  color: var(--color-black);
}

/* Content that follows the quote band (e.g. Related pages) needs its own space before the footer */
.cp-cta + .cp-wrap {
  padding-bottom: var(--space-6);
}

.cp-cta h2 {
  color: var(--color-black);
}

.cp-cta p {
  max-width: 40rem;
  line-height: 1.6;
}

.cp-cta__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
}

.content-page .cp-cta a:not(.btn) {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  min-width: 2.75rem;
  color: var(--cp-deep);
  font-weight: 600;
}

.content-page .cp-cta a:not(.btn):hover {
  color: var(--color-black);
}

/* Accent buttons keep white text; the link colour above must not override it */
.content-page a.btn--accent,
.content-page a.btn--accent:hover {
  color: var(--color-white);
}

/* Spacing helpers (replace style="" attributes, which the Content Security Policy blocks) */
.content-page .cp-h2--spaced {
  margin-top: var(--space-5);
}

.content-page .cp-cta__actions--hero {
  margin-top: var(--space-3);
}

@media (max-width: 480px) {
  .cp-cta__actions .btn {
    width: 100%;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .content-page * {
    scroll-behavior: auto;
    transition: none;
  }
}

/* Hero with a photo beside the words (clinic page) */
.cp-hero--photo .cp-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: var(--space-4);
  align-items: center;
}

.cp-hero--photo .cp-hero__text > :first-child {
  margin-top: 0;
}

.cp-hero--photo .cp-hero__media {
  margin: 0;
}

.cp-hero--photo .cp-hero__media img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 26rem;
  object-fit: cover;
  border-radius: var(--radius-card);
}

@media (max-width: 760px) {
  .cp-hero--photo .cp-hero__grid {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }
}
