/* ========= SUPPORT SECTION — COMPLETE STYLES ========= */

/* Section Header */
.support-header {
  grid-column: 1 / -1;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 4rem;
}

.support-header h2 {
  font-family: 'Nunito', Arial, sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: #2d1b4e;
  margin-bottom: 1rem;
}

.support-header p {
  font-size: 1.1rem;
  color: #6c757d;
  line-height: 1.6;
}

/* Layout grid */
.support-section {
  --gap: clamp(2rem, 4vw, 4rem);
  display: grid;
  grid-template-columns: minmax(320px, 1fr) 2fr;
  gap: var(--gap);
  max-width: 1100px;
  margin-inline: auto;
  padding-block: 6rem;
}

/* LEFT: sticky, always vertically centered while the section is in view */
.support-visual {
  position: sticky;
  top: 0;                 /* stick to viewport top */
  height: 100vh;          /* occupy full viewport height */
  display: grid;
  place-items: center;    /* centers the image vertically and horizontally */
  background: transparent; /* no background, only the image */
}

.support-image-layer {
  max-height: 77vh;       /* respectful sizing */
  width: auto;
  height: auto;
  border-radius: 24px;
  grid-area: 1 / 1;       /* stack both images in same grid cell */
  transition: opacity var(--xfade-ms, 300ms) ease;
  will-change: opacity;
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .support-image-layer { transition: none !important; }
}

#support-image-back {
  opacity: calc(var(--back-opacity, 1) * var(--img-end, 1));
}

#support-image-front {
  opacity: calc(var(--front-opacity, 0) * var(--img-end, 1));
}

/* RIGHT: scrollable column, cards fade by distance to center band */
.support-scroll { 
  padding-right: 1rem;
  margin-top: 300px;
  margin-bottom: 300px;
}

.support-item {
  background: var(--white-coral, #fff5f5);
  border: 1px solid rgba(255, 127, 127, 0.12);
  border-radius: 24px;
  padding: 2rem;
  /* Cheaper shadows on non-active; richer only when active */
  box-shadow: 0 8px 20px rgba(255, 127, 127, 0.07);
  margin-top: 150px;
  margin-bottom: 150px;
  margin-left: 50px;

  /* Driven by JS */
  opacity: var(--card-opacity, 0.35);
  transform: scale(var(--card-scale, 0.98));
  transition: opacity .18s ease, transform .28s cubic-bezier(.4,1.6,.6,1), box-shadow .28s;
  will-change: opacity, transform;
}

.support-item[data-active="true"] {
  box-shadow: 0 18px 44px rgba(255, 127, 127, 0.14);
}

/* Skip painting far-off items when supported */
@supports (content-visibility: auto) {
  .support-item {
    content-visibility: auto;
    contain-intrinsic-size: 360px auto;
  }
}

/* 1px markers used only for IntersectionObserver on mobile */
.support-sentinel {
  position: relative;
  height: 1px;
  width: 100%;
  pointer-events: none;
  visibility: hidden;
}

/* Optional: scrollbar cosmetics for the text column */
.support-scroll::-webkit-scrollbar { width: 8px; }
.support-scroll::-webkit-scrollbar-track { background: transparent; }
.support-scroll::-webkit-scrollbar-thumb {
  background: rgba(255,127,127,0.35);
  border-radius: 4px;
}

.support-mobile {
  display: none;
}

/* Mobile slider */
@media (max-width: 768px) {
  .support-header {
    margin-inline: 1.5rem;
  }

  .support-header h2 {
    font-size: 2rem;
  }

  .support-header p {
    font-size: 1rem;
  }

  .support-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 4rem 0;
  }

  .support-visual,
  .support-scroll {
    display: none;
  }

  /* Viewport = clips overflow */
  .support-mobile {
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 1rem;
    position: relative;
    overflow: hidden;
    width: 100%;
    min-width: 0;
  }

  /* Track = wide strip you slide left/right */
  .support-mobile-track {
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    border-radius: 24px;
    background: var(--white-coral, #fff5f5);
    will-change: transform;
    transition: transform 350ms ease;
    touch-action: pan-y;
  }

  /* Each slide = exactly one viewport "page" */
  .support-mobile-slide {
    box-sizing: border-box;
    flex: 0 0 100%;
    min-width: 0;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.25rem;
    padding: 0rem 2.3rem 0rem;
  }

  .support-mobile-slide img {
    width: min(360px, 70vw);
    border-radius: 20px;
  }

  .support-mobile-text h3 {
    font-size: 1.25rem;
    color: #2d1b4e;
    margin: 0;
  }

  .support-mobile-text p {
    font-size: 1rem;
    line-height: 1.55;
    color: #4f4f5e;
    margin: 0;
  }

  .support-mobile-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: rgb(108 199 167);
    color: #ffffff;
    font-size: 1.75rem;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: background 180ms ease, transform 180ms ease;
    z-index: 5;
  }

  .support-mobile-nav span {
    display: inline-block;
    line-height: 1;
    vertical-align: middle;
    margin-top: -4px;
  }

  .support-mobile-nav--prev {
    left: 0.35rem;
  }

  .support-mobile-nav--next {
    right: 0.35rem;
  }

  .support-mobile-nav:focus-visible,
  .support-mobile-nav:hover {
    background: rgb(88 179 147);
    transform: translateY(-50%) scale(1.05);
  }

  .support-mobile-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
  }

  .support-mobile-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    background: rgba(45, 27, 78, 0.2);
    padding: 0;
    cursor: pointer;
    transition: transform 160ms ease, background 160ms ease;
  }

  .support-mobile-dot[aria-current="true"] {
    background: #63daa9;
    transform: scale(1.2);
  }
}
