/* Custom adjustments for the hero section */
.top_section {
  padding-top: 0 !important;
}

.top_container {
  position: relative;
  height: 100%;
}

.container {
  height: 100%;
}

.top_description {
  padding-top: 0;
  margin-top: -20px;
}

.title_category {
  margin-bottom: 0.5rem;
}

/* Fix for the top element image size */
.top_elem {
  width: 60% !important;
  /* Reduce from 68.819% */
}

/* Fix for the top_img size and movement */
.top_img {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  /* Align to bottom */
}

.top_img_inner {
  margin-left: 0 !important;
  /* Override the negative margin */
  text-align: right;
  max-width: 90%;
  align-self: flex-end;
  /* Align to bottom */
  margin-bottom: 0;
  /* Ensure no bottom margin */
}

.top_img img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  /* Remove any default spacing */
  vertical-align: bottom;
  /* Align to bottom */
}

/* Fix for the typing animation causing layout shifts */
.hero-title {
  min-height: 3rem;
  /* Ensure consistent height during typing */
  position: relative;
  z-index: 3;
  margin-bottom: 1rem;
  /* Add some space below the title */
  text-align: left !important;
}

.word-wrapper {
  min-height: 2.5rem;
  /* Ensure consistent height for the words */
  display: inline-block;
  width: auto;
}

/* Create a side-by-side layout */
.top_wrap {
  display: flex;
  flex-direction: row;
  min-height: 500px;
  /* Increased height to give more room */
  align-items: stretch;
  /* Changed from center to stretch to make items fill the height */
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  /* Prevent any overflow */
}

/* Style for the left side content */
.top_info {
  width: 50%;
  padding-right: 20px;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Style for the right side image */
.top_img {
  width: 50% !important;
  margin-top: 0 !important;
  padding-left: 20px;
}

/* Create a fixed container for the dynamic text to prevent layout shifts */
.dynamic-text {
  min-width: 200px;
  display: inline-block;
  position: relative;
}

/* Style for the call-to-action button */
.top_buttons {
  text-align: left;
  margin-top: 20px;
}

.top_buttons .btn {
  display: inline-block;
  margin-right: 15px;
}

/* Responsive styles for the side-by-side layout */
@media (max-width: 1199px) {
  .top_elem {
    width: 55% !important;
  }
  
  .top_wrap {
    min-height: 450px;
  }
}

@media (max-width: 991px) {
  .top_wrap {
    flex-direction: column;
    min-height: auto;
  }

  .top_info,
  .top_img {
    width: 100% !important;
    padding: 0;
  }

  .top_info {
    margin-bottom: 30px;
  }

  .top_img {
    justify-content: center;
    align-items: center;
  }

  .top_img_inner {
    text-align: center;
    margin-bottom: 0;
    max-width: 100%;
  }

  .hero-title {
    text-align: center !important;
    min-height: 3.5rem;
  }
  
  .top_buttons {
    text-align: center;
    margin-top: 30px;
  }
}

@media (max-width: 767px) {
  .top_section {
    padding: 40px 0;
  }
  
  .top_elem {
    width: 40% !important;
    opacity: 0.5;
  }
  
  .hero-title {
    font-size: 28px;
    min-height: 2.5rem;
  }
  
  .word-wrapper {
    min-height: 2rem;
  }
  
  .top_text {
    font-size: 15px;
    max-width: 100%;
  }
  
  .top_buttons .btn {
    margin-right: 10px;
  }
}

@media (max-width: 575px) {
  .top_section {
    padding: 32px 0;
  }
  
  .top_elem {
    display: none;
  }
  
  .hero-title {
    font-size: 24px;
    min-height: 2.2rem;
  }
  
  .word-wrapper {
    min-height: 1.8rem;
    min-width: 150px;
  }
  
  .top_buttons .btn {
    display: block;
    margin: 0 auto 15px;
  }
  
  .top_rating {
    display: block;
    margin: 0 auto;
  }
}