/* ============================================================
   ALIGN HEALTH CO — V4 Override CSS
   Late-stage additions on top of style.css / v2.css / v3.css.
   Extracted from inline <style> in index.html so every prototype
   page can share these tokens and component styles.
   Loaded after v3.css.
   ============================================================ */

/* ===== WHO WE HELP — custom SVG icons replace numbers ===== */
.audience-icon {
  min-width: 72px;
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  padding-top: 0.125rem;
  position: relative;
}
.audience-icon::before {
  content: '';
  position: absolute;
  background: rgba(0, 181, 200, 0.12);
  z-index: 0;
}
.audience-icon svg,
.audience-icon img {
  position: relative;
  z-index: 1;
}
/* Circle — Mining & FIFO */
.audience-icon--mining::before {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  top: -6px;
  left: -6px;
}
/* Diamond — Athletes */
.audience-icon--athletes::before {
  width: 50px;
  height: 50px;
  border-radius: 6px;
  transform: rotate(45deg);
  top: 3px;
  left: 3px;
}
/* Rounded square — Active Professionals */
.audience-icon--professionals::before {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  top: -4px;
  left: -4px;
}
/* Organic blob — Families */
.audience-icon--families::before {
  width: 68px;
  height: 68px;
  border-radius: 42% 58% 62% 38% / 48% 44% 56% 52%;
  top: -6px;
  left: -6px;
}
@media (max-width: 768px) {
  .audience-icon--mining::before,
  .audience-icon--professionals::before,
  .audience-icon--families::before { width: 54px; height: 54px; top: -5px; left: -5px; }
  .audience-icon--athletes::before { width: 40px; height: 40px; top: 2px; left: 2px; }
}
.audience-icon svg,
.audience-icon img {
  width: 56px;
  height: 56px;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}
.audience-icon img {
  object-fit: contain;
  /* shift cyan shirts from ~180° to brand teal #00B5C8 (~186°) */
  filter: hue-rotate(6deg) saturate(1.05);
}
.audience-row:hover .audience-icon svg,
.audience-row:hover .audience-icon img {
  opacity: 1;
}
@media (max-width: 768px) {
  .audience-icon { min-width: 52px; }
  .audience-icon svg,
  .audience-icon img { width: 44px; height: 44px; }
}

/* ===== HERO PILLARS — Movement · Strength · Balance ===== */
.hero-pillars {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.hero-pillar {
  font-family: 'din1451', Georgia, serif;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #00B5C8;
}
.hero-pillar-sep {
  color: rgba(255,255,255,0.3);
  font-size: 1rem;
}

/* ===== HERO — restore v2 layout, undo v3.css center overrides ===== */
.v2 .hero-section {
  min-height: 600px;
  padding-block: var(--space-80);
}
.v2 .hero-bg {
  background:
    linear-gradient(
      to right,
      rgba(2, 63, 74, 0.95) 0%,
      rgba(2, 63, 74, 0.92) 40%,
      rgba(2, 63, 74, 0.55) 65%,
      rgba(2, 63, 74, 0.35) 100%
    ),
    url('../images/beach4.jpg');
  background-size: cover;
  background-position: center;
}
.v2 .hero-content {
  text-align: left;
  max-width: 100%;
  margin-inline: unset;
}
.v2 .hero-section .lead {
  margin-inline: unset;
}
.v2 .hero-trust {
  justify-content: flex-start;
}

/* Mobile: tighten the gap between the fixed header and the hero label.
   v4.css's earlier rule sets padding-block to --space-80 (128px) at all widths,
   which leaves an obvious gap below the 73px-tall fixed header on small screens. */
@media (max-width: 768px) {
  .v2 .hero-section {
    padding-block: var(--space-40) var(--space-60);
    min-height: 500px;
  }
}

/* ===== PHOTO CAROUSEL ===== */
.photo-carousel {
  --slides-visible: 3.2;
  position: relative;
  height: 360px;
  overflow: hidden;
  background: #000;
}
@media (max-width: 900px) {
  .photo-carousel { --slides-visible: 2.2; height: 280px; }
}
@media (max-width: 520px) {
  .photo-carousel { --slides-visible: 1.15; height: 240px; }
}
.photo-carousel__wrap {
  overflow: hidden;
  height: 100%;
}
.photo-carousel__track {
  display: flex;
  height: 100%;
  will-change: transform;
  transition: transform 0.52s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.photo-carousel__slide {
  flex: 0 0 calc(100% / var(--slides-visible));
  height: 100%;
  overflow: hidden;
}
.photo-carousel__image-btn {
  width: 100%;
  height: 100%;
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}
.photo-carousel__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.photo-carousel__slide:hover img,
.photo-carousel__image-btn:focus-visible img { transform: scale(1.04); }
.photo-carousel__image-btn:focus-visible {
  outline: 3px solid #00B5C8;
  outline-offset: -5px;
}
.photo-carousel__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(2, 63, 74, 0.72);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  font-size: 1.4rem;
  line-height: 1;
}
.photo-carousel__btn:hover { background: rgba(2, 63, 74, 0.95); }
.photo-carousel__btn--prev { left: 14px; }
.photo-carousel__btn--next { right: 14px; }
.photo-carousel__dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 7px;
  z-index: 10;
}
.photo-carousel__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s ease, transform 0.2s ease;
}
.photo-carousel__dot.is-active {
  background: #00B5C8;
  transform: scale(1.3);
}

/* ===== GALLERY MODAL ===== */
.gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 2200;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 48px);
}
.gallery-modal[hidden] { display: none; }
.gallery-modal__overlay {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(2, 28, 35, 0.88);
  cursor: zoom-out;
}
.gallery-modal__stage {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  height: min(760px, 84vh);
  display: grid;
  place-items: center;
}
.gallery-modal__image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}
.gallery-modal__close,
.gallery-modal__nav {
  position: absolute;
  z-index: 2;
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(2, 63, 74, 0.82);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
}
.gallery-modal__close:hover,
.gallery-modal__nav:hover {
  background: rgba(0, 181, 200, 0.92);
}
.gallery-modal__close:focus-visible,
.gallery-modal__nav:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}
.gallery-modal__close {
  top: -10px;
  right: -10px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 2rem;
  line-height: 1;
}
.gallery-modal__nav {
  top: 50%;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  line-height: 1;
}
.gallery-modal__nav--prev { left: -22px; }
.gallery-modal__nav--next { right: -22px; }

@media (max-width: 720px) {
  .gallery-modal {
    padding: 56px 14px 28px;
  }
  .gallery-modal__stage {
    height: 78vh;
  }
  .gallery-modal__close {
    top: -48px;
    right: 0;
  }
  .gallery-modal__nav {
    width: 44px;
    height: 44px;
    font-size: 1.7rem;
  }
  .gallery-modal__nav--prev { left: 8px; }
  .gallery-modal__nav--next { right: 8px; }
}

/* ===== TEAM CARDS — photo fill ===== */
.team-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

/* ===== TEAM CARDS — button pinned to bottom ===== */
.team-card {
  display: flex;
  flex-direction: column;
}
.team-card__bio {
  flex: 1;
}
.team-card__btn {
  margin-top: var(--space-20);
  width: auto;
  align-self: center;
  padding: 0;
  background: transparent;
  border: none;
  color: var(--color-primary);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: gap 0.2s ease, color 0.2s ease;
}
.team-card__btn::after {
  content: '→';
}
.team-card__btn:hover {
  background: transparent;
  color: var(--color-primary-dark);
  gap: 0.6rem;
}

/* ===== PILLAR ICONS — applies wherever .pillar-card__icon is used
       (homepage #approach + about page #three-pillars + future sections) ===== */
.pillar-card__icon {
  width: 64px;
  height: 64px;
  object-fit: contain;
  margin-bottom: var(--space-20, 1rem);
  opacity: 0.9;
}

/* ===== FINAL CTA — beach background image ===== */
.cta-section--v3 {
  background-color: transparent;
  background-image:
    linear-gradient(
      rgba(2, 63, 74, 0.84) 0%,
      rgba(2, 63, 74, 0.90) 100%
    ),
    url('../images/mackay-beach.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: #fff;
}
.cta-section--v3 h2 {
  color: #fff;
}
.cta-section--v3 .lead {
  color: rgba(255, 255, 255, 0.82);
}
.cta-section--v3 .cta-meta-item {
  color: rgba(255, 255, 255, 0.65);
}
.cta-section--v3 .cta-meta-item svg {
  stroke: rgba(255, 255, 255, 0.65);
}
.cta-section--v3 .btn--outline {
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
}
.cta-section--v3 .btn--outline:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #fff;
}

/* ===== TREATMENT SPLIT ===== */
.treatment-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 1200px;
  margin-inline: auto;
}
.treatment-split__image {
  overflow: hidden;
  position: relative;
}
.treatment-split__image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.treatment-split__content {
  padding: clamp(2.5rem, 6vw, 5rem) clamp(2rem, 5vw, 4.5rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--color-off-white, #f8f6f2);
}
.treatment-split--dark .treatment-split__content {
  background: #1a2332;
  color: #fff;
}
.treatment-split--reverse .treatment-split__image { order: 2; }
.treatment-split--reverse .treatment-split__content { order: 1; }
.treatment-split__label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #2ea3a3;
  margin-bottom: 0.75rem;
  display: block;
}
.treatment-split--dark .treatment-split__label { color: #7dd3d3; }
.treatment-split__title {
  font-family: 'din1451', Georgia, "Times New Roman", serif;
  font-size: clamp(1.28rem, 2.4vw, 1.8rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  color: inherit;
  text-transform: uppercase;
}
.treatment-split__body {
  font-size: 1rem;
  line-height: 1.75;
  opacity: 0.82;
  margin-bottom: 2rem;
}
.treatment-split__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #2ea3a3;
  text-decoration: none;
}
.treatment-split--dark .treatment-split__link { color: #7dd3d3; }
.treatment-split__link:hover { text-decoration: underline; }
@media (max-width: 768px) {
  .treatment-split { grid-template-columns: 1fr; min-height: auto; }
  .treatment-split__image { height: 280px; }
  .treatment-split--reverse .treatment-split__image { order: 0; }
  .treatment-split--reverse .treatment-split__content { order: 1; }
}

/* ===== SECTION BG SWAP — Approach → light, Who We Help → dark ===== */
.v2 #approach {
  background-color: var(--color-background) !important;
}
.v2 #approach .section__title {
  color: var(--color-foreground) !important;
}
.v2 #approach .section__subtitle {
  color: var(--color-muted) !important;
}
.v2 #approach .pillar-card {
  background: var(--color-background) !important;
  border: 1px solid var(--color-border) !important;
  border-top: 3px solid var(--color-primary) !important;
}
.v2 #approach .pillar-card__title {
  color: var(--color-foreground) !important;
}
.v2 #approach .pillar-card__body {
  color: var(--color-muted) !important;
}
.v2 #approach .approach-note {
  background: rgba(0, 181, 200, 0.06) !important;
}
.v2 #approach .approach-note p {
  color: var(--color-body) !important;
}

.v2 #who-we-help {
  background-color: #023F4A;
}
.v2 #who-we-help .section__title {
  color: #fff;
}
.v2 #who-we-help .section__subtitle {
  color: rgba(255, 255, 255, 0.55);
}
.v2 #who-we-help .audience-row {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}
.v2 #who-we-help .audience-row:hover {
  background: rgba(0, 181, 200, 0.08);
}
.v2 #who-we-help .audience-row__title {
  color: #fff;
}
.v2 #who-we-help .audience-row__body {
  color: rgba(255, 255, 255, 0.55);
}
.v2 #who-we-help .audience-row__link {
  color: var(--color-primary);
}
.v2 #who-we-help .audience-icon::before {
  background: #f9fafccc;
}
.v2 #who-we-help .audience-icon svg,
.v2 #who-we-help .audience-icon img {
  opacity: 1;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.35));
}

/* ===== TREATMENT SECTION HEADER ===== */
.treatments-intro {
  padding: var(--space-70, 4rem) var(--space-40, 1.5rem) var(--space-50, 3rem);
  text-align: center;
  background: var(--color-off-white, #f8f6f2);
}
