/* ============================================================
   MOTHERS DAY — Section Component
   Dependency: Swiper.js (swiper-bundle.min.css)
   Root.css overrides noted inline where applicable
   ============================================================ */

/* ------------------------------------------------------------
   1. SECTION CONTAINER
   ------------------------------------------------------------ */
.mothers-day {
  position: relative;
  --pink-color: #ffa49f;
  --purple-color: #3d2b53;
  padding-block: 4rem;
  margin-block: 2rem;
  isolation: isolate;
}

.mothers-day-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.mothers-day-bg::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: white;
  opacity: 0.5;
  /* mix-blend-mode: multiply; */
}

.mothers-day-bg img {
  object-fit: cover;
  width: 100%;
  height: 100%;
  object-position: bottom center;
}

.mothers-day .inner {
  position: relative;
  z-index: 1;
}




/* ------------------------------------------------------------
   2. HEADER — heading, intro paragraph
   ------------------------------------------------------------ */


.mothers-day h2 {
  /* fluid: 1.8rem (29px) @ 320px → 5.5rem (88px) @ 1440px */
  font-size: clamp(2.6rem, 4.3vw + 0.94rem, 4rem);
  font-weight: 700;
  line-height: 1.05;
  text-align: center;
  text-transform: uppercase;
  max-width: 30ch;
  margin-inline: auto;
  margin-bottom: 1rem;
  color: var(--pink-color);
}

.mothers-day p {
  /* fluid: 1rem (16px) → 1.4rem (22px) @ 1440px */
  font-size: clamp(1rem, 0.5vw + 0.9rem, 1.4rem);
  line-height: 1.2;
  font-weight: 500;
  text-align: center;
  max-width: 75ch;
  margin-inline: auto;
  margin-bottom: 2rem;
  color: var(--purple-color);
  /* white glow lifts text off the busy background pattern */
}

/* ------------------------------------------------------------
   3. SWIPER LAYOUT — equal-height slides
   ------------------------------------------------------------ */
.mothers-day .swiper-wrapper {
  align-items: stretch;
}

.mothers-day .swiper-slide {
  display: flex;
  height: auto;
}

/* ------------------------------------------------------------
   4. CARD ANATOMY
   .card-item → .card-link → .card-image / h3 / .cta
   ------------------------------------------------------------ */
.mothers-day .card-item {
  display: flex;
  width: 100%;
}

.mothers-day .card-link {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  gap: 1rem;
  padding-bottom: 2rem;
  overflow: hidden;
  background: #fff;
  border-radius: 2rem;
  text-decoration: none;
  color: inherit;
}

.mothers-day .card-image {
  aspect-ratio: 3 / 3.5;
  overflow: hidden;
  border-radius: 2rem;
  /* revealed on hover — creates green tint via img opacity */
  background-color: var(--purple-color);
}

.mothers-day .card-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease;
}

.mothers-day .card-item h3 {
  /* fluid: 0.875rem (14px) → 1.2rem (19px) @ 1440px */
  font-size: clamp(0.875rem, 0.45vw + 0.73rem, 1.2rem);
  font-weight: 400;
  line-height: 1.4;
  text-align: center;
  padding-inline: 0.75rem;
  color: var(--purple-color);
}

.mothers-day .card-item .cta {
  /* fluid: 0.875rem (14px) → 1.2rem (19px) @ 1440px */
  font-size: clamp(0.875rem, 0.4vw + 0.77rem, 1.2rem);
  width: -webkit-fit-content; /* Safari < 15 */
  width: fit-content;
  padding: 0.5rem 2rem;
  border-radius: 2rem;
  margin-top: auto;
  margin-inline: auto;
  background-color: var(--pink-color);
  color: white;
  transition: background-color 0.3s ease;
}

/* ------------------------------------------------------------
   5. NAVIGATION BUTTONS
   Desktop: absolute left/right of swiper, vertically centered
   Mobile:  static row, centered below the slides
   ------------------------------------------------------------ */

/* wrapper gives buttons a positioning context outside the swiper clip */
.mothers-day-swiper-nav {
  position: relative;
}

/* swiper keeps overflow: hidden — slides stay clipped */

.mothers-days-button--next,
.mothers-days-button--prev {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;

  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;

  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  border: none;
  background-color: var(--purple-color);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition:
    background-color 0.25s ease,
    box-shadow 0.25s ease;
}

/*
  Fluid positioning: fully outside at 1280px → flush inside at 768px
  right/left: clamp(-4.5rem, -14vw + 7.25rem, 0.5rem)
  At 1280px → -4rem (button fully outside + gap)
  At  768px →  0.5rem (just inside the edge)
  Below 768px → clamped to 0.5rem (then mobile overrides kick in)
*/
.mothers-days-button--next {
  right: clamp(-4.5rem, -14vw + 7.25rem, 0.5rem);
}
.mothers-days-button--prev {
  left: clamp(-4.5rem, -14vw + 7.25rem, 0.5rem);
}

/* SVG arrow via mask-image — color controlled with background-color */
.mothers-days-button--next::after,
.mothers-days-button--prev::after {
  content: "";
  display: block;
  width: 1.1rem;
  height: 1.1rem;
  background-color: var(--pink-color);
  -webkit-mask-image: url("../Assets/arrow-right-solid.svg");
  mask-image: url("../Assets/arrow-right-solid.svg");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-position: center;
  mask-position: center;
  transition: background-color 0.25s ease;
}

/* flip horizontally for the left/prev arrow */
.mothers-days-button--prev::after {
  transform: scaleX(-1);
}

/* disabled state — Swiper adds this class automatically */
.mothers-days-button--next.swiper-button-disabled,
.mothers-days-button--prev.swiper-button-disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

/* ------------------------------------------------------------
   7. INTERACTIONS — pointer devices only (not touch)
   Overrides global a:hover { opacity: 0.7 } from Root.css
   ------------------------------------------------------------ */
@media (hover: hover) {
  .mothers-day .card-link:hover {
    opacity: 1; /* cancel Root.css global a:hover opacity */
  }

  .mothers-day .card-link:hover .card-image img {
    opacity: 0.82; /* green background bleeds through for tint */
  }

  .mothers-day .card-link:hover .cta {
    background-color: var(--purple-color);
  }

  .mothers-days-button--next:hover,
  .mothers-days-button--prev:hover {
    background-color: var(--pink-color);
    box-shadow: 0 4px 16px rgba(125, 61, 149, 0.35);
  }

  .mothers-days-button--next:hover::after,
  .mothers-days-button--prev:hover::after {
    background-color: white;
  }
}

/* ------------------------------------------------------------
   8. RESPONSIVE
   ------------------------------------------------------------ */

/* background-attachment: fixed is broken on iOS Safari — reset */
@media (hover: none) and (pointer: coarse) {
  .mothers-day {
    background-attachment: scroll;
  }
}

@media (max-width: 767px) {
  .mothers-day .swiper-wrapper {
    align-items: flex-start;
  }

  /* collapse flex to block for single-column layout */
  .mothers-day .swiper-slide,
  .mothers-day .card-item {
    display: block;
    height: auto;
  }

  .mothers-day .card-link {
    height: auto;
  }

  /* buttons move below the slides — add bottom padding to wrapper */
  .mothers-day-swiper-nav {
    padding-bottom: 4.5rem;
  }

  .mothers-days-button--next,
  .mothers-days-button--prev {
    top: auto;
    bottom: 0.75rem;
    transform: none;
  }

  /* center both buttons: total width = 3.5rem + 1rem gap + 3.5rem = 8rem */
  .mothers-days-button--prev {
    left: calc(50% - 4rem);
    right: auto;
  }
  .mothers-days-button--next {
    left: calc(50% + 0.5rem);
    right: auto;
  }
}
