/* Homepage adaptations. Loaded after home.css and the shared footer styles. */
/* Center the complete banner on white, with breathing room on every screen. */
body.home .hero-slider {
  background-color: #FFFFFF;
}

body.home .hero-slider .slide-item {
  inset-inline: clamp(12px, 3vw, 48px);
}

body.home .hero-slider .slide-bg {
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  object-fit: contain;
  object-position: center;
}

body.home .partner_slider_wrapper.no-slider .partner_nav_btn,
body.home .partner_slider_wrapper.no-slider + .partner_slider_dots {
  display: none !important;
}

/* Tablets, including landscape iPad Pro, keep the banner's original proportions. */
@media (min-width: 601px) and (max-width: 1366px) {
  html body.home .hero-slider {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: 2048 / 1013 !important;
  }

  html body.home .thaco_video_stage:not(:fullscreen) {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: var(--hc-video-aspect-ratio, 16 / 9);
  }

  html body.home .thaco_video_screen video.thaco_video_slide {
    inset: 0;
    width: 100%;
    height: 100%;
    transform: none;
    object-fit: contain;
  }
}

@media (max-width: 992px) {
  html body.home .grid-container {
    padding-inline: clamp(16px, 3vw, 28px) !important;
  }

  body.home #content .col,
  body.home #content .col-inner {
    min-width: 0 !important;
  }

  body.home .hero-slider {
    height: clamp(220px, 48vw, 440px) !important;
    min-height: 0 !important;
    max-height: none !important;
  }

  html body.home .home_sec_1 {
    padding: 40px 0 !important;
  }

  html body.home .home_sec_1 .top.grid-container {
    gap: 24px !important;
  }

  html body.home .home_sec_1 .intro_img,
  html body.home .home_sec_1 .intro {
    width: 100% !important;
    min-width: 0 !important;
    flex-basis: auto !important;
  }

  html body.home .home_sec_1 .intro .hc_about_title {
    font-size: clamp(16px, 4.8vw, 28px) !important;
    line-height: 1.4 !important;
  }

  html body.home .home_sec_1 .intro .hc_about_title_line {
    white-space: nowrap !important;
    overflow-wrap: normal !important;
    word-break: keep-all !important;
    width: fit-content !important;
    transform: none !important;
  }

  html body.home .home_sec_1 .intro .content {
    text-align: justify !important;
    font-size: 16px !important;
    margin-bottom: 24px !important;
  }

  html body.home .home_sec_1 .intro .list_item {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px !important;
    margin-bottom: 24px !important;
  }

  body.home .home_sec_1 .intro .list_item .num {
    font-size: clamp(28px, 5vw, 42px);
    overflow-wrap: anywhere;
  }

  html body.home .home_sec_1 .intro .list_item .item,
  html body.home .home_sec_1 .intro .list_item .item:last-child {
    align-items: center !important;
    text-align: center !important;
  }

  html body.home .home_sec_1 .intro .list_item .num {
    margin-bottom: 20px;
  }

  html body.home .home_sec_1 .intro .list_item .item p:not(.num) {
    width: 100%;
    padding: 0;
    margin: 0;
    font-size: clamp(11px, 2.8vw, 14px);
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
    text-wrap: balance;
    color: #4B5563;
    opacity: 1;
  }

  html body.home .home_sec_1 .intro .list_item .item p:not(.num)::before {
    width: 24px;
    height: 2px;
    left: 50%;
    top: -10px;
    transform: translateX(-50%);
    border-radius: 2px;
  }

  body.home .home_video {
    padding: 36px 0 0;
  }

  body.home .video_section_header .custom_title {
    font-size: clamp(22px, 4vw, 30px) !important;
    line-height: 1.4;
  }

  body.home .thaco_video_stage:not(:fullscreen) {
    height: auto !important;
    aspect-ratio: 16 / 9;
    min-height: 0 !important;
  }

  body.home .thaco_video_screen video.thaco_video_slide {
    inset: 0;
    width: 100%;
    height: 100%;
    transform: none;
  }

  body.home .thaco_video_controls_row {
    gap: 4px;
  }

  body.home .thaco_video_controls_row .controls_left,
  body.home .thaco_video_controls_row .controls_right {
    gap: 2px;
  }

  body.home .ctrl_btn,
  body.home .partner_nav_btn,
  body.home .slider-btn {
    min-width: 44px !important;
    min-height: 44px !important;
  }

  body.home .button_style,
  body.home .hc_act_btn_quote,
  body.home .filter_tax button {
    min-height: 44px !important;
  }

  body.home .slider-dots {
    height: auto !important;
    width: max-content;
    max-width: 100%;
    padding: 0 6px !important;
    gap: 2px !important;
    flex-wrap: wrap;
    justify-content: center;
  }

  body.home .partner_dot,
  body.home .partner_dot.active {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex: 0 0 44px;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    max-width: 44px !important;
    max-height: 44px !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  body.home .slider-dots .dot,
  body.home .slider-dots .dot.active {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex: 0 0 24px;
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
    max-width: 24px !important;
    max-height: 24px !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  body.home .hero-slider .slider-dots .dot::before {
    width: 6px;
    height: 6px;
  }

  body.home .hero-slider .slider-dots .dot.active::before {
    width: 8px;
    height: 8px;
  }

  body.home .slider-dots .dot::before,
  body.home .partner_dot::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #A5BDAE;
  }

  body.home .slider-dots .dot.active::before,
  body.home .partner_dot.active::before {
    width: 10px;
    height: 10px;
    background: #F0B429;
  }

  body.home .partner_slider_dots {
    gap: 4px !important;
  }

  body.home .partner_slider_dots .partner_dot,
  body.home .partner_slider_dots .partner_dot.active {
    flex: 0 0 24px;
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
    max-width: 24px !important;
    max-height: 24px !important;
  }

  body.home .partner_slider_dots .partner_dot::before {
    width: 6px;
    height: 6px;
  }

  body.home .partner_slider_dots .partner_dot.active::before {
    width: 8px;
    height: 8px;
  }

  body.home .home_sec_2 .top {
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 24px;
  }

  body.home .home_sec_2 .title_group {
    flex-wrap: wrap;
    min-width: 0;
  }

  body.home .news_grid_container {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.home .partner_slider_viewport,
  body.home .partner_thaco_title_col,
  body.home .partner_thaco_desc_col {
    min-width: 0;
  }

  body.home .partner_card img {
    max-width: 100%;
    object-fit: contain;
  }

  body.home .partner_row,
  body.home .partner_row.cols-4,
  body.home .partner_row.cols-5 {
    grid-template-columns: none !important;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    gap: 8px;
  }

  body.home .hc_footer_main,
  body.home .hc_footer_left,
  body.home .hc_footer_right,
  body.home .hc_branch_card {
    min-width: 0 !important;
  }

  body.home .hc_footer_main a {
    overflow-wrap: anywhere;
  }

  body.home #corporateContact {
    scroll-margin-top: 110px;
  }
}

@media (max-width: 600px) {
  body.home .floating-contact-bar {
    width: 44px;
  }

  body.home .floating-contact-bar .contact-item,
  body.home .floating-contact-bar .contact-icon {
    width: 44px !important;
    height: 44px !important;
    flex-shrink: 0;
  }

  body.home .news_grid_container {
    grid-template-columns: minmax(0, 1fr);
  }

  body.home .home_sec_2 .title_group .heading_h2 {
    font-size: 26px;
    white-space: normal;
  }

  body.home .thaco_contact_banner .contact_title .title_gold {
    font-size: 22px;
    letter-spacing: 1px;
  }

  body.home .thaco_contact_banner .contact_title .title_white {
    font-size: 36px;
  }

  body.home .thaco_contact_banner .contact_btn_group {
    flex-direction: column;
    align-items: stretch;
  }

  body.home .btn_skip_back,
  body.home .btn_skip_forward {
    display: none;
  }

  body.home .thaco_video_time_display {
    font-size: 11px;
    white-space: nowrap;
    margin-inline: 2px;
  }

  body.home .partner_thaco_header {
    flex-direction: column;
    gap: 20px;
  }

  body.home .partner_slider_wrapper {
    display: flex;
    align-items: center;
    gap: 4px;
  }

  body.home .partner_slider_viewport {
    flex: 1 1 0;
    width: auto;
    padding-inline: 0;
  }

  body.home .partner_nav_btn {
    width: 44px;
    height: 44px;
    margin: 0;
  }

  body.home .partner_row,
  body.home .partner_row.cols-4,
  body.home .partner_row.cols-5 {
    gap: 4px;
  }

  body.home .partner_slider_dots {
    min-height: 44px;
    margin: 12px auto 0;
  }

  body.home .partner_card {
    min-width: 0;
    height: 64px !important;
    min-height: 64px !important;
    padding: 4px !important;
  }

  body.home .partner_card img {
    max-height: 40px;
  }
}

@media (max-width: 360px) {
  body.home .hc_branch_actions {
    flex-direction: column !important;
  }
}

/* Preserve the desktop photo showcase while fitting navigation and full copy to touch screens. */
@media (max-width: 1100px) {
  body.home .hc_act_tabs_container {
    flex-direction: column;
    height: auto;
    min-height: 0;
  }

  body.home .hc_act_sidebar {
    width: 100%;
    min-width: 0;
    max-width: none;
    border-right: 0;
    border-bottom: 1px solid rgb(240 180 41 / 25%);
  }

  body.home .hc_act_sidebar_header {
    padding: 20px 16px 14px;
  }

  body.home .hc_act_sidebar_title {
    font-size: clamp(20px, 3vw, 26px);
  }

  body.home .hc_act_nav_list {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 8px;
    padding: 12px 16px 16px;
    scroll-padding-inline: 16px;
    scroll-snap-type: x proximity;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
    scrollbar-color: #F0B429 transparent;
  }

  body.home .hc_act_tab_btn,
  body.home .hc_act_tab_btn:hover,
  body.home .hc_act_tab_btn.is-active {
    align-items: center;
    flex: 0 0 clamp(220px, 68vw, 300px);
    gap: 8px;
    width: auto;
    max-width: none;
    min-width: 0;
    height: auto;
    min-height: 72px;
    margin: 0;
    padding: 12px 14px;
    white-space: normal;
    border: 1px solid rgb(255 255 255 / 18%);
    border-radius: 8px;
    background: rgb(255 255 255 / 6%);
    scroll-snap-align: start;
  }

  body.home .hc_act_tab_btn.is-active {
    background: #F0B429;
    border-color: #F0B429;
  }

  body.home .hc_act_tab_btn:focus-visible {
    outline: 2px solid #FFFFFF;
    outline-offset: 3px;
  }

  body.home .hc_act_tab_bar {
    display: none;
  }

  body.home .hc_act_tab_num,
  body.home .hc_act_tab_text {
    font-size: 12px;
    line-height: 1.5;
    letter-spacing: 0;
  }

  body.home .hc_act_tab_num {
    margin: 0;
    align-self: flex-start;
    color: #F0B429;
  }

  body.home .hc_act_tab_text {
    min-width: 0;
    text-align: left;
    white-space: normal;
    overflow-wrap: normal;
    color: #FFFFFF;
  }

  body.home .hc_act_tab_btn.is-active .hc_act_tab_num,
  body.home .hc_act_tab_btn.is-active .hc_act_tab_text {
    color: #032D17;
    opacity: 1;
  }

  body.home .hc_act_stage {
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
    height: auto;
    min-height: 0;
  }

  body.home .hc_act_panel {
    display: none;
    position: relative;
    inset: auto;
    height: auto;
    min-height: 600px;
    padding-top: clamp(160px, 45vw, 220px);
    box-sizing: border-box;
  }

  body.home .hc_act_panel.is-active {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
  }

  body.home .hc_act_panel_media {
    position: absolute;
    inset: 0;
    height: 100%;
    aspect-ratio: auto;
  }

  body.home .hc_act_panel_media img {
    filter: none;
    transform: none;
    object-position: center top;
  }

  body.home .hc_act_panel_gradient {
    display: block;
    background: linear-gradient(180deg, rgb(3 25 15 / 4%) 0%, rgb(3 25 15 / 16%) 22%, rgb(3 25 15 / 80%) 48%, rgb(3 25 15 / 96%) 100%);
  }

  body.home .hc_act_info_box {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    max-width: none;
    padding: 24px 20px 28px;
    transform: none;
    background: transparent;
  }

  body.home .hc_act_heading {
    margin-bottom: 12px;
  }

  body.home .hc_act_heading a {
    font-size: clamp(20px, 3vw, 26px);
    line-height: 1.4;
    text-shadow: 0 2px 8px rgb(0 0 0 / 45%);
  }

  body.home .hc_act_desc {
    display: block;
    overflow: visible;
    -webkit-line-clamp: unset;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.7;
    text-shadow: none;
    margin-bottom: 16px;
  }

  body.home .hc_act_list {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
  }

  body.home .hc_act_list li {
    margin: 0;
    padding-left: 18px;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.7;
    text-shadow: none;
  }

  body.home .hc_act_btn_quote {
    min-height: 48px;
    height: auto;
    max-width: 100%;
    padding: 12px 18px;
    font-size: 13px;
    line-height: 1.5;
    white-space: normal;
  }
}

@media (min-width: 640px) and (max-width: 1100px) {
  body.home .hc_act_tabs_container {
    flex-direction: row;
    align-items: stretch;
  }

  body.home .hc_act_sidebar {
    flex: 0 0 clamp(220px, 29vw, 290px);
    width: auto;
    border-bottom: 0;
    border-right: 1px solid rgb(240 180 41 / 25%);
  }

  body.home .hc_act_sidebar_title {
    font-size: 20px;
  }

  body.home .hc_act_nav_list {
    flex-direction: column;
    overflow: visible;
    gap: 0;
    padding: 0;
  }

  body.home .hc_act_tab_btn,
  body.home .hc_act_tab_btn:hover,
  body.home .hc_act_tab_btn.is-active {
    flex: 1 1 auto;
    width: 100%;
    min-height: 64px;
    padding: 14px 16px;
    border-radius: 0;
    border: 0;
    border-bottom: 1px solid rgb(255 255 255 / 10%);
    background: transparent;
  }

  body.home .hc_act_tab_btn.is-active {
    background: linear-gradient(90deg, rgb(240 180 41 / 24%), rgb(240 180 41 / 4%));
    box-shadow: inset 3px 0 #F0B429;
  }

  body.home .hc_act_tab_btn.is-active .hc_act_tab_text {
    color: #FFFFFF;
  }

  body.home .hc_act_tab_btn.is-active .hc_act_tab_num {
    color: #F0B429;
  }

  body.home .hc_act_stage {
    flex: 1 1 0;
    width: auto;
    display: flex;
  }

  body.home .hc_act_panel.is-active {
    flex: 1 1 auto;
    min-height: 640px;
  }

  body.home .hc_act_sidebar_header,
  body.home .hc_act_info_box {
    padding-inline: 24px;
  }

  body.home .hc_act_tab_num,
  body.home .hc_act_tab_text {
    font-size: 12px;
  }
}
