/* AYATA: heading position adjustment (2026-11-21)
   This file is deliberately loaded AFTER tooplate-style(.min).css.
   It does not replace the site's existing CSS or alter its URLs/content.
*/

/* Hero banner: place headings using the container, not negative margins.
   The inline min-height/background on each #home section is preserved. */
#home {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  margin-top: 0;
  margin-bottom: 0;
  padding: 90px 0 35px;
}

/* Bootstrap offset/width changes at 768px and 992px used to push headings
   sideways. Make the hero text column full width, and center its content area. */
#home > .container > .row > [class*="col-"] {
  float: none;
  width: 100%;
  margin-left: 0;
}

#home .home-info,
#home .sub-home {
  box-sizing: border-box;
  margin: 0 auto;
  padding: 0 12px;
}

#home .home-info {
  max-width: 760px;
  text-align: center;
}

#home .sub-home {
  max-width: 940px;
  text-align: left;
}

#home .home-info h1,
#home .home-info h2,
#home .home-info h3,
#home .sub-home h1 {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: normal;
  line-height: 1.45;
}

/* The top-page h1 has an invalid inline margin (margin:px 5px 0).
   Override just its margin; preserve its text, color and small font size. */
#home .home-info h1 {
  margin: 0 0 10px !important;
}

#home .sub-home h1 {
  margin: 20px 0 !important;
}

#home .sub-home p {
  max-width: 100%;
  overflow-wrap: anywhere;
}

/* Keep content headings within their columns when text wraps. */
.box .section-title h2,
.box2 .section-title h2,
.box-room h2,
.posture-rei h2,
.simple-home h1,
.simple-home h2 {
  box-sizing: border-box;
  max-width: 100%;
  overflow-wrap: anywhere;
}

@media screen and (max-width: 767px) {
  /* Replace the original -70px/-200px and -15%/-30%/-35% offsets.
     The banner stays stable at the 575/576 and 767/768 breakpoints. */
  #home {
    margin-top: 0;
    margin-bottom: 0;
    padding: 76px 0 24px;
  }

  #home .sub-home h1 {
    font-size: clamp(20px, 4.7vw, 28px) !important;
    letter-spacing: 2px !important;
    line-height: 1.5;
  }

  #home .home-info h2 {
    font-size: clamp(19px, 4vw, 23px);
  }

  #home .home-info .ayata {
    font-size: clamp(22px, 5vw, 27px);
    letter-spacing: 2px;
  }

  #home .home-info h3 {
    letter-spacing: 2px;
  }

  /* Only the narrow-screen content headings are normalized to centered
     alignment. The intentional alternating desktop design is retained. */
  .box .section-title h2,
  .box2 .section-title h2 {
    width: 100%;
    margin: 0 auto;
    padding-left: 12px;
    padding-right: 12px;
    text-align: center;
    line-height: 1.4;
  }
}

@media screen and (max-width: 480px) {
  #home .home-info,
  #home .sub-home {
    padding-left: 8px;
    padding-right: 8px;
  }

  #home .home-info h2 {
    margin-bottom: 20px;
  }

  #home .sub-home h1 {
    letter-spacing: 1px !important;
  }

  .posture-rei h2,
  .box-room h2 {
    line-height: 1.45;
  }
}

/* 2026-11-21: top-page mobile corrections.
   Bootstrap's default navigation collapse is at 768px, but this site's
   seven-link menu needs more room. Use a single mobile layout to 991px. */
@media screen and (max-width: 991px) {
  .custom-navbar {
    background: #fff;
    padding: 5px 0;
    box-shadow: 0 1px 8px rgba(0,0,0,.12);
  }
  .custom-navbar .navbar-header { float: none; }
  .custom-navbar .navbar-toggle {
    display: block;
    float: right;
    margin-right: 15px;
  }
  .custom-navbar .navbar-brand,
  .custom-navbar.top-nav-collapse .navbar-brand { color: #202020; }
  .custom-navbar .navbar-collapse {
    clear: both;
    border-top: 1px solid #eee;
    max-height: calc(100vh - 65px);
    overflow-y: auto !important;
  }
  .custom-navbar .navbar-collapse.collapse { display: none !important; }
  .custom-navbar .navbar-collapse.collapse.in { display: block !important; }
  .custom-navbar .navbar-nav { float: none !important; margin: 0; }
  .custom-navbar .navbar-nav > li { float: none; }
  .custom-navbar .nav li a,
  .custom-navbar.top-nav-collapse .nav li a {
    color: #252525;
    padding: 11px 15px;
  }
  /* Suppress the mobile parallax background gap seen at the hero bottom.
     !important also overrides inline background-position set by stellar.js. */
  #home {
    background-position: center center !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
    background-attachment: scroll !important;
    overflow: hidden;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 90px;
    padding-bottom: 28px;
  }
  #home .overlay { inset: 0; height: 100%; }
}
@media screen and (max-width: 575px) {
  #home {
    min-height: 70svh;
    padding-top: 84px;
    padding-bottom: 20px;
  }
  #home .home-info h1 { margin-bottom: 12px !important; }
}

/* 2026-11-21: Center the sitemap link buttons on narrow phones.
   The default 40px left padding on UL moves the buttons to the right. */
@media screen and (max-width: 576px) {
  #sitemap ul {
    padding-left: 0;
    margin-left: 0;
  }
}
