/* Guided swims listing and swim detail pages (task J).
   Loaded via $page['styles']. Tokens come from /styles.css. Text colours used here:
   --color-muted #4a5a62 (7.17:1 on white), --color-coastal-text #006a8a (6.12:1 on white). */

/* Small notes: normal text size (was an inline 0.92rem). */
.swim-note {
  margin: 0 0 var(--space-2);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--color-muted);
}

.swim-builder-lead--spaced {
  margin-top: var(--space-4);
}

.swim-listing-head {
  padding-bottom: 0;
}

.swim-listing-head h2 {
  margin: 0 0 var(--space-1);
  font-size: 1.5rem;
  line-height: 1.25;
}

/* Breadcrumb inside the swim article */
.swim-breadcrumb {
  margin: 0 0 var(--space-3);
  font-size: 1rem;
}

.swim-breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.swim-breadcrumb li {
  margin: 0;
  color: var(--color-muted);
}

.swim-breadcrumb li + li::before {
  content: "/";
  margin-right: 0.5rem;
}

.swim-breadcrumb a,
.swim-breadcrumb li > span {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  min-width: 2.75rem;
}

.swim-breadcrumb a {
  color: var(--color-coastal-text);
}

/* At a glance */
.swim-glance {
  margin: var(--space-4) 0;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-card);
  border: 1px solid rgba(0, 128, 163, 0.2);
  background: rgba(0, 128, 163, 0.05);
}

.prose .swim-glance h2,
.swim-compare-section h2,
.swim-faq h2 {
  margin: 0 0 var(--space-2);
  font-size: 1.35rem;
  line-height: 1.25;
}

.swim-glance__list {
  display: grid;
  gap: var(--space-2);
  margin: 0;
}

.swim-glance__list > div {
  display: grid;
  gap: 0.15rem;
  padding-top: var(--space-2);
  border-top: 1px solid rgba(15, 20, 25, 0.1);
}

.swim-glance__list > div:first-child {
  padding-top: 0;
  border-top: 0;
}

.swim-glance__list dt {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-coastal-text);
}

.swim-glance__list dd {
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--color-black);
}

.swim-glance__list a,
.swim-related__list a,
.swim-faq__more a {
  color: var(--color-coastal-text);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

@media (min-width: 721px) {
  .swim-glance__list > div {
    grid-template-columns: minmax(9rem, 12rem) minmax(0, 1fr);
    gap: var(--space-3);
  }
}

/* Comparison table (listing) */
.swim-compare-section {
  padding-bottom: 0;
}

.swim-compare__caption {
  /* Visible heading is the h2 above; keep the caption for assistive tech only. */
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.swim-compare__table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 var(--space-3);
  font-size: 1rem;
  line-height: 1.4;
}

.swim-compare__table th,
.swim-compare__table td {
  padding: 0.75rem 0.75rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(15, 20, 25, 0.12);
  color: var(--color-black);
}

.swim-compare__table thead th {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-coastal-text);
  border-bottom: 2px solid var(--color-coastal);
}

.swim-compare__table tbody th a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  min-width: 2.75rem;
  color: var(--color-coastal-text);
  font-weight: 700;
}

.swim-glance__list--common {
  margin-bottom: var(--space-2);
}

@media (max-width: 720px) {
  .swim-compare__table,
  .swim-compare__table tbody,
  .swim-compare__table tr,
  .swim-compare__table th,
  .swim-compare__table td {
    display: block;
  }

  .swim-compare__table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .swim-compare__table tr {
    margin-bottom: var(--space-2);
    padding: var(--space-1) var(--space-2);
    border: 1px solid rgba(0, 128, 163, 0.2);
    border-radius: var(--radius-card);
  }

  .swim-compare__table th,
  .swim-compare__table td {
    padding: 0.35rem 0;
    border-bottom: 0;
  }

  .swim-compare__table td::before {
    content: attr(data-label) ": ";
    font-weight: 700;
    color: var(--color-coastal-text);
  }
}

/* Related links */
.swim-related {
  margin-top: var(--space-5);
}

.swim-related__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.prose .swim-related__list li {
  margin: 0;
  padding: 0.5rem 0;
  border-top: 1px solid rgba(15, 20, 25, 0.1);
  color: var(--color-muted);
}

.swim-related__list a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  min-width: 2.75rem;
  margin-right: 0.5rem;
  font-weight: 700;
}

/* Listing FAQ */
.swim-faq__list details {
  border-top: 1px solid rgba(15, 20, 25, 0.12);
}

.swim-faq__list details:last-child {
  border-bottom: 1px solid rgba(15, 20, 25, 0.12);
}

.swim-faq__list summary {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  min-width: 2.75rem;
  padding: 0.5rem 0;
  font-weight: 700;
  cursor: pointer;
}

.swim-faq__list details p {
  margin: 0 0 var(--space-2);
  max-width: 48rem;
  color: var(--color-muted);
}

.swim-faq__more {
  margin: var(--space-2) 0 0;
  color: var(--color-muted);
}

.swim-faq__more a {
  display: inline-block;
  padding: 0.6rem 0;
}

/* Price table on each swim page: group size x price per person x group total */
.swim-price h4 {
  margin: var(--space-3) 0 var(--space-1);
  font-size: 1rem;
}

.swim-price__table {
  width: 100%;
  margin: var(--space-2) 0 var(--space-2);
  border-collapse: collapse;
  font-size: 1rem;
  line-height: 1.4;
  background: var(--color-white);
}

.swim-price__table caption {
  /* The visible heading is the h3/h4 above; keep the caption for assistive tech only. */
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.swim-price__table th,
.swim-price__table td {
  padding: 0.6rem 0.6rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(15, 20, 25, 0.12);
  color: var(--color-black);
}

.swim-price__table thead th {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-coastal-text);
  border-bottom: 2px solid var(--color-coastal);
}

.swim-price__table tbody th {
  font-weight: 700;
}

@media (max-width: 480px) {
  .swim-price__table th,
  .swim-price__table td {
    padding: 0.5rem 0.35rem;
    font-size: 0.95rem;
  }
}

/* Reviews inside a swim article: keep clear of the preceding buttons */
.prose .reviews {
  margin-top: var(--space-5);
}

/* Smaller sub heading under a page title */
.pband__sub {
  display: block;
  margin-top: 0.4rem;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--color-muted);
}
