/* ===============================
   Homepage – Section 5
   Why Butterfly Nursery
   =============================== */

.why-butterfly-nursery {
  position: relative;
  overflow: hidden;
  padding-block: clamp(60px, 10vw, 120px); /* top & bottom padding */
}


.why-butterfly-nursery__container {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: start;
  gap: var(--space-5);
  position: relative;
}

/* -------------------------------
   Text block
   ------------------------------- */
.why-butterfly-nursery__text {
  z-index: 1;
}

.why-butterfly-nursery__title {
  font-size: var(--fs-h2);
  font-weight: var(--w-h2);
  color: var(--black);
  margin-bottom: var(--space-2);
}

.why-butterfly-nursery__desc {
  color: #333;
  opacity: 0.9;
  max-width: 560px;
  line-height: var(--lh-body);
}

/* -------------------------------
   Visual: photo + USPs
   ------------------------------- */
.why-butterfly-nursery__visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.why-butterfly-nursery__photo {
  position: relative;
  max-width: 420px;
  border-radius: 50%; /* oval */
  aspect-ratio: 1 / 1; /* keeps it round even if the image container resizes */
  overflow: hidden;
  box-shadow: var(--shadow-1);
}

.why-butterfly-nursery__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.why-butterfly-nursery__usps {
  position: absolute;
  bottom: -20%;
  right: 70%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
  padding: 18px 22px;
  max-width: 560px;
}

.why-butterfly-nursery__usp {
  display: flex;
  align-items: center;
  gap: 10px;
}

.why-butterfly-nursery__usp-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.why-butterfly-nursery__usp-text {
  color: var(--black);
  font-weight: 600;
  font-size: clamp(15px, 1vw, 17px);
  margin: 0;
}

/* -------------------------------
   Decorative illustrations
   ------------------------------- */
.why-butterfly-nursery__illus {
  position: absolute;
  z-index: 0;
}

.why-butterfly-nursery__illus--top {
  top: -50px;
  right: 0;
  width: clamp(120px, 18vw, 180px);
}

.why-butterfly-nursery__illus--bottom {
  bottom: -55px;
  left: 40px;
  width: clamp(120px, 18vw, 180px);
}

/* ===============================
   Responsive layout
   =============================== */

/* --- Tablet (≤1023px): stack text above photo, keep USPs over photo --- */
@media (max-width: 1023.98px) {
  .why-butterfly-nursery__container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .why-butterfly-nursery__text {
    margin-bottom: var(--space-4);
  }

  .why-butterfly-nursery__desc {
    margin-inline: auto;
    text-align: center;
  }

  .why-butterfly-nursery__photo {
    max-width: 380px;
    margin-inline: auto;
  }

  .why-butterfly-nursery__usps {
    position: absolute;
    bottom: 6%;
    left: 50%;
    transform: translateX(-50%);
    max-width: 280px;
  }

  .why-butterfly-nursery__illus--top {
    width: clamp(100px, 22vw, 160px);
    top: 250px;   /* was 0 — pulls it down toward the photo */
    right: 130px; /* brings it closer horizontally */
  }

  .why-butterfly-nursery__illus--bottom {
    width: clamp(100px, 22vw, 160px);
  }
}

/* --- Tablet mid-range (769–1023px): reposition USPs properly --- */
@media (min-width: 769px) and (max-width: 1023.98px) {
  .why-butterfly-nursery__visual {
    position: relative;
    display: block;
  }

  .why-butterfly-nursery__photo {
    max-width: 420px;
    margin-inline: auto;
  }

  .why-butterfly-nursery__usps {
    position: absolute;
    bottom: -12%; /* lower down for more breathing space */
    left: 50%;
    transform: translateX(-42%); /* slightly right of centre */
    width: 340px; /* more width for balanced proportions */
    padding: 22px 26px;
    border-radius: 18px;
    box-shadow: var(--shadow-1h); /* subtle lift for visual separation */
  }

  .why-butterfly-nursery__usp-text {
    font-size: 16px;
  }
}



/* --- Mobile (≤767px): USPs move below photo --- */
@media (max-width: 768.98px) {
  .why-butterfly-nursery__visual {
    flex-direction: column;
  }

  

  .why-butterfly-nursery__photo {
    max-width: 420px;
  }

  .why-butterfly-nursery__usps {
    position: static;
    transform: none;
    margin-top: var(--space-3);
    background: var(--white);
    box-shadow: var(--shadow-1);
    text-align: left;
  }

  .why-butterfly-nursery__illus--top {
    width: clamp(80px, 25vw, 120px);
    top: 340px;   /* was 0 — pulls it down toward the photo */
    right: 20px; /* brings it closer horizontally */
  }

  .why-butterfly-nursery__illus--bottom {
    width: clamp(80px, 25vw, 120px);
  }
}


@media (max-width: 450px) {
  .why-butterfly-nursery__illus--top {
    top: 320px;   /* was 0 — pulls it down toward the photo */
    right: 20px; /* brings it closer horizontally */
  }
}

@media (min-width: 1024px) {
.why-butterfly-nursery__visual {
  position: relative;
  display: block;          /* no flex centering */
  width: 100%;             /* use full width of grid column */
}

.why-butterfly-nursery__photo {
  display: block;
  margin-left: auto;       /* keeps image to the right */
  margin-right: 0;
}

.why-butterfly-nursery__usps {
  position: absolute;
  bottom: -13%;
  right: 38%;
  width: 300px;            /* fixed width, will now take effect */
  max-width: none;         /* removes any lingering cap */
}

}


/* Keep butterfly visually locked to the photo between 430–768px */
@media (min-width: 430px) and (max-width: 768px) {
  .why-butterfly-nursery__visual {
    position: relative; /* ensure child positioning is relative to this */
  }

  .why-butterfly-nursery__illus--top {
    position: absolute;
    top: 30%;        /* relative to photo top */
    right: 20%;     /* stays close to top-right of the circle */
    width: 22%;     /* scales smoothly with photo size */
    transform: none; /* remove any global transforms */
    z-index: 2;     /* keeps it above photo */
  }
}
