.horizontal-content-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  background: #FFF;
}

.horizontal-content-container {
  max-width: 1912px;
  padding: 0 80px 64px;
  margin: 0 auto;
}

.tab-panel-wrapper {
  display: flex;
  max-height: 520px;
  overflow: hidden;
}

.horizontal-content-media-videowrapper {
  display: flex;
  width: 60%;
  position: relative;
  min-height: 520px;
}

.horizontal-content-media-videowrapper video {
  width: 100%;
  object-fit: cover;
}

.horizontal-content-media-image {
  flex: 1;
  max-width: 100%;
  min-width: 60%;
  min-height: 520px;
}

.horizontal-content-media-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.horizontal-content-container-card img {
  display: flex;
  width: 48px;
  height: 48px;
}

.horizontal-content-container-card {
 display: flex;
  padding: 32px;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  align-self: stretch;
  background: #F6F3F2;
  flex: 1;
  max-width: 100%;
  justify-content: space-between;
}

.horizontal-content-legal-link {
  color: #002c5f;
  font-family: "HyundaiSansText-Regular";
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 125%;
  text-decoration-line: underline;
}

.horizontal-content-card-actions {
  display: flex;
  justify-content: space-between;
  width: 100%;
}

.horizontal-content-card-text-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  flex: 1 0 0;
  align-self: stretch;
}

.horizontal-content-card-heading-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 351px;
  position: relative;
}

.horizontal-content-card-title {
  color: #000;
  font-family: "HyundaiSansHead-Medium";
  font-size: 24px;
  font-style: normal;
  font-weight: 500;
  line-height: 133.333%;

}

.horizontal-content-card-description {
  overflow: hidden;
  color: #000;
  text-overflow: ellipsis;
  font-family: "HyundaiSansText-Regular";
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 125%;
  max-height: 300px;
  transition: max-height 0.3s ease;

}


.horizontal-content-cta-button {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: "HyundaiSansText-Medium";
  font-style: normal;
  font-size: 16px;
  font-weight: 500;
  line-height: 125%;
  color: #002c5f;
  text-decoration: none;
}


/* Left direction → icon on left, rotated */
.horizontal-content-cta-button.cta-icon-left {
  flex-direction: row;
}

.horizontal-content-cta-button.cta-icon-left .icon-chevron-forward-light {
  transform: rotate(180deg);
}

.horizontal-content-cta-text-link {
  color: #002C5F;
  font-family: "HyundaiSansText-Medium";
  font-size: 16px;
  font-style: normal;
  font-weight: 500;
  line-height: 125%;
  text-decoration-line: underline;
  text-decoration-style: solid;
  text-decoration-skip-ink: auto;
  text-decoration-thickness: auto;
  text-underline-offset: auto;
  text-underline-position: from-font;
}

.large-media {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

.cta {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: #0070f3;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  margin-top: 0.5rem;
}

.cta:hover {
  background-color: #005bb5;
}

.horizontal-tabs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 24px;
  align-self: stretch;
  width: 100%;

  /* Explicit horizontal scrolling */
  overflow: auto hidden;
  
  /* CRITICAL: Remove `scroll-behavior: smooth` here! */
  -webkit-overflow-scrolling: touch;

  /* Hide scrollbars across browsers */
  scrollbar-width: none;
  -ms-overflow-style: none;
}

/* Prevent tab items from shrinking */
.horizontal-tabs > * {
  flex-shrink: 0;
}

/* Optional: Style the scrollbar for better visibility */
.horizontal-tabs::-webkit-scrollbar {
  display: none;
}

.horizontal-tabs li {
   margin: 0;
  display: flex;
  min-width: 192px;
  max-width: fit-content;
  padding: 16px 4px;
  justify-content: center;
  align-items: center;
  flex: 0 0 auto; /* Prevent shrinking */
}

.horizontal-tab {
  background: none;
  border: none;
  cursor: pointer;
  color: #5D5D5C;
  text-align: center;
  font-family: "HyundaiSansText-Regular";
  font-size: 18px;
  font-style: normal;
  font-weight: 400;
  line-height: 133.333%;
  flex: 1 0 0;
}

.horizontal-tabs li.active {
  border-bottom: 2px solid #002C5F;
}


.horizontal-tabs li.active .horizontal-tab {
  color: #002C5F;
  font-family: "HyundaiSansText-Medium";
  font-size: 18px;
  font-style: normal;
  font-weight: 500;
  white-space: nowrap;
}

.horizontal-tabs-nav {
  display: flex;
  width: 100%;
  border-bottom: 1px solid #DAD9D8;
}

.horizontal-content-media-vwrapper {
  display: flex;
  width: 60%;
  height: auto;
  aspect-ratio: 16 / 9;
}


.horizontal-content-media-vwrapper iframe {
  width: 100%;
}

.horizontal-tabs-align-left {
  justify-content: flex-start;
}

.horizontal-tabs.horizontal-tabs-align-center {
  justify-content: flex-start; /* Default to flex-start, JS will override if less the device width */
}

.horizontal-content-media-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  cursor: pointer;
  z-index: 10;
  font-size: 60px;
}

.horizontal-content-show-more-btn {
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  text-decoration: underline;
  margin-top: 4px;
  color: #002C5F;
  font-family: "HyundaiSansText-Medium";
  font-size: 16px;
  font-style: normal;
  font-weight: 500;
  line-height: 125%;
  text-decoration-line: underline;
  text-decoration-style: solid;
  text-decoration-skip-ink: auto;
  text-decoration-thickness: auto;
  text-underline-offset: auto;
  text-underline-position: from-font;
  text-align: right;
  justify-content: flex-end;
  align-items: center;
  display: none;
  box-shadow: 0 -5px 22px 5px #f6f3f2;
}



/* show more popup */

.horizontal-card-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgb(0 44 95 / 50%);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 15;
  padding: 40px 32px;
  flex-direction: column;
  gap: 16px;
}

.horizontal-card-modal {
  max-width: 800px;
  max-height: 768px;
  padding: 40px 32px;
  flex-direction: column;
  align-items: flex-start;
  display: flex;
  background: #fff;
  position: relative;
  text-align: left;
  overflow-y: auto;
}

.horizontal-card-modal-close {
  position: absolute;
  top: 32px;
  right: 36px;
  background: none;
  border: none;
  font-size: 32px;
  cursor: pointer;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.horizontal-card-modal-close .close {
  color:#002C5F;
  font-size: 24px;
}


.horizontal-tab-panel-container .horizontal-content-card-heading-wrapper a {
    color: #002C5F;
    font-family: "HyundaiSansText-Medium";
font-size: 16px;
font-style: normal;
font-weight: 500;
line-height: 20px;
text-decoration-line: underline;
text-decoration-style: solid;
text-decoration-skip-ink: auto;
text-decoration-thickness: auto;
text-underline-offset: auto;
text-underline-position: from-font;
}

/* Desktop: show only if button exists */
@container (min-width: 1200px) {
  .horizontal-content-show-more-btn {
    display: flex;
    cursor: pointer;
    justify-content: flex-end;
    text-decoration: underline;
  }
}

@container (max-width: 1199px) and (min-width: 768px) {
  .horizontal-content-container {
    padding: 0 40px 32px;
  }

  .tab-panel-wrapper {
    flex-direction: column;
    max-height: unset;
  }

  .horizontal-content-media-vwrapper {
    width: 100%;
  }

  .horizontal-content-media-videowrapper {
    width: 100%;
    min-height:unset;
  }

  .horizontal-content-media-image {
    min-height: unset;
  }

  .horizontal-content-container-card {
    padding: 24px;
  }

  .horizontal-content-card-description {
    font-size: 18px;
    line-height: 133.333%;
    max-height: unset;
  }

  .horizontal-card-modal {
    width: 80vw;
    padding: 32px;
  }


  .horizontal-content-show-more-btn {
    display: none;
  }

  .horizontal-content-card-heading-wrapper {
    max-height: unset;
  }

  .horizontal-tabs li {
    min-width: 146px;
  }

}

@container (max-width: 767px) {
  .horizontal-content-container {
    padding: 0 16px 24px;
  }

  .tab-panel-wrapper {
    flex-direction: column;
    max-height: unset;
  }

  .horizontal-content-media-vwrapper {
    width: 100%;
  }

  .horizontal-content-media-videowrapper {
    width: 100%;
    min-height: unset;
  }

  .horizontal-content-media-image {
    min-height: unset;
  }

  .horizontal-content-wrapper {
    gap: 16px
  }

  .horizontal-tabs li.active .horizontal-tab {
    font-size: 16px;
    font-style: normal;
    font-weight: 500;
    line-height: 125%;
  }

  .horizontal-tab {
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 125%;
    flex: none;
  }

  .horizontal-tabs li {
    padding: 16px 2px;
    flex: none;
    min-width: 44px;
    max-width: unset;
  }

  .horizontal-content-container-card {
    padding: 24px 16px;
    gap: 16px;
  }

  .horizontal-content-card-text-container {
    gap: 12px;
  }

  .horizontal-content-card-heading-wrapper {
    gap: 4px;
    max-height: unset;
  }

  .horizontal-content-card-description {
    line-height: 137.5%;
    max-height: unset;
  }

  .common-modal-overlay {
    display: flex;
    height: 100%;
    padding: 0;


  }

  .common-modal-content {
    max-width: unset;
    padding: 32px 16px;
    overflow-y: auto;
    position: absolute;
    bottom: 0;
    width: 100%;
    max-height: 812px;
    height: auto;
  }

  .horizontal-card-modal {
    padding: 32px 16px;
    max-width: 100%;
    overflow-y: auto;
    position: absolute;
    bottom: 0;
    width: 100%;
    max-height: 812px;
    height: auto;
  }

  .horizontal-card-modal-overlay {
    padding: 0;
  }

  .horizontal-tabs {
    overflow-y: auto;
  }

  .horizontal-content-show-more-btn {
    display: none;
  }
}