.ac-section {
  height: 900px;
  background-image: linear-gradient(
      to bottom,
      rgba(30, 110, 71, 1) 30%,
      transparent
    ),
    url('https://toursite.link/pinnacle/wp-content/uploads/2025/05/underwater-landscape-1.png');
  background-size: cover;
  background-position: bottom center;
  background-repeat: no-repeat;
  position: relative;
  color: white;
  text-align: center;

  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow: hidden;
}

/* diver / character image layer */
.ac {
  position: absolute;
  width: 100%;
  height: 100%;
  display: grid;
  align-items: center;
  justify-content: center;
  padding: 20px;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1;
}

.ac-img {
  transform: scale(0.7);
  transition: transform 0.5s ease;
}

.ac-section:hover .ac-img {
  transform: scale(1.1) translate(-80px, -50px);
}

/* Text and card container sits over the diver */
.ac-text {
  position: relative;
  z-index: 2;
  padding: 40px;
  width: 1100px;
  margin: 0 auto;
  color: white;
  text-align: center;
}

.ac-text h2 {
  font-size: 50px;
  margin-bottom: 10px;
  font-weight: 700;
  font-family: 'Philosopher', sans-serif;
  color: #F6931D;
}

.ac-text h3 {
  font-size: 50px;
  margin: 20px 0 10px;
  color: white;
  font-weight: 275;
  font-family: 'Poppins', sans-serif;
}

.ac-text p {
  color: white;
  line-height: 1.6;
  font-size: 20px;
  font-family: 'Poppins', sans-serif;
  margin-top: 10px;
  font-weight: normal;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* container of the 4 activity boxes */
.ac-box-container {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
  flex-wrap: nowrap; /* desktop: keep them in one row */
  position: relative;
  z-index: 2;
}

/* individual activity cards */
.ac-box {
  position: relative;
  width: 100%;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  overflow: hidden;
  text-align: center;
  font-weight: bold;
  color: #fff;
  backdrop-filter: blur(4px);
  transition: transform 0.3s ease, background-size 0.5s ease;
}

/* force a tall aspect ratio (vertical cards) */
.ac-box::before {
  content: "";
  display: block;
  padding-top: 200%; /* 2:1 height ratio (tall) */
}

/* dark / green gradient overlay for readability */
.ac-box::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgb(255 255 255 / 0%),
    rgb(30 110 71 / 0%),
    rgb(30 110 71 / 0%),
    rgba(30, 110, 71, 0.9) 90%
  );
  pointer-events: none;
  transition: background 0.4s ease;
}

/* title text in each box */
.sub-box-title {
  position: absolute;
  bottom: 30px;
  left: 0;
  right: 0;
  padding: 5px 10px;
  text-align: center;
  color: white;
  font-size: 20px;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  z-index: 3;
  transition: transform 0.5s ease;
  line-height: 1.3;
}

/* CTA button */
.explore-btn {
  display: inline-block;
  margin-top: 10px;
  padding: 6px 18px;
  font-size: 14px;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  color: white;
  background-color: transparent;
  border: 1px solid white;
  border-radius: 5px;
  text-decoration: none;
  opacity: 0;
  transition: all 0.3s ease;
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
}

/* desktop hover interactions */
.ac-box:hover .explore-btn {
  opacity: 1;
  background-color: rgba(30, 110, 71, 0);
  color: white;
  transition-delay: 0.2s;
}

.ac-box .explore-btn:hover {
  opacity: 1;
  background-color: #F6931D;
  color: white;
  transition-delay: 0s;
}

.ac-box:hover .sub-box-title {
  transform: translateY(-40%);
}

.ac-box:hover::after {
  background: linear-gradient(
    to bottom,
    rgb(255 255 255 / 0%),
    rgb(30 110 71 / 0%),
    rgba(30, 110, 71, 1) 90%
  );
}

/* smooth zoom bg on desktop */
@media (min-width: 1025px) {
  .ac-box {
    background-size: 100% !important;
  }
  .ac-box:hover {
    background-size: 120% !important;
  }
}

/* global hover timing tweaks */
.ac-section:hover .sub-box-title {
  transition-delay: 0.2s;
}
.ac-section:hover .explore-btn {
  transition-delay: 0.4s;
}

/* ========================================================= */
/* TABLET ≤1024px                                            */
/* ========================================================= */
@media screen and (max-width: 1024px) {
  .ac-section {
    height: auto;
    min-height: 700px;
    padding: 60px 20px 40px;
    background-image: linear-gradient(
        to bottom,
        rgba(30, 110, 71, 0.95) 0%,
        rgba(30, 110, 71, 0.8) 40%,
        rgba(30, 110, 71, 0) 100%
      ),
      url('https://toursite.link/pinnacle/wp-content/uploads/2025/05/underwater-landscape-1.png');
    background-position: center bottom;
    background-size: cover;
  }

  /* diver image stays centered, a bit smaller, no hover move */
  .ac {
    position: relative;
    order: 2;
    width: 100%;
    height: auto;
    padding: 0;
  }

  .ac-img {
    transform: scale(0.8);
    max-width: 500px;
    width: 100%;
    margin: 30px auto 0;
  }

  .ac-section:hover .ac-img {
    transform: scale(0.8); /* disable hover translate on touch */
  }

  .ac-text {
    order: 1;
    width: 100%;
    max-width: 900px;
    padding: 40px 20px 20px;
    margin: 0 auto;
    text-align: center;
    z-index: 2;
  }

  .ac-text h2 {
    font-size: 40px;
    line-height: 1.2;
  }

  .ac-text h3 {
    font-size: 32px;
    line-height: 1.3;
    font-weight: 300;
  }

  .ac-text p {
    font-size: 18px;
    line-height: 1.6;
    max-width: 700px;
  }

  /* turn the 4 boxes into a 2x2 grid on tablet */
  .ac-box-container {
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
  }

  .ac-box {
    flex: 0 1 calc(50% - 10px);
    max-width: calc(50% - 10px);
  }

  /* more natural proportions on tab, not super tall */
  .ac-box::before {
    padding-top: 140%; /* shorter card for tablet */
  }

  /* buttons must always be visible on touch */
  .explore-btn {
    opacity: 1;
  }

  /* keep title from jumping too high on "hover" (no hover in touch anyway) */
  .ac-box:hover .sub-box-title {
    transform: translateY(0);
  }
}

/* ========================================================= */
/* MOBILE ≤767px                                             */
/* ========================================================= */
@media screen and (max-width: 767px) {
  .ac-section {
    padding: 40px 16px 30px;
    min-height: unset;
    background-image: linear-gradient(
        to bottom,
        rgba(30, 110, 71, 0.95) 0%,
        rgba(30, 110, 71, 0.8) 50%,
        rgba(30, 110, 71, 0) 100%
      ),
      url('https://toursite.link/pinnacle/wp-content/uploads/2025/05/underwater-landscape-1.png');
    background-position: center bottom;
    background-size: cover;
  }

  .ac-text {
    padding: 20px 10px 10px;
    max-width: 100%;
  }

  .ac-text h2 {
    font-size: 32px;
    line-height: 1.2;
  }

  .ac-text h3 {
    font-size: 22px;
    line-height: 1.3;
    margin-top: 12px;
    margin-bottom: 10px;
    font-weight: 300;
  }

  .ac-text p {
    font-size: 16px;
    line-height: 1.5;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
  }

  /* diver image smaller */
  .ac-img {
    transform: scale(0.9);
    max-width: 280px;
    width: 100%;
    margin-top: 24px;
  }

  .ac-section:hover .ac-img {
    transform: scale(0.9);
  }

  /* cards stack in single column */
  .ac-box-container {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: center;
    gap: 16px;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
  }

  .ac-box {
    flex: 0 1 100%;
    max-width: 100%;
    width: 100%;
  }

  /* make card aspect shorter so it fits phone height */
  .ac-box::before {
    padding-top: 130%;
  }

  .sub-box-title {
    font-size: 18px;
    line-height: 1.3;
    bottom: 50px;
  }

  .explore-btn {
    opacity: 1;
    font-size: 13px;
    padding: 8px 20px;
  }

  /* disable hover shifts for mobile */
  .ac-box:hover .sub-box-title {
    transform: translateY(0);
  }

  .ac-box:hover .explore-btn {
    opacity: 1;
  }
}
