.whychoose-wrapper {
  position: relative;
  overflow: hidden;
  padding: 150px 0 100px;
  background: none;
  border-radius: 4px; /* smooth rounded corners for the whole block */
}

/* Background image layer */
/* Background image layer with loading animation */
.whychoose-wrapper::before {
  content: "";
  position: absolute;
  top: 0;
  left: 8px;
  width: 100%;
  height: 100%;
  background: url('img/bg.jpg') center center / cover no-repeat;
  border-radius: 15px;
  z-index: 0;

  /* Initial hidden state */
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1.2s ease-out, transform 1.2s ease-out;
}

/* When loaded, fade in + slide up */
.whychoose-wrapper.loaded::before {
  opacity: 1;
  transform: translateY(-25%);;
}


/* Content on top */
.whychoose-main {
  position: relative;
  z-index: 2;
}





/* Optional: For cleaner visual spacing */
.whychoose-main h2 {
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 40px;
  color: #2e5932;
  font-family: 'Amaranth', sans-serif;
}


  /* Main White Box */
  .whychoose-main {
    position: relative;
    background: #fff;
    max-width: 1200px;
    margin: 0 auto;
    border-radius: 25px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    padding: 100px 60px;
    z-index: 2;
    text-align: center;
  }

  /* Title */
  .whychoose-main h2 {
    color: #03230b;
    font-weight: 700;
    font-size: 28px;
    text-transform: uppercase;
    margin-bottom: 80px;
    font-family: 'Amaranth', sans-serif;
  }

  /* Flex Container */
  .whychoose-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    flex-wrap: wrap;
    gap: 30px;
  }

  /* Boxes */
.whychoose-box {
  width: 27%;
  background: #e1fcde; /* default soft green */
  padding: 35px 25px;
  border-radius: 15px;
  text-align: left;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  transition: background-color 0.4s ease, box-shadow 0.4s ease;
  z-index: 5;
  cursor: pointer;
}

/* Hover effect (like Sri Ramakrishna Schools site) */
.whychoose-box:hover {
  background: #b6f3b0; /* slightly darker shade */
  box-shadow: 0 8px 25px rgba(0,0,0,0.15); /* soft lift effect */
}


  .whychoose-box:hover {
    transform: translateY(-6px);
  }

  .num {
    width: 50px;
    height: 50px;
    background: #7b51da;
    color: #fff;
    font-weight: bold;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-bottom: 15px;
  }

  .whychoose-box h3 {
    color: #4b2eb3;
    font-size: 20px;
    margin-bottom: 8px;
  }

  .whychoose-box p {
    color: #444;
    font-size: 19px;
    line-height: 1.6;
  }

  /* Circle Image */
  .whychoose-circle {
    width: 350px;
    height: 350px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    background: #fff;
    z-index: 10;
    flex-shrink: 0;
  }

  .whychoose-circle img {
    position: center;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  /* SVG Curved Lines */
  .connector {
    position: absolute;
    width: 300px;
    height: 150px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
  }

  .left-line {
    left: 22%;
  }

  .right-line {
    right: 22%;
  }

  /* Responsive */
  @media (max-width: 992px) {
    .whychoose-container {
      flex-direction: column;
      align-items: center;
      gap: 40px;
    }

    .connector {
      display: none;
    }

    .whychoose-box {
      width: 90%;
      text-align: center;
    }

    .whychoose-circle {
      width: 200px;
      height: 200px;
    }
  }

  /* Import Amaranth font */
@import url('https://fonts.googleapis.com/css2?family=Amaranth&display=swap');

/* Apply Amaranth font styling */
.whychoose-wrapper,
.whychoose-wrapper * {
  font-family: 'Amaranth', sans-serif;
}

/* Scroll animation initial state */
.reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s ease-out;
}

/* When visible */
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Initial hidden state */
.whychoose-box,
.whychoose-circle {
  opacity: 0;
  transform: translateY(80px);
  transition: all 1s ease;
}

/* When they appear in viewport */
.whychoose-box.show,
.whychoose-circle.show {
  opacity: 1;
  transform: translateY(0);
}

/* Add staggered effect (slight delay for each box) */
.whychoose-box:nth-child(1) {
  transition-delay: 0.1s;
}
.whychoose-box:nth-child(2) {
  transition-delay: 0.3s;
}
.whychoose-circle {
  transition-delay: 0.2s;
}

@media (max-width: 1024px) {
  .whychoose-wrapper {
    padding: 40px 20px;
  }

  .whychoose-main h2 {
    font-size: 1.8rem;
    text-align: center;
  }

  .whychoose-container {
    flex-direction: column;
    align-items: center;
    gap: 40px;
  }

  .whychoose-box {
    width: 90%;
    text-align: center;
  }

  .whychoose-box h3 {
    font-size: 1.3rem;
  }

  .whychoose-box p {
    font-size: 1rem;
  }

  .whychoose-circle {
    width: 220px;
    height: 220px;
  }

  .whychoose-circle img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
  }

  .connector {
    display: none; /* hide SVG lines on tablet and smaller */
  }
}

@media (max-width: 768px) {
  .whychoose-wrapper {
    padding: 30px 15px;
  }

  .whychoose-main h2 {
    font-size: 1.6rem;
    line-height: 1.3;
  }

  .whychoose-box {
    width: 100%;
    padding: 10px;
  }

  .num {
    font-size: 1.5rem;
    margin-bottom: 10px;
  }

  .whychoose-circle {
    width: 180px;
    height: 180px;
  }

  .whychoose-box h3 {
    font-size: 1.2rem;
  }

  .whychoose-box p {
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .whychoose-wrapper {
    padding: 20px 10px;
  }

  .whychoose-main h2 {
    font-size: 1.3rem;
  }

  .whychoose-circle {
    width: 150px;
    height: 150px;
  }

  .whychoose-box h3 {
    font-size: 1.1rem;
  }

  .whychoose-box p {
    font-size: 0.9rem;
  }

  .num {
    font-size: 1.3rem;
  }
}
