/* Regional hero layout. Shared art/orbit files own the Korean circle and its cars. */
body.home.te-region .header,
body.home.te-region .te-channel-banner-wrap,
.te-region-hero.main-banner {
  background: #f1d8d0;
}

.te-region-hero {
  --te-region-hero-min-height: 470px;
  --te-hero-bottom-gap: 8px;
  --te-region-brand-logo-height: 108px;
  --te-region-brand-slide-height: 145px;
  --te-region-brand-gap: 8px;
}

.te-region-hero .main-banner-row {
  position: relative;
  min-height: var(--te-region-hero-min-height);
}
.te-region-hero-visual {
  position: relative;
  z-index: 2;
  width: 70%;
  min-width: 0;
  min-height: var(--te-region-hero-min-height);
  padding-left: 20px;
  align-self: stretch;
  pointer-events: none;
}
.te-region-hero .main-banner-bottom { margin-top: var(--te-hero-bottom-gap); }
.te-region-hero .Project-hail2 { border-color: #fff4e6; border-radius: 50%; }

/* Desktop: both visuals are anchored to the regional column. */
.te-region-hero-crest {
  position: absolute;
  z-index: 2;
  top: 76px;
  right: clamp(-180px, calc(811.6px - 60vw), 32px);
  width: var(--te-crest-desktop, 23em);
  max-width: 57%;
  line-height: 1;
  transform: rotate(-15deg);
  filter: drop-shadow(-33px 22px 26px rgba(6, 13, 22, .215))
    drop-shadow(-17px 12px 14px rgba(6, 13, 22, .261))
    drop-shadow(-7px 5px 7px rgba(6, 13, 22, .326))
    drop-shadow(-2px 1px 3px rgba(6, 13, 22, .43));
  pointer-events: none;
}
.te-region-hero-crest__image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}
.te-region-hero-brands {
  position: absolute;
  z-index: 1;
  bottom: 0;
  left: 20px;
  right: 0;
  width: auto;
  margin: 0;
  padding: 15px 0;
  pointer-events: auto;
  /* Clip horizontal overflow, with room for logos to grow on hover. */
  overflow: visible;
  clip-path: inset(-55px 0);
}
.te-region-hero-brands .swiper-wrapper { align-items: center; transition-timing-function: linear; }
.te-region-hero-brands .te-region-hero-brand {
  display: flex;
  position: relative;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  width: var(--te-brand-width, 135px);
  height: var(--te-region-brand-slide-height);
  gap: var(--te-region-brand-gap);
  margin: 0;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  transform: none;
  transition: transform .3s ease;
}
.te-region-hero-brands .te-region-hero-brand__image {
  width: 100%;
  height: var(--te-region-brand-logo-height);
  object-fit: contain;
}
@media (hover: hover) and (pointer: fine) {
  .te-region-hero-brands .te-region-hero-brand:hover { transform: scale(1.5); z-index: 2; }
}

@media (min-width: 961px) and (max-width: 1240px) {
  .te-region-hero .main-banner-title { font-size: clamp(30px, 3vw, 36px); }
  .te-region-hero .main-banner-subtitle { font-size: 24px; }
}

/* Tablet: keep the copy and the regional visual in two columns. */
@media (min-width: 768px) and (max-width: 960px) {
  .te-region-hero { --te-region-hero-min-height: 510px; }
  .te-region-hero .main-banner-row { flex-direction: row; }
  .te-region-hero .main-banner-left { display: block; width: 42%; }
  .te-region-hero .main-banner-title,
  .te-region-hero .main-banner-subtitle { width: 100%; }
  .te-region-hero .main-banner-advantages { margin: 25px 0; }
  .te-region-hero-visual { width: 58%; padding-left: 0; }
  .te-region-hero-emblem.te-hero-emblem .loader,
  .te-region-hero-emblem .te-hero-orbit-stage {
    left: 49%; right: auto; top: 12px; width: 210px; height: 210px;
  }
  .te-region-hero-crest { top: 150px; right: 24px; max-width: 62%; }
  .te-region-hero-brands { left: 0; }
}

/* Mobile: a shared grid cell places the logo track behind the crest. */
@media (max-width: 767.98px) {
  body.home.te-region {
    --te-region-mobile-flag-size: clamp(144px, calc(100vw - 180px), 200px);
  }
  .te-region-hero {
    --te-region-hero-min-height: 0px;
    --te-hero-bottom-gap: 18px;
    --te-region-brand-logo-height: 80px;
    --te-region-brand-caption-height: 36px;
    --te-region-brand-slide-height: calc(var(--te-region-brand-logo-height) + var(--te-region-brand-gap) + var(--te-region-brand-caption-height));
    --te-region-brand-slide-width: 96px;
    --te-region-brand-bleed: 20px;
    /* ACF supplies the requested width; these bounds preserve the mobile composition. */
    --te-region-crest-mobile-max-width: min(52vw, 208px);
    --te-region-crest-mobile-max-height: clamp(188px, 56vw, 232px);
  }
  .te-region-hero-emblem.te-hero-emblem .loader {
    left: auto;
    right: -48px;
    top: -8px;
    width: var(--te-region-mobile-flag-size);
    height: var(--te-region-mobile-flag-size);
  }
  .te-region-hero .main-banner-row { flex-direction: column; }
  .te-region-hero .main-banner-left { display: contents; }
  .te-region-hero .main-banner-heading {
    position: relative;
    z-index: 3;
  }
  .te-region-hero .main-banner-title,
  .te-region-hero .main-banner-subtitle {
    /* 20px wrapper inset + 48px circle crop - 8px gap keeps text clear of the flag. */
    width: calc(100% - var(--te-region-mobile-flag-size) + 60px);
    overflow-wrap: break-word;
  }
  .te-region-hero .main-banner-subtitle { margin-bottom: 0; }
  .te-region-hero .main-banner-advantages {
    order: 2;
    width: 100%;
    margin: 20px 0 0;
    padding-right: 0;
  }
  .te-region-hero-visual {
    order: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    align-items: start;
    width: 100%;
    padding: 24px 0 12px;
  }
  .te-region-hero-crest {
    grid-area: 1 / 1;
    align-self: center;
    position: relative;
    inset: auto;
    width: min(var(--te-crest-mobile, 13em), var(--te-region-crest-mobile-max-width));
    max-width: 100%;
    transform: rotate(-12deg);
    filter: drop-shadow(0 14px 16px rgba(48, 25, 25, .19))
      drop-shadow(0 3px 4px rgba(48, 25, 25, .16));
  }
  .te-region-hero-crest__image { max-height: var(--te-region-crest-mobile-max-height); }
  .te-region-hero-brands {
    grid-area: 1 / 1;
    align-self: center;
    justify-self: center;
    position: relative;
    inset: auto;
    width: calc(100% + 2 * var(--te-region-brand-bleed));
    height: var(--te-region-brand-slide-height);
    min-height: var(--te-region-brand-slide-height);
    max-width: none;
    /* Caption + gap offset centers the logo itself on the crest. */
    margin-top: calc(var(--te-region-brand-caption-height) + var(--te-region-brand-gap));
    padding: 0;
    clip-path: inset(-24px 0 -12px);
  }
  .te-region-hero-brands:only-child { margin-top: 0; }
  .te-region-hero-brands .swiper-wrapper {
    height: 100%;
    align-items: stretch;
  }
  .te-region-hero-brands .te-region-hero-brand {
    display: grid;
    grid-template-rows: var(--te-region-brand-logo-height) var(--te-region-brand-caption-height);
    justify-items: center;
    width: var(--te-region-brand-slide-width);
    height: 100%;
    min-height: var(--te-region-brand-slide-height);
    padding: 0;
    font-size: 14px;
    line-height: 18px;
  }
  .te-region-hero-brands .te-region-hero-brand__caption {
    align-self: start;
    width: 100%;
    margin: 0;
    line-height: 18px;
  }
  .te-region-hero .main-banner-bottom { margin: var(--te-hero-bottom-gap) 0 28px; }
}
