/**
 * Office Hero Heading Fix
 * トップの写真ヒーローで、大きな見出しが
 * ヘッダー直下で上端だけ切れるのを直します。
 *
 * 原因: 写真枠 #header-banner-inner の高さ（34vh、上限380px）より、
 * 絶対配置＋上下中央寄せされた #header-banner-container の方が高く、
 * overflow:hidden ではみ出した見出しの上が切れる。
 *
 * 対象は 768px 以上のトップだけです。767px 以下のスマホは
 * Office Mobile Top Fix に任せ、ここでは上書きしません。
 * 価格・診断の文言は変えません。
 */

@media (min-width: 768px) {
  /* 写真枠は中身の高さに合わせる。34vh の固定を外す */
  html body.home #header-banner-inner,
  html body.home #header-banner-outer #header-banner-inner {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: hidden !important;
    position: relative !important;
  }

  /* 写真は枠いっぱいに敷き、高さの計算には入れない */
  html body.home #header-banner-inner img.static_img,
  html body.home #header-banner-inner img {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    object-fit: cover !important;
    object-position: center center !important;
    display: block !important;
    z-index: 0;
  }

  /* 上下中央寄せをやめ、見出しの上に余白を取って枠の中に収める */
  html body.home #header-banner-container,
  html body.home #header-banner-outer #header-banner-container,
  html body.home #header-banner-container.float {
    position: relative !important;
    top: auto !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    height: auto !important;
    padding: 24px 0 28px !important;
    z-index: 1;
    box-sizing: border-box !important;
  }

  /* ぼやけの原因だった大きな text-shadow を、近い影に変えて字をはっきりさせる */
  html body.home #banner_title,
  html body.home #banner_title > div {
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.85), 0 1px 4px rgba(0, 0, 0, 0.7) !important;
    filter: none !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
}
