/*
Theme Name:   Nagomi Resort Run - Child
Theme URI:    https://run.nagomiresort.com/
Description:  Snow Monkey 子テーマ — なごみリゾート Run八ヶ岳
Author:       Nagomi Resort
Template:     snow-monkey
Version:      1.1.1
Text Domain:  nagomi-child
*/

/* ─── Google Fonts：全体を明朝体（Noto Serif JP）に統一 ── */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@200;300;400;500;700&display=swap');

/* ─── ブランドカラー変数 ──────────────────────────────── */
:root {
  --ngm-black:  #1a1917;
  --ngm-dark:   #2c2a27;
  --ngm-mid:    #5a5750;
  --ngm-accent: #8b7355;
  --ngm-gold:   #c4aa87;
  --ngm-beige:  #f7f4ef;
  --ngm-border: #e4e0da;
}

/* ─── スクロール強制修正 ─────────────────────────────── */
body:not(.block-editor-page),
body:not(.block-editor-page) html {
  overflow-y: auto !important;
  height: auto !important;
  max-height: none !important;
}
body:not(.block-editor-page) .l-page,
body:not(.block-editor-page) .l-container,
body:not(.block-editor-page) .l-main,
body:not(.block-editor-page) .l-contents,
body:not(.block-editor-page) .l-contents__body,
body:not(.block-editor-page) .l-contents__full-container,
body:not(.block-editor-page) .l-contents__inner,
body:not(.block-editor-page) .l-contents__main,
body:not(.block-editor-page) .l-content,
body:not(.block-editor-page) .c-entry,
body:not(.block-editor-page) .c-entry__body,
body:not(.block-editor-page) .c-entry__content,
body:not(.block-editor-page) .p-entry-content,
body:not(.block-editor-page) .p-section-front-page-content,
body:not(.block-editor-page) .c-section,
body:not(.block-editor-page) .entry-content,
body:not(.block-editor-page) main {
  overflow: visible !important;
  height: auto !important;
  max-height: none !important;
}

/* ─── フォント：全体を明朝体（Noto Serif JP）に統一 ─── */
body {
  font-family: 'Noto Serif JP', serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6,
.wp-block-heading {
  font-family: 'Noto Serif JP', serif;
  font-weight: 300;
  letter-spacing: 0.1em;
}

/* ─── ヘッダー ───────────────────────────────────────── */
.l-header {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* ロゴサイズ：PC用 */
.c-logo img,
.c-logo__img,
img.custom-logo,
.custom-logo,
.p-1row-header__logo img,
.l-1row-header img.custom-logo {
  max-height: 44px !important;
  max-width: 180px !important;
  height: auto !important;
  width: auto !important;
}

/* 1rowヘッダー全体の縦幅を制限 */
.l-1row-header {
  min-height: 0;
}
.l-1row-header .c-container {
  padding-top: 10px;
  padding-bottom: 10px;
}

.c-global-nav__item > a,
.c-navbar__item > a,
.c-sub-nav .c-navbar__item > a {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  font-weight: 400;
  font-family: 'Noto Serif JP', serif;
}

/* ─── ヒーロー ───────────────────────────────────────── */
.wp-block-cover__inner-container h1 {
  font-family: 'Noto Serif JP', serif;
  font-size: clamp(1.6rem, 4.5vw, 3.2rem);
  font-weight: 300;
  letter-spacing: 0.16em;
  line-height: 1.75;
  text-shadow: 0 2px 40px rgba(0,0,0,0.3);
}

/* ─── ボタン ─────────────────────────────────────────── */
.wp-block-button__link {
  border-radius: 0;
  font-size: 0.76rem;
  letter-spacing: 0.28em;
  padding: 14px 44px;
  font-family: 'Noto Serif JP', serif;
}

/* ─── メディアとテキスト ─────────────────────────────── */
.wp-block-media-text {
  gap: 0;
}
.wp-block-media-text .wp-block-media-text__media img {
  height: 100%;
  object-fit: cover;
}

/* ─── テーブル ───────────────────────────────────────── */
.wp-block-table table {
  border-collapse: collapse;
  font-size: 0.84rem;
}
.wp-block-table th {
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 400;
}

/* ─── アコーディオン ─────────────────────────────────── */
.smb-accordion__item-summary {
  font-family: 'Noto Serif JP', serif;
  font-size: 0.9rem;
  font-weight: 400;
  padding: 18px 0;
}
.smb-accordion__item-body {
  font-size: 0.85rem;
  line-height: 1.95;
}

/* ─── フッター ───────────────────────────────────────── */
.c-site-footer__copyright {
  font-size: 0.6rem;
  letter-spacing: 0.1em;
}
.l-footer .c-widget-title {
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-weight: 400;
}
.l-footer .c-widget-title::after {
  display: none;
}

/* ─── フローティング予約ボタン ──────────────────────── */
#ngm-float-wrap {
  position: fixed;
  bottom: 28px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}
#ngm-popup {
  background: #fff;
  border: 1px solid #e8e3dd;
  box-shadow: 0 8px 40px rgba(0,0,0,.16);
  padding: 24px 22px 18px;
  width: 240px;
  text-align: center;
  opacity: 0;
  transform: translateY(10px) scale(.97);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
#ngm-popup.ngm-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.ngm-pop-label {
  font-size: .54rem;
  letter-spacing: .46em;
  text-transform: uppercase;
  color: #8b7355;
  margin-bottom: 4px;
  font-family: 'Noto Serif JP', serif;
}
.ngm-pop-title {
  font-family: 'Noto Serif JP', serif;
  font-size: .92rem;
  font-weight: 300;
  color: #1a1917;
  margin-bottom: 14px;
}
.ngm-pop-tel {
  display: block;
  font-size: .82rem;
  color: #1a1917;
  text-decoration: none;
  line-height: 1.7;
  font-family: 'Noto Serif JP', serif;
}
.ngm-pop-tel span {
  font-size: .62rem;
  color: #9a9590;
}
.ngm-pop-rule {
  border: none;
  border-top: 1px solid #e8e3dd;
  margin: 12px 0;
}
.ngm-pop-web {
  display: block;
  background: #1a1917;
  color: #fff;
  text-decoration: none;
  font-size: .82rem;
  letter-spacing: .1em;
  padding: 13px 0;
  transition: opacity .2s;
  font-family: 'Noto Serif JP', serif;
  font-weight: 500;
}
.ngm-pop-web:hover {
  opacity: .82;
  color: #fff;
}
#ngm-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  background: #1a1917;
  color: #fff;
  border: none;
  cursor: pointer;
  padding: 16px 26px;
  font-size: .82rem;
  letter-spacing: .16em;
  font-family: 'Noto Serif JP', serif;
  box-shadow: 0 4px 20px rgba(0,0,0,.28);
  border-radius: 0;
  transition: background .2s;
}
#ngm-btn:hover {
  background: #2e2b27;
  color: #fff;
}
.ngm-btn-close {
  display: none;
  font-size: .95rem;
}
#ngm-btn.ngm-open .ngm-btn-label { display: none; }
#ngm-btn.ngm-open .ngm-btn-close { display: inline; }
#ngm-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9998;
}
#ngm-overlay.ngm-open { display: block; }


/* ─── ヘッダー下余白（スペーサー）除去 ─────────────── */
.l-header-spacer,
.l-header + *:not(main):not(.l-contents),
[class*="header-spacer"],
[class*="header__spacer"] {
  display: none !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}
/* body/pageのtop余白をリセット */
body.home .l-page,
body.home .l-contents,
.l-page > .l-contents {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* ─── レスポンシブ ───────────────────────────────────── */
@media (max-width: 768px) {
  .wp-block-media-text .wp-block-media-text__content {
    padding: 40px 24px;
  }
}
@media (max-width: 600px) {
  #ngm-float-wrap { bottom: 18px; right: 14px; }
  #ngm-popup { width: 210px; }
}

/* ─── ヘッダー下余白 完全除去 ─────────────── */
body {
  padding-top: 0 !important;
}
.l-header-spacer,
[class*="header-spacer"],
[class*="header__spacer"],
[data-header-spacer] {
  display: none !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}
.l-contents,
.l-page,
.l-wrap {
  margin-top: 0 !important;
  padding-top: 0 !important;
}


/* ─── ヒーローセクション上部余白除去 ─────────────── */
.p-section-front-page-content,
body.home .c-section:first-child,
body.home main > .c-section:first-of-type {
  padding-top: 0 !important;
  margin-top: 0 !important;
}


/* ─── モバイル余白 完全除去 ─────────────── */
@media screen and (max-width: 1023px) {
  /* 管理バーによるhtml margin-top除去 */
  html {
    margin-top: 0 !important;
  }
  body {
    padding-top: 0 !important;
    margin-top: 0 !important;
  }
  /* ヘッダー内部の上余白除去 */
  .l-header,
  .l-header__content,
  .l-header__inner,
  .l-header__body,
  .l-1row-header,
  .l-1row-header .c-container,
  .l-header .c-container {
    padding-top: 0 !important;
    margin-top: 0 !important;
    min-height: 0 !important;
  }
  /* ヒーローセクション上余白除去 */
  .p-section-front-page-content,
  body.home .c-section:first-child,
  body.home main .c-section:first-of-type {
    padding-top: 0 !important;
    margin-top: 0 !important;
  }
  /* 管理バー自体を非表示 */
  #wpadminbar {
    display: none !important;
  }
}


/* ─── VILLAページ カラムレイアウト レスポンシブ修正 ─────── */
/* タブレット幅(782px〜1200px)で2カラムを縦積みに変更 */
@media screen and (min-width: 782px) and (max-width: 1200px) {
  body.page-id-92 .wp-block-columns {
    flex-wrap: wrap !important;
  }
  body.page-id-92 .wp-block-columns > .wp-block-column {
    flex-basis: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
  }
  /* media-textのgrid比率も調整（幅が広がるので崩れ防止） */
  body.page-id-92 .wp-block-media-text {
    grid-template-columns: 45% auto !important;
  }
}

/* スマートフォン(〜782px)はis-stacked-on-mobileで対応済み */
