/* Shared public-site responsive refinements. */
html, body { overflow-x: hidden; }


/* Keep readable text away from the viewport edge at every width. The source
   theme only adds a small fixed inset at its medium breakpoint, so headings,
   breadcrumbs, forms, and section copy can otherwise jump to the edge when a
   viewport crosses a breakpoint. Full-bleed hero containers stay exempt. */
:root { --website-text-gutter: clamp(16px, 4vw, 96px); }
body.website-responsive-pc main > .u-fullpart:not(.nopd) > .container:not(.full),
body.website-responsive-pc footer > .a > .container,
body.website-responsive-pc footer > .b > .container,
body.website-responsive-pc footer > .c > .container {
  box-sizing: border-box !important;
  padding-left: var(--website-text-gutter) !important;
  padding-right: var(--website-text-gutter) !important;
}

/* Contact content has a fixed desktop width in the source theme. Make it
   fluid before the tablet/mobile breakpoints so its text keeps the same safe
   inset without creating an off-screen column. */
body.website-responsive-pc main .u-contact1 {
  box-sizing: border-box !important;
  max-width: 100% !important;
  width: 100% !important;
}



.contact-captcha {
  align-items: stretch;
  display: flex;
  gap: 12px;
  width: 100%;
}

.contact-captcha .captcha-input {
  flex: 1 1 auto;
  min-width: 0;
}

.contact-captcha .captcha-image {
  flex: 0 0 138px;
  min-width: 0;
}

.contact-captcha .form-control {
  box-sizing: border-box;
  height: 48px;
  padding: 0 16px;
  width: 100%;
}



/* Keep every visible label and interactive text away from its box edge. The
   source theme relies on line-height and parent spacing alone, which leaves
   compact navigation, dropdown options, footer links, and form controls
   touching their backgrounds at some widths. */
header .menu > ul > li > .i > .p > a,
header .subm .i > h5 a,
header .subm .i > .ct > .p > a,
header .subm .i > .ct > .p > .ex a,
header .lang > .ct p a,
footer .menu a,
.u-pagepath p a,
.u-btn1,
.u-btn2,
.u-loginview .btn1,
.u-loginview .btn2,
.btn2 {
  box-sizing: border-box;
  padding-left: clamp(8px, 1vw, 18px) !important;
  padding-right: clamp(8px, 1vw, 18px) !important;
}

header .misc .call > a,
header .misc .lang > p > a {
  box-sizing: border-box;
  padding-left: 4px !important;
  padding-right: 4px !important;
}

header .misc .srch .bt,
header .tool .i {
  box-sizing: content-box;
  padding: 4px;
}

/* Dropdown text must stay inside the viewport when the header is compressed.
   The source menu is offset to the left for desktop spacing, which pushes
   its right edge beyond the scrollbar at tablet widths. */
header .lang > .ct {
  left: auto !important;
  max-width: calc(100vw - (2 * var(--website-text-gutter))) !important;
  right: 0 !important;
}

header .lang > .ct p a {
  white-space: nowrap;
}

main input.form-control,
main input.tt,
main textarea.tt,
main select,
main button,
main input[type="submit"],
main input[type="button"] {
  box-sizing: border-box;
  padding-left: 16px;
  padding-right: 16px;
}



/* Requested internal-page hero fix: full bleed plus a readable text inset. */
body.website-responsive-pc main > .u-fullpart.nopd {
  margin-left: calc(50% - 50vw) !important;
  margin-right: 0 !important;
  max-width: none !important;
  overflow: hidden !important;
  width: 100vw !important;
}

body.website-responsive-pc main > .u-fullpart.nopd > .container.full,
body.website-responsive-pc main > .u-fullpart.nopd .u-hobanner.in,
body.website-responsive-pc main > .u-fullpart.nopd .u-hobanner.in .cont,
body.website-responsive-pc main > .u-fullpart.nopd .u-hobanner.in .cont .i,
body.website-responsive-pc main > .u-fullpart.nopd .u-hobanner.in .cont .i > .bg {
  margin-left: 0 !important;
  margin-right: 0 !important;
  max-width: none !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  width: 100% !important;
}

body.website-responsive-pc main > .u-fullpart.nopd .u-hobanner.in .cont .i > .bg {
  background-position: center center !important;
  background-repeat: no-repeat !important;
  background-size: cover !important;
}

body.website-responsive-pc main > .u-fullpart.nopd .u-hobanner.in .ct > .container {
  box-sizing: border-box !important;
  margin-left: auto !important;
  margin-right: auto !important;
  max-width: 1600px !important;
  padding-left: clamp(48px, 4vw, 96px) !important;
  padding-right: clamp(48px, 4vw, 96px) !important;
  width: 100% !important;
}

/* The homepage hero uses the non-in banner variant. Keep its copy inset
   too; the full-bleed wrapper can sit a few pixels left of the layout viewport
   when a scrollbar is present at tablet widths. */
body.website-responsive-pc main > .u-fullpart.nopd .u-hobanner:not(.in) .cont .i > .ct > .container {
  box-sizing: border-box !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  max-width: none !important;
  padding-left: clamp(48px, 4vw, 96px) !important;
  padding-right: clamp(48px, 4vw, 96px) !important;
  width: 100% !important;
}

@media (max-width: 768px) {
  body.website-responsive-pc main > .u-fullpart.nopd { margin-left: 0 !important; width: 100% !important; }
  body.website-responsive-pc main > .u-fullpart.nopd .u-hobanner.in .ct > .container {
    padding-left: 24px !important;
    padding-right: 24px !important;
  }
  body.website-responsive-pc main > .u-fullpart.nopd .u-hobanner:not(.in) .cont .i > .ct > .container {
    padding-left: 24px !important;
    padding-right: 24px !important;
  }

  .contact-captcha { gap: 10px; }
  .contact-captcha .captcha-image { flex-basis: 120px; }
  .contact-captcha .form-control,
  .contact-captcha img { min-height: 44px; }
}

/* The homepage template renders a direct .cont.active banner, outside Swiper. */
body.website-responsive-pc .u-hobanner:not(.in) .cont.active .i > .ct {
  background: linear-gradient(90deg, rgba(5, 13, 32, 0.58) 0%, rgba(5, 13, 32, 0.2) 48%, rgba(5, 13, 32, 0) 82%);
}

body.website-responsive-pc .u-hobanner:not(.in) .cont.active .i > .ct p {
  left: 0 !important;
  opacity: 1 !important;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.48);
}

@media (max-width: 768px) {
  body.website-responsive-pc .u-hobanner:not(.in) .cont.active .i > .ct {
    background: linear-gradient(90deg, rgba(5, 13, 32, 0.66) 0%, rgba(5, 13, 32, 0.18) 72%, rgba(5, 13, 32, 0) 100%);
  }
}

/* Prevent the desktop header from wrapping at tablet widths. Once the
   three top-level links no longer fit, keep the existing header controls and
   move navigation into the same right-side menu button used on mobile. */
@media (min-width: 769px) and (max-width: 1024px) {
  body.website-responsive-pc header .a > .container { position: relative !important; }
  /* The source overlay is tied to its desktop mega-menu state. At this
     intermediate breakpoint the button controls the compact menu directly;
     keeping the overlay would cover the button and make the menu impossible
     to close. */
  body.website-responsive-pc.on-menu:not(.on-mask)::after { display: none !important; }
  body.website-responsive-pc header .menu {
    display: none;
    float: none;
    left: 0;
    margin-left: 0;
    padding-top: 50px;
    position: absolute;
    top: 100%;
    width: 100%;
  }
  body.website-responsive-pc.on-menu header .menu { display: block; }
  body.website-responsive-pc header .menu > ul > li { float: none; margin-left: 0; }
  body.website-responsive-pc header .menu > ul > li > .i > .p > a {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 16px;
    line-height: 50px;
    text-align: center;
  }
  body.website-responsive-pc header .menu > ul > li > .i > .p > .ex {
    background-color: rgba(17, 17, 40, 0.2);
    display: none !important;
    left: 0;
    margin-left: 0;
    opacity: 1;
    padding: 20px 0;
    position: relative;
    top: 0 !important;
    width: 100%;
  }
  body.website-responsive-pc.on-menu header .menu > ul > li > .i > .p.on > .ex { display: block !important; }
  body.website-responsive-pc header .subm > a { display: none; }
  body.website-responsive-pc header .subm .i {
    border-bottom: 1px solid #676a75;
    border-right: none;
    height: auto;
    width: 100% !important;
  }
  body.website-responsive-pc header .subm .i > h5 { font-size: 16px; }
  body.website-responsive-pc header .subm .i > h5 a { margin: 0; }
  body.website-responsive-pc header .subm .i > .ct { height: auto; margin-top: 15px; }
  body.website-responsive-pc header .subm .i > .ct > .p > a { font-size: 14px; margin: 0; }
  /* Nested tablet menus need their own inset. The source mobile rule removes
     the desktop submenu margins, which otherwise puts headings and options at
     the viewport edge when the integrated menu is opened. */
  body.website-responsive-pc header .subm .i > h5,
  body.website-responsive-pc header .subm .i > .ct {
    padding-left: 24px;
    padding-right: 24px;
  }
  body.website-responsive-pc header .subm .i > .ct > .p > .ex {
    background-color: rgba(17, 17, 40, 0.2);
    display: none;
    left: 0;
    padding: 15px;
    position: relative;
    top: 0;
    width: 100%;
  }
  body.website-responsive-pc header .subm .i > .ct > .p.on > .ex { display: block; }
  body.website-responsive-pc header .mbtn {
    background: url(../img/mbtn.png) no-repeat center;
    background-size: 20px;
    display: inline-block;
    height: 44px;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    z-index: 2;
  }
  body.website-responsive-pc header .tool { margin-right: 52px; }
  body.website-responsive-pc.on-menu header .mbtn {
    background-image: url(../img/mbtn-hide.png);
    background-size: 18px;
  }
}

/* The mobile theme has its own full-screen menu; preserve that interaction. */
body.website-responsive-mobile main > .u-fullpart:not(.nopd) > .container:not(.full),
body.website-responsive-mobile footer > .a > .container,
body.website-responsive-mobile footer > .b > .container,
body.website-responsive-mobile footer > .c > .container {
  box-sizing: border-box;
  padding-inline: clamp(16px, 4vw, 32px) !important;
}
body.website-responsive-mobile main .u-contact1 { width: 100% !important; max-width: 100%; }
body.website-responsive-mobile header .subm .i > h5,
body.website-responsive-mobile header .subm .i > .ct { padding-inline: 20px; box-sizing: border-box; }
.contact-captcha img { display: block; max-width: 100%; height: 48px; object-fit: cover; cursor: pointer; }
.contact-captcha .form-control { border: 1px solid #ddd; }
@media (max-width: 768px) { .contact-captcha img { height: 44px; } }
@media (min-width: 769px) and (max-width: 1024px) {
  body.website-responsive-pc.on-menu header { z-index: 11; }
  body.website-responsive-pc.on-menu header .menu {
    max-height: calc(100dvh - 120px);
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #111128;
  }
  body.website-responsive-pc header .subm .i { box-sizing: border-box; }
}
