#one {
  background: url("images/overlay.png"), url("../../images/one.jpg");
  background-size: cover;
  background-attachment: fixed, fixed;
  background-position: top left, center center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

#heading {
  position: relative;
  z-index: 10;
  margin-top: 20px;
  margin-bottom: 20px;
  text-align: center;
  width: 100%;
  font-size: 3em;
  color: white;
}
#card-container {
  position: relative;
  width: 100%;
  height: 100%;
  margin-left: 150px;
  padding-left: 100px;
  padding-top: 60px;
  align-content: center;
  display: flex;
  flex-direction: column;
  perspective: 1000px;
}

.content.box.style2 {
  position: absolute;
  width: 700px;
  height: 200px;
  padding: 0;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  border-radius: 10px;
  box-shadow: 0 25px 25px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform-origin: center center;
  opacity: 1;
  z-index: 1;

}


.content.box.style2:hover {
  scale: 1.05;
  transition: scale 0.3s ease-in-out;
}

.content.box.style2 header {
  padding: 20px 25px;
  background: rgba(0, 2, 31, 0.9);
  color: white;
  opacity: 1;
}

.content.box.style2 header h3 {
  margin: 0;
  font-size: 1.3em;
  font-weight: 500;
  color: white;
}

.card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 25px 25px 25px;
  background: rgba(0, 0, 0, 0.7);
}
.card-image {
  width: 80px;
  height: 80px;
  object-fit: contain;
}

.card-text {
  font-size: 0.85em;
  color: #ffffff;
  overflow: hidden;
}
@media (min-width: 769px) {
  .content.box.style2 {
    width: clamp(400px, 50vw, 700px);
    height: clamp(130px, 28vh, 230px);
  }
  .content.box.style2 header {
        /* Use clamp() for header padding so it shrinks as height decreases */
        padding: clamp(15px, 2vh, 25px) clamp(20px, 2vw, 30px);
  }
  .content.box.style2 header h3 {
          /* Use clamp() for the font so it shrinks if height decreases */
    font-size: clamp(1em, 2vh, 1.3em);
  }
}


/* Max-height adjustments for desktop (only active when width >= 769px) */
@media (max-height: 565px) and (min-width: 769px) {
  #heading {
    font-size: 2em;
    margin-top: 10px;
  }
  .content.box.style2
  {
    height: 130px !important;
  }
  .content.box.style2 header {
    padding: 10px 20px;
  }
  .card-content {
    padding: 0 10px 10px 10px;
  }
}

@media (max-height: 768px) and (min-width: 769px) {
  #card-container {
    padding-top: 20px;
  }
  .card-text p {
    margin-bottom: 0px !important;
  }
  .content.box.style2
  {
    height: 160px;
  }
}

@media (max-width: 768px) {
  #one {
    width: 100%;
    height: 80vh;
    padding: 20px;
  }
  #heading {
    font-size: 3em;
    margin-top: 30px;
  }
  #card-container {
    height: 0vh;
  }
  .content.box.style2 {
    position: absolute;
    width: 90%;
    max-width: 400px;
    height: 250px;
    left: 0%;
    transform: translateX(-50%);
  }
  .content.box.style2 header h3 {
    font-size: 1.1em;
  }
  .card-text p {
    font-size: 1em;
  }
}

@media (max-width: 480px) {
  #heading {
    font-size: 3em;
    margin-top: 30px;
  }
  #one {
    padding: 20px;
  }
  .content.box.style2 {
    width: 90%;
    min-height: 130px;
  }
}