/* ──────────────────────────────────────────────────────────
   Rewards page template
   ────────────────────────────────────────────────────────── */

.page-template-template-rewards .archive-header {
  display: none;
}

.rewards-timeline :is(h1, h2, h3),
.rewards-text-image :is(h1, h2, h3),
.rewards-cta :is(h1, h2, h3),
.rewards-image-text :is(h1, h2, h3),
.rewards-checklist :is(h1, h2, h3) {
  font-family: 'Work Sans', sans-serif !important;
}

@media (min-width: 1024px) {
  .refer-hero__title--rewards {
    margin: 0 0 60px;
  }
}

.rewards-timeline {
  font-family: 'Work Sans', sans-serif;
  color: var(--refer-ink);
  padding: 60px 0;
  border-radius: 30px 30px 0 0;
  background: linear-gradient(180deg, #EEEDF2 0%, #FFF 100%);
  margin-top: 11px;
}

.rewards-timeline__inner {
  width: 100%;
  max-width: 90%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
  gap: 60px;
}

@media (min-width: 1024px) {
  .rewards-timeline__inner {
    max-width: 80%;
  }
}

.rewards-timeline__intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}

.rewards-timeline__title {
  margin: 0;
  font-size: 36px !important;
  font-weight: 700;
  line-height: 1.25;
  color: #000;
  max-width: 470px;
}

.rewards-timeline__steps {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rewards-timeline__step {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding-bottom: 5px;
}

.rewards-timeline__step:last-child {
  padding-bottom: 0;
}

.rewards-timeline__step-icon {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
}

.rewards-timeline__step-icon img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.rewards-timeline__step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 56px;
  bottom: 5px;
  left: 27px;
  width: 2px;
  background: #000;
  transform-origin: top;
}

@media (min-width: 768px){
  .rewards-timeline__step:not(:last-child) {
    min-height: 150px;
  }
}

.rewards-timeline__step-body {
  flex: 1 1 auto;
  min-width: 0;
  padding-top: 8px;
}

.rewards-timeline__step-title {
  margin: 0 0 6px;
  font-size: 26px !important;
  font-weight: 700;
  color: #000;
}

.rewards-timeline__step-text {
  margin: 0;
  font-size: 16px !important;
  line-height: 1.55;
  color: #000;
  max-width: 480px;
}

@media (max-width: 900px) {
  .rewards-timeline__inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (max-width: 600px) {
  .rewards-timeline__title {
    font-size: 28px !important;
  }

  .rewards-timeline__step-icon {
    width: 44px;
    height: 44px;
  }

  .rewards-timeline__step-icon img {
    width: 44px;
    height: 44px;
  }

  .rewards-timeline__step:not(:last-child)::after {
    top: 44px;
    left: 21px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .refer-js-reveal .refer-reveal.is-visible .rewards-timeline__step {
    animation: refer-card-in .5s ease both;
    animation-delay: var(--refer-reveal-delay, .08s);
  }

  .refer-js-reveal .rewards-timeline__step:not(:last-child)::after {
    transform: scaleY(0);
    transition: transform .6s ease;
    transition-delay: calc(var(--refer-reveal-delay, .08s) + .3s);
  }

  .refer-js-reveal .refer-reveal.is-visible .rewards-timeline__step:not(:last-child)::after {
    transform: scaleY(1);
  }
}

/* -- Text/image feature ("Enjoy more with myFamilyChemist Rewards") -- */
.rewards-text-image {
  font-family: 'Work Sans', sans-serif;
  padding: 60px 0 10px;
}

.rewards-text-image__inner {
  width: 100%;
  max-width: 90%;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 60px;
}

@media (min-width: 1024px) {
  .rewards-text-image {
    padding: 60px 0;
  }

  .rewards-text-image__inner {
    max-width: 80%;
  }
}

.rewards-text-image__content {
  flex: 0 1 460px;
  min-width: 0;
}

@media (min-width: 1024px) {
  .rewards-text-image__content {
    padding-top: 35px;
  }
}

@media (min-width: 768px){
  .rewards-text-image__content .h1 {
    margin: 0;
    font-size: 40px !important;
    font-weight: 700;
    line-height: 1.25;
    color: #000;
  }
}

.rewards-text-image__image {
  flex: 1 1 700px;
  max-width: 780px;
  min-width: 0;
}

.rewards-text-image__image-mask {
  overflow: hidden;
  border-radius: 24px;
}

.rewards-text-image__image img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

@media (prefers-reduced-motion: no-preference) {
  .refer-js-reveal .rewards-text-image__image-mask {
    clip-path: inset(0 100% 0 0);
    transition: clip-path 1.1s cubic-bezier(.16, 1, .3, 1);
  }

  .refer-js-reveal .rewards-text-image__image-mask img {
    transform: scale(1.15);
    transition: transform 1.1s cubic-bezier(.16, 1, .3, 1);
  }

  .refer-js-reveal .rewards-text-image__image.is-revealed .rewards-text-image__image-mask {
    clip-path: inset(0 0 0 0);
  }

  .refer-js-reveal .rewards-text-image__image.is-revealed .rewards-text-image__image-mask img {
    transform: scale(1);
  }
}

@media (max-width: 900px) {
  .rewards-text-image__inner {
    flex-direction: column;
    align-items: stretch;
    gap: 32px;
  }

  .rewards-text-image__content,
  .rewards-text-image__image {
    flex: 1 1 auto;
    max-width: none;
  }
}

@media (max-width: 600px) {
  .rewards-text-image__content h2 {
    font-size: 28px !important;
  }
}

/* -- Referral CTA banner + checklist -- */
.rewards-cta {
  position: relative;
  width: 100%;
  margin: 0 0 60px;
  overflow: hidden;
  border-radius: 30px;
  min-height: 760px;
  font-family: 'Work Sans', sans-serif;
}

.rewards-cta--no-image {
  min-height: 0;
  background: var(--refer-navy-dark);
  padding-bottom: 40px;
}

.rewards-cta__bg {
  position: absolute;
  z-index: 0;
}

.rewards-cta__bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rewards-cta__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, .75) 0%, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, .35) 100%);
}

.rewards-cta__inner {
  position: relative;
  z-index: 1;
  min-height: 760px;
  width: 100%;
  max-width: 90%;
  margin: 0 auto;
  padding: 48px 0 32px;
  display: flex;
  flex-direction: column;
}

@media (min-width: 1024px) {
  .rewards-cta__inner {
    max-width: 80%;
  }
}

.rewards-cta__content {
  margin: 40px auto 0;
  max-width: 620px;
  text-align: center;
  color: #fff;
}

.rewards-cta__eyebrow {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #fff;
}

.rewards-cta__title {
  margin: 0 0 32px;
  font-size: 40px !important;
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
}

.rewards-cta__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

@media (max-width: 900px) {
  .rewards-cta__title {
    font-size: 32px !important;
  }
}

@media (max-width: 600px) {
  .rewards-cta__title {
    font-size: 26px !important;
  }

  .rewards-cta__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .rewards-cta__actions .refer-btn {
    margin: 0 auto;
  }
}

/* -- Image/text/button feature ("Turn Your Rewards into Future Savings") -- */
.rewards-image-text {
  font-family: 'Work Sans', sans-serif;
  padding: 60px 0;
}

.rewards-image-text__inner {
  width: 100%;
  max-width: 90%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 80px;
}

@media (min-width: 1024px) {
  .rewards-image-text__inner {
    max-width: 80%;
  }
}

.rewards-image-text__image {
  min-width: 0;
}

.rewards-image-text__image-mask {
  overflow: hidden;
  border-radius: 24px;
}

.rewards-image-text__image img {
  display: block;
  width: 100%;
  height: auto;
}

@media (prefers-reduced-motion: no-preference) {
  .refer-js-reveal .rewards-image-text__image-mask {
    clip-path: inset(0 100% 0 0);
    transition: clip-path 1.1s cubic-bezier(.16, 1, .3, 1);
  }

  .refer-js-reveal .rewards-image-text__image-mask img {
    transform: scale(1.15);
    transition: transform 1.1s cubic-bezier(.16, 1, .3, 1);
  }

  .refer-js-reveal .rewards-image-text__image.is-revealed .rewards-image-text__image-mask {
    clip-path: inset(0 0 0 0);
  }

  .refer-js-reveal .rewards-image-text__image.is-revealed .rewards-image-text__image-mask img {
    transform: scale(1);
  }
}

.rewards-image-text__content {
  min-width: 0;
}

.rewards-image-text__content h2,
.rewards-image-text__content h3 {
  margin: 0 0 16px;
  font-size: 28px !important;
  font-weight: 700;
  line-height: 1.25;
  color: #000;
}

.rewards-image-text__content p {
  margin: 0 0 16px;
  font-size: 16px !important;
  line-height: 1.6;
  color: #000;
}

.rewards-image-text__content .refer-btn {
  margin-top: 8px;
}

@media (max-width: 900px) {
  .rewards-image-text__inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* -- Standalone checklist (3-up, checkbox icons) -- */
.rewards-checklist {
  font-family: 'Work Sans', sans-serif;
  padding: 0 0 60px;
}

@media (max-width: 600px) {
  .rewards-image-text {
    padding-top: 0;
  }

  .rewards-checklist {
    padding-bottom: 0;
  }
}

.rewards-checklist__inner {
  width: 100%;
  max-width: 90%;
  margin: 0 auto;
  display: flex;
  gap: 32px;
}

@media (min-width: 1024px) {
  .rewards-checklist {
    font-family: 'Work Sans', sans-serif;
    padding: 32px 0 60px;
  }

  .rewards-checklist__inner {
    padding-top: 32px;
    border-top: 1px solid var(--refer-line);
    max-width: 80%;
  }
}

.rewards-checklist__item {
  flex: 1 1 0;
  min-width: 0;
}

.rewards-checklist__item + .rewards-checklist__item {
  padding-left: 32px;
  border-left: 1px solid var(--refer-line);
}

.rewards-checklist__heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.rewards-checklist__icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
}

.rewards-checklist__title {
  margin: 0;
  font-size: 18px !important;
  font-weight: 700;
  color: #000;
}

.rewards-checklist__text {
  margin: 0;
  padding-left: 36px;
  font-size: 16px !important;
  line-height: 1.5;
  color: #000;
}

@media (max-width: 900px) {
  .rewards-checklist__inner {
    flex-direction: column;
    gap: 24px;
  }

  .rewards-checklist__item + .rewards-checklist__item {
    padding-left: 0;
    border-left: 0;
  }
}

.rewards-checklist .refer-tc__checklist-progress-segment {
  background: var(--refer-line);
}

.rewards-checklist .refer-tc__checklist-progress-fill {
  background: var(--refer-navy);
}

@media (prefers-reduced-motion: no-preference) {
  .refer-js-reveal .refer-reveal.is-visible .rewards-checklist__item {
    animation: refer-card-in .5s ease both;
    animation-delay: var(--refer-reveal-delay, .08s);
  }
}
