/* ===================================================
   Layout: Two service block
   File:   template-parts/flexible/two_service_block/two_service_block.css
=================================================== */

.Create_th_Teams_section {
  padding: 5rem 0;
  background-color: #ffffff;
}

.Create_th_Teams_header {
  margin-bottom: 3.5rem;
  align-items: flex-start;
}

.Create_th_Teams_title_wrap {
  display: flex;
  align-items: center;
  gap: 5px;
}

.Create_th_Teams_icon_left {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.Create_th_Teams_icon_right {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.Create_th_Teams_title {
  color: rgba(40, 40, 40, 1);
  margin: 0;
  font-family: Bricolage Grotesque;
  font-weight: 600;
  font-size: clamp(1rem, 0.8333rem + 0.7407vw, 1.5rem);
  line-height: 120%;
  letter-spacing: 0%;
  text-transform: capitalize;
}

/* Flex Layout for Expanding Cards */
.Create_th_Teams_flex_wrapper {
  display: flex;
  gap: 24px;
  width: 100%;
}

/* Card Styling */
.Create_th_Teams_card {
  position: relative;
  flex: 1; /* Both start at equal width */
  min-width: 0; /* Prevents overflow issues during flex transition */
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 480px;
  text-decoration: none;
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  /* Smooth flex transition for the expand effect */
  transition: flex 0.7s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* FIX: Image set to absolute to ensure it always fills the parent container's height and width */
.Create_th_Teams_img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* FIX: Overlay set to relative so it dictates the flow and ensures content doesn't overflow */
.Create_th_Teams_overlay {
  position: relative;
  z-index: 2;
  flex: 1;
  width: 100%;

  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.7) 100%
  );

  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2.5rem;
  transition: background 0.5s ease;
}

.Create_th_Teams_card_title {
  color: rgba(254, 254, 253, 1);
  margin: 0;
  white-space: nowrap;
  transition: transform 0.4s ease;
  font-family: Bricolage Grotesque;
  font-weight: 600;
  font-size: clamp(1.5rem, 1.3333rem + 0.7407vw, 2rem);
  line-height: 120%;
  letter-spacing: 0%;
  text-transform: capitalize;
}

/* Expandable Details Container */
.Create_th_Teams_details {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(20px);
  transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.Create_th_Teams_details_inner {
  padding-top: 1rem;
  padding-bottom: 0.5rem;
  width: 100%;
  max-width: 100%;
}

.Create_th_Teams_card_desc {
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 1.5rem 0;
  font-family: DM Sans;
  font-weight: 400;
  font-size: clamp(0.875rem, 0.8333rem + 0.1852vw, 1rem);
  line-height: 140%;
  letter-spacing: 0%;
}

.Create_th_Teams_btn {
  background-color: rgba(234, 95, 55, 1);
  color: #ffffff;
  border: none;
  border-radius: 30px;
  padding: 0.875rem 2rem;
  display: inline-block;
  text-decoration: none;
  transition: background-color 0.3s ease;
  font-family: Bricolage Grotesque;
  font-weight: 500;
  font-size: 16px;
  line-height: 120%;
  letter-spacing: 0%;
}

.Create_th_Teams_btn:hover {
  background-color: #d55336;
  color: #ffffff;
}

/* Hover States (Desktop Only) */
@media (hover: hover) and (min-width: 992px) {
  /* The hovered card expands */
  .Create_th_Teams_card:hover {
    flex: 1.8;
  }

  .Create_th_Teams_card:hover .Create_th_Teams_img {
    transform: scale(1.06);
  }

  .Create_th_Teams_card:hover .Create_th_Teams_overlay {
    background: linear-gradient(
      to top,
      rgba(0, 0, 0, 0.95) 0%,
      rgba(0, 0, 0, 0.6) 60%,
      transparent 100%
    );
  }

  /* Slide up and reveal text */
  .Create_th_Teams_card:hover .Create_th_Teams_details {
    max-height: 300px;
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Adjustments */
@media (max-width: 991px) {
  .Create_th_Teams_header {
    margin-bottom: 2.5rem;
  }
  .Create_th_Teams_header_desc {
    margin-top: 1rem;
  }
  .Hh_honehi_cta_content .primary-btn {
    width: 300px !important;
  }
  .Create_th_Teams_flex_wrapper {
    flex-direction: column; /* Stack on mobile/tablet */
  }
  .Create_th_Teams_card {
    flex: none;
    width: 100%;
    height: auto;
    min-height: 440px;
  }
  /* Always show text on tablet/mobile */
  .Create_th_Teams_overlay {
    padding: 2.5rem;
  }
  .Create_th_Teams_details {
    max-height: 500px;
    opacity: 1;
    transform: translateY(0);
  }
  .Create_th_Teams_card_title {
    white-space: normal; /* Allow wrap on mobile */
  }
  .Create_th_Teams_details_inner {
    width: 100%;
  }
}

@media (max-width: 767px) {
  .Create_th_Teams_section {
    padding: 3rem 0;
  }

  .Create_th_Teams_icon_right {
    width: 10px;
    height: 10px;
    flex-shrink: 0;
  }

  .Create_th_Teams_icon_left {
    width: 18px;
    height: 18px;
  }

  .Create_th_Teams_card {
    margin-bottom: 0;
    min-height: 300px;
  }
  .Create_th_Teams_overlay {
    padding: 1rem 1.5rem;
  }
  .Create_th_Teams_btn {
    text-align: center;
    padding: 0.475rem 1rem;
  }
}
