/*
 * qto.b-jp.com responsive layout corrections
 * Scope: home hero and MENU (section code 6) only.
 */

@media (min-width: 821px) {
  .teas-page--home .teas-hero {
    width: 100% !important;
    height: calc(100svh - var(--teas-header-height)) !important;
    min-height: 680px !important;
    max-height: 980px !important;
    margin: 0 !important;
    border-radius: 0 !important;
  }

  .teas-page--home .teas-hero__content,
  .teas-page--home .teas-hero__visual {
    width: 100% !important;
  }
}

.qto-page-6 .teas-page-hero {
  margin-bottom: 0;
}

.qto-page-6 .teas-richtext {
  padding-block: clamp(44px, 5vw, 72px);
}

.qto-page-6 .teas-richtext__body {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: clamp(18px, 2vw, 28px) !important;
  width: min(calc(100% - 48px), 1500px) !important;
  max-width: none !important;
  margin-inline: auto !important;
  padding: 0 !important;
  background: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  opacity: 1 !important;
  transform: none !important;
  visibility: visible !important;
}

.qto-page-6 .teas-richtext__body > p {
  min-width: 0;
  margin: 0;
}

.qto-page-6 .teas-richtext__body img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
  border-radius: 6px;
}

@media (max-width: 1024px) {
  .qto-page-6 .teas-richtext__body {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 820px) {
  .teas-page--home .teas-hero {
    width: 100% !important;
    height: calc(100svh - var(--teas-header-height)) !important;
    min-height: calc(100svh - var(--teas-header-height)) !important;
    max-height: none !important;
    margin: 0 !important;
    border-radius: 0 !important;
  }

  .teas-page--home .teas-hero__content,
  .teas-page--home .teas-hero__visual,
  .teas-page--home .teas-hero__visual img {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
  }

  .teas-page--home .teas-hero__visual img {
    object-fit: cover !important;
  }

  body.teas-menu-open .teas-header {
    position: fixed !important;
    inset: 0 0 auto !important;
    z-index: 60 !important;
  }

  body.teas-menu-open .teas-navigation {
    top: var(--teas-header-height) !important;
    z-index: 50 !important;
    max-height: calc(100dvh - var(--teas-header-height)) !important;
    overscroll-behavior: contain;
  }

  .teas-footer__contact dl > div {
    grid-template-columns: 5.5rem minmax(0, 1fr) !important;
    align-items: baseline;
    column-gap: 0.75rem !important;
  }

  .teas-footer__contact dd > br:first-child {
    display: none;
  }

  .qto-page-6 .teas-page-hero {
    margin-top: 0;
  }

  .qto-page-6 .teas-page-hero__copy {
    min-height: auto;
    padding: 28px 24px 24px;
  }

  .qto-page-6 .teas-page-hero__copy h1 {
    font-size: clamp(1.9rem, 9vw, 2.5rem);
    line-height: 1.15;
  }

  .qto-page-6 .teas-page-hero__media {
    min-height: 0;
    height: clamp(240px, 64vw, 360px);
  }

  .qto-page-6 .teas-richtext {
    padding-block: 32px 56px;
  }

  .qto-page-6 .teas-richtext__body {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
    width: min(calc(100% - 32px), 680px) !important;
  }

  .qto-page-6 .teas-richtext__body img {
    border-radius: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .teas-page--home .teas-hero,
  .qto-page-6 .teas-richtext__body img {
    scroll-behavior: auto;
  }
}

/* qto desktop hero horizontal alignment, 2026-08-03 */
@media screen and (min-width: 821px) {
  body.teas-page.teas-page--home .teas-hero__content {
    padding-left: clamp(280px, 18vw, 360px) !important;
  }
}
