/**
 * Care & Support / Community Access — storytelling layout, gallery, lightbox
 * Scope: .trc-care-support-page
 * Relies on .trc-in-home-page + about-trc.css for checklist & NDIS step cards.
 */

.trc-care-support-page.trc-ihc-story-main {
  background: linear-gradient(180deg, #f9f7f7 0%, #ffffff 14%, #ffffff 86%, #f6f4f4 100%);
}

/* ——— Scroll reveals (Intersection Observer) ——— */
.trc-care-support-page .trc-reveal {
  opacity: 0;
  transform: translate3d(0, 20px, 0);
  transition:
    opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.trc-care-support-page .trc-reveal--visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.trc-care-support-page .trc-reveal-delay-1 {
  transition-delay: 0.08s;
}

.trc-care-support-page .trc-reveal-delay-2 {
  transition-delay: 0.16s;
}

.trc-care-support-page .trc-reveal-delay-3 {
  transition-delay: 0.24s;
}

@media (prefers-reduced-motion: reduce) {
  .trc-care-support-page .trc-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ——— Hero: community access ——— */
.trc-care-support-page .trc-cas-hero-wrap {
  position: relative;
  padding-bottom: 0;
}

.trc-care-support-page .trc-cas-hero-card {
  position: relative;
  background: var(--trc-ihc-surface, #fff);
  border-radius: var(--trc-ihc-radius, 14px);
  border: 1px solid var(--trc-ihc-border, rgba(15, 23, 42, 0.08));
  box-shadow: var(--trc-ihc-shadow, 0 4px 24px rgba(15, 23, 42, 0.06));
  overflow: visible;
}

.trc-care-support-page .trc-cas-hero-grid.trc-about-hero {
  align-items: center;
}

.trc-care-support-page .trc-cas-hero-media-wrap {
  position: relative;
  padding: clamp(0.75rem, 2vw, 1.25rem);
}

/* Decorative circles (reference) */
.trc-care-support-page .trc-cas-hero-media-wrap::before,
.trc-care-support-page .trc-cas-hero-media-wrap::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
  background: rgba(180, 140, 100, 0.12);
}

.trc-care-support-page .trc-cas-hero-media-wrap::before {
  width: min(72%, 340px);
  aspect-ratio: 1;
  left: -6%;
  top: 8%;
}

.trc-care-support-page .trc-cas-hero-media-wrap::after {
  width: min(55%, 260px);
  aspect-ratio: 1;
  right: -4%;
  bottom: 4%;
  background: rgba(116, 19, 29, 0.06);
}

.trc-care-support-page .trc-cas-hero__media.trc-about-hero__media {
  position: relative;
  z-index: 1;
  border-radius: clamp(28px, 5vw, 44px);
  overflow: hidden;
  box-shadow: 0 20px 50px -20px rgba(116, 19, 29, 0.2);
}

.trc-care-support-page .trc-cas-hero__media img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}

.trc-care-support-page .trc-cas-hero__body .trc-about-subtitle {
  color: var(--trc-ihc-accent, #ef2428);
  font-weight: 800;
}

.trc-care-support-page .trc-cas-join {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1.25rem;
  padding: 0.75rem 1.75rem;
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  text-decoration: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #ef2428 0%, #d41f24 100%);
  box-shadow: 0 4px 18px rgba(239, 36, 40, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.trc-care-support-page .trc-cas-join:hover {
  color: #fff;
  background: linear-gradient(135deg, #74131d 0%, #5c1018 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(116, 19, 29, 0.3);
}

/* ——— Transport: centred title + split ——— */
.trc-care-support-page .trc-cas-transport-section {
  background: #fff;
}

.trc-care-support-page .trc-cas-transport__head {
  text-align: center;
  max-width: 48rem;
  margin: 0 auto 2rem;
}

.trc-care-support-page .trc-cas-transport__title {
  font-family: var(--trc-font-display, "Clash Display", system-ui, sans-serif);
  font-size: clamp(1.35rem, 2.8vw, 1.95rem);
  font-weight: 800;
  color: var(--trc-ihc-accent, #ef2428);
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
}

.trc-care-support-page .trc-cas-transport-aside-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--trc-ihc-primary, #74131d);
  margin: 0 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.1);
}

/* Checklist dividers between items (reference) */
.trc-care-support-page .trc-cas-checklist.trc-ihc-checklist .trc-ihc-checklist__item + .trc-ihc-checklist__item {
  margin-top: 0.35rem;
  padding-top: 0.35rem;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

/* ——— Gallery ——— */
.trc-care-support-page .trc-cas-gallery-section {
  position: relative;
  background: linear-gradient(
    165deg,
    #fdfcfc 0%,
    #ffffff 22%,
    #faf8f8 55%,
    #ffffff 100%
  );
  padding-top: clamp(2.25rem, 5vw, 3.75rem);
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
}

.trc-care-support-page .trc-cas-gallery-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(90%, 520px);
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(116, 19, 29, 0.35), #ef2428, rgba(116, 19, 29, 0.35), transparent);
  pointer-events: none;
  opacity: 0.85;
}

.trc-care-support-page .trc-cas-gallery__head {
  text-align: center;
  max-width: 40rem;
  margin: 0 auto 2rem;
}

.trc-care-support-page .trc-cas-gallery__kicker {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--trc-ihc-primary, #74131d);
  margin: 0 0 0.5rem;
  opacity: 0.9;
}

.trc-care-support-page .trc-cas-gallery__title {
  font-family: var(--trc-font-display, "Clash Display", system-ui, sans-serif);
  font-size: clamp(1.45rem, 3vw, 2.05rem);
  font-weight: 800;
  color: var(--trc-ihc-accent, #ef2428);
  margin: 0 0 0.85rem;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.trc-care-support-page .trc-cas-gallery__title::after {
  content: "";
  display: block;
  width: 4rem;
  height: 4px;
  margin: 0.85rem auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #74131d, #ef2428);
}

.trc-care-support-page .trc-cas-gallery__intro {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--trc-ihc-muted, #475569);
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

.trc-care-support-page .trc-cas-gallery__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

@media (min-width: 576px) {
  .trc-care-support-page .trc-cas-gallery__grid {
    gap: 12px;
  }
}

@media (min-width: 992px) {
  .trc-care-support-page .trc-cas-gallery__grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
  }
}

.trc-care-support-page .trc-cas-gallery__item {
  margin: 0;
  aspect-ratio: 4 / 3;
}

.trc-care-support-page .trc-cas-gallery__trigger {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: none;
  cursor: zoom-in;
  border-radius: clamp(12px, 2vw, 16px);
  overflow: hidden;
  background: linear-gradient(145deg, #e2e8f0, #f1f5f9);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  transition: box-shadow 0.35s ease, transform 0.35s ease;
}

.trc-care-support-page .trc-cas-gallery__trigger:hover,
.trc-care-support-page .trc-cas-gallery__trigger:focus-visible {
  transform: translateY(-4px);
  box-shadow:
    0 14px 32px -12px rgba(116, 19, 29, 0.28),
    0 0 0 1px rgba(239, 36, 40, 0.2);
  outline: none;
}

.trc-care-support-page .trc-cas-gallery__trigger:focus-visible {
  outline: 2px solid #ef2428;
  outline-offset: 3px;
}

.trc-care-support-page .trc-cas-gallery__frame {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.trc-care-support-page .trc-cas-gallery__trigger img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1);
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.trc-care-support-page .trc-cas-gallery__cap {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.05) 0%,
    rgba(116, 19, 29, 0.72) 55%,
    rgba(116, 19, 29, 0.88) 100%
  );
  color: #fff;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.trc-care-support-page .trc-cas-gallery__cap i {
  font-size: 1.35rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
}

.trc-care-support-page .trc-cas-gallery__cap-text {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.trc-care-support-page .trc-cas-gallery__trigger:hover .trc-cas-gallery__cap,
.trc-care-support-page .trc-cas-gallery__trigger:focus-visible .trc-cas-gallery__cap {
  opacity: 1;
}

.trc-care-support-page .trc-cas-gallery__trigger:hover img,
.trc-care-support-page .trc-cas-gallery__trigger:focus-visible img {
  transform: scale(1.07);
}

.trc-care-support-page .trc-cas-gallery__cta {
  text-align: center;
  margin-top: 2.25rem;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(116, 19, 29, 0.1);
}

/* ——— CTA: centred headings (reference) ——— */
.trc-care-support-page .trc-cas-story-cta .trc-ihc-story-h2,
.trc-care-support-page .trc-cas-story-cta .trc-ihc-story-h3 {
  text-align: center;
}

.trc-care-support-page .trc-cas-story-cta .trc-ihc-form-intro {
  text-align: center;
}

/* ——— Lightbox ——— */
.trc-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.trc-lightbox[hidden] {
  display: none !important;
}

.trc-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.82);
  cursor: pointer;
}

.trc-lightbox__dialog {
  position: relative;
  z-index: 1;
  max-width: min(96vw, 1100px);
  max-height: min(88vh, 900px);
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.trc-lightbox__img {
  max-width: 100%;
  max-height: min(88vh, 900px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.trc-lightbox__close,
.trc-lightbox__prev,
.trc-lightbox__next {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, #74131d, #ef2428);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.trc-lightbox__close:hover,
.trc-lightbox__close:focus-visible {
  transform: scale(1.06);
  opacity: 0.95;
  outline: none;
}

.trc-lightbox__prev:hover,
.trc-lightbox__prev:focus-visible,
.trc-lightbox__next:hover,
.trc-lightbox__next:focus-visible {
  transform: translateY(-50%) scale(1.06);
  opacity: 0.95;
  outline: none;
}

.trc-lightbox__close {
  top: -8px;
  right: -8px;
  font-size: 1.35rem;
  line-height: 1;
}

.trc-lightbox__prev {
  left: 0.25rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.25rem;
}

.trc-lightbox__next {
  right: 0.25rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.25rem;
}

@media (max-width: 575px) {
  .trc-lightbox__prev {
    left: 0.1rem;
  }

  .trc-lightbox__next {
    right: 0.1rem;
  }

  .trc-lightbox__close {
    top: 0.25rem;
    right: 0.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .trc-care-support-page .trc-cas-join:hover,
  .trc-care-support-page .trc-cas-gallery__trigger:hover {
    transform: none;
  }

  .trc-care-support-page .trc-cas-gallery__trigger:hover img,
  .trc-care-support-page .trc-cas-gallery__trigger:focus-visible img {
    transform: none;
  }

  .trc-care-support-page .trc-cas-gallery__trigger:hover .trc-cas-gallery__cap {
    opacity: 0;
  }

  .trc-care-support-page .trc-cas-gallery__trigger:focus-visible .trc-cas-gallery__cap {
    opacity: 1;
  }

  .trc-lightbox__prev:hover,
  .trc-lightbox__next:hover {
    transform: translateY(-50%);
  }
}
