/* ---------------------------------------
--------ヘッダー---------------------*/
/* ヘッダー部分 */
header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100px;
  padding: 10px 20px;
  z-index: 10;
}

.header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  /* 上下左右に余白を追加 */
}

/* ヘッダー右側 */
.header-right {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  /* 要素間のスペース */
}

/* 診療時間ボックス */
.header-time-box {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 15px;
  font-family: "Noto Serif";
  padding: 5px 15px;
  z-index: 3;
}

/* 背景ぼかし用の疑似要素 */
.header-time-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.80);
  filter: blur(5px);
  z-index: -1;
}

.header-time-box p {
  margin: 0;
  color: #333;
  line-height: 150%;
}

.medical-hours {
  font-size: 20px;
}

/* 電話予約ボタン */
.header-tel-box {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 3;
  padding: 20px;
}

.header-tel-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(106, 141, 199, 0.80);
  filter: blur(2.549999952316284px);
  z-index: -1;
}

.header-tel-box::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 97%;
  height: 90%;
  border: 1px solid rgba(255, 255, 255, 0.50);
  z-index: 1;
  transform: translate(-50%, -50%);
}

.header-tel-box::before,
.header-tel-box::after {
  pointer-events: none;
}

/* ホバーで一回り大きく */
.header-tel-box:hover {
  transform: scale(1.06);
}

/* キーボード操作でも拡大（アクセシビリティ） */
.header-tel-box:focus-within {
  transform: scale(1.06);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .25);
}

/* タップ時の手触り（任意） */
.header-tel-box:active {
  transform: scale(1.03);
}

.header-tel-box-text {
  color: #FFF;
  font-family: "Noto Serif";
  font-size: 18px;
  font-weight: 400;
  line-height: normal;
}

/* 電話番号 */
.header-tel-box-number {
  color: #FFF;
  font-family: "Noto Serif";
  font-size: 48px;
  font-weight: 400;
  line-height: normal;
}

/* 電話アイコン */
.header-tel-box-number i {
  font-size: 40px;
  margin-right: 10px;
}

/* ロゴ */
.header-logo img {
  width: 320px;
  height: auto;
}



/* ---------------------------------
----------ナビゲーションヘッダー-------- */
.headerNav {
  width: 100%;
  margin-top: 30px;
}

.hamburger-header {
  display: flex;
  justify-content: space-around;
  align-items: center;
  max-width: 1500px;
  margin: 0 auto;
  padding: 15px 0;
}

.no-flex h1 {
  font-size: 12px;
  font-weight: 300;
  margin-bottom: 4px;
}

.no-flex img.logo {
  width: 270px;
  height: auto;
}

.slideout-nav {
  position: static;
  visibility: visible;
  opacity: 1;
  transform: none;
  height: auto;
  width: auto;
  background: none;
  box-shadow: none;
  padding: 0;
  width: 100%;
	z-index: 999;
}

.slideout-nav-inner {
  display: flex;
  align-items: center;
  height: auto;
  padding: 0;
}

.slideout-nav-list {
  width: 100%;
  max-width: 1500px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.slideout-nav-item {
  padding: 0;
  margin: 0;
  opacity: 1;
  transform: none;
}

.slideout-nav-link {
  text-decoration: none;
  font-weight: 100;
  position: relative;
  padding: 4px 0;
	font-size: 16px;
}

.slideout-nav-link:hover {
  color: #6C8CA9;
}


/* サブメニューのベースデザイン */
.sub-menu {
  list-style: none;
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  /* ← 親の中央位置を起点に */
  transform: translateX(-50%);
  /* ← 自分の幅の半分だけ左にずらして中央揃えに */
  background: #fff;
  border: 1px solid #ddd;
  width: 250px;
  /* 必要に応じて調整 */
  z-index: 1000;
  padding: 0;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  border-radius: 10px;
}

/* サブメニューの各項目 */
.sub-menu li {
  padding: 0;
  border-bottom: 1px solid #e0e0e0;
}

.sub-menu li:last-child {
  border-bottom: none;
}

.sub-menu li a {
  display: block;
  padding: 12px 18px;
  color: #bda98b;
  text-decoration: none;
  font-size: 15px;
  transition: all 0.3s ease;
  text-align: center;
  background: #fff;
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.1);
}

.oya-menu-li {
  position: relative;
}

/* ホバー時のカラー反転 */
.sub-menu li a:hover {
  background: #bda98b;
  color: #fff;
}

/* 親メニューにホバーで表示 */
.oya-menu-li:hover .sub-menu {
  display: block;
}

/* サブメニュー内リンクのホバー時の透明度を無効にする */
.sub-menu li a:hover {
  opacity: 1 !important;
}

/* ハンバーガーメニューは非表示 */
.menu-toggle-button {
  display: none;
}

.slideout-nav-contact {
  display: none;
}




/* 最初の状態ではheader-contentはデフォルトの位置にある */
.header-content {
  opacity: 1;
  visibility: visible;
  position: relative;
  /* 初期位置ではrelative */
  transition: top 0.3s ease;
  /* top位置を滑らかに変更 */
}

/* スクロールしたら */
/* header-contentが上に固定されるスタイル */
.header-content.fixed {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  padding: 8px 0;
  /* 横幅を100%にして常に上に表示 */
  background: rgba(255, 255, 255, 0.70);
  /* 例えば背景色を設定 */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  /* 影を追加 */
  z-index: 200;
  /* 他のコンテンツより上に */
  font-size: 15px;
}

  .header-content.fixed .slideout-nav-list {
    justify-content: center;
    align-items: center;
    gap: 55px;
}

.arrow-icon {
  margin-left: 0.4em;
  font-size: 0.75em;
  color: #0F2540;
  transition: transform 0.3s ease;
}

@media screen and (max-width: 1199px) {
  .slideout-nav-list {
    gap: 5px;
  }

  .slideout-nav-link {
    font-size: 15px;
  }
}

/* モバイル版 */
@media screen and (max-width: 768px) {
	.header-logo h1, .page-header-logo h1, .page-header-logo .site-h1{
		font-size:12px;
	}
	
	body {
    max-width: 768px;
    overflow-x: hidden;
    font-size: 16px;
  }

  header {
	position: absolute;  
	height: 45px;  
    padding: 0 10px;
    position: fixed;
    top: 5px;
    z-index: 10;
  }

  h1 {
    font-size: 9px;
  }

  .header-right {
    display: none;
  }

  .header-logo img {
    width: 180px;
  }

  /* スクロールしたら */
  .scroll-nav h1 {
    display: none;
  }

.header-content.fixed {
  background: none;
  box-shadow: none;
}

  /* ヘッダーの全体レイアウト調整 */
  .hamburger-header {
    position: fixed;
    top: 0;
    right: 5%;
    z-index: 1000;
    max-width: 100%;
    padding: 0;
  }

  /* ハンバーガーメニュー */
  .menu-toggle-button {
    display: flex;
    justify-content: center;
    align-items: center;
    /* アイコンとテキストを縦横中央に配置 */
    position: relative;
    z-index: 1001;
    width: 60px;
    height: 60px;
    padding: 0;
    border: none;
    background: #6A8DC7;
    cursor: pointer;
    margin-top: 10px;
  }

  .menu-toggle-wrapper {
    position: relative;
    width: 32px;
    height: 17px;
    margin: 0px 0 17px 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
  }

  .menu-toggle-line {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #fff;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    text-align: center;
  }

  .menu-toggle-line:nth-child(1) {
    top: 0;
  }

  .menu-toggle-line:nth-child(2) {
    top: 9px;
  }

  .menu-toggle-line:nth-child(3) {
    top: 18px;
  }

  /* "MENU"の文字をアイコン内に追加 */
  .menu-toggle-wrapper::after {
    content: 'MENU';
    font-size: 9px;
    color: #fff;
    text-align: center;
    position: absolute;
    bottom: -25px;
    left: 0;
    width: 100%;
    font-weight: bold;
    display: block;
    letter-spacing: 1px;
  }

  .menu-toggle-button.active .menu-toggle-line {
    background-color: #fff;
  }

  .menu-toggle-button.active .menu-toggle-line:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
  }

  .menu-toggle-button.active .menu-toggle-line:nth-child(2) {
    opacity: 0;
    transform: translateX(20px);
  }

  .menu-toggle-button.active .menu-toggle-line:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
  }

  .slideout-nav.active {
    visibility: visible;
    opacity: 1;
    transform: translateX(0);
  }

  .slideout-nav-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    opacity: 0;
    transition: opacity 0.5s cubic-bezier(0.23, 1, 0.32, 1);

  }

  .slideout-nav.active .slideout-nav-bg {
    opacity: 1;
  }

  .slideout-nav-inner {
    position: relative;
    display: block;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    height: 100%;
    /* padding-top: 5vh; */
  }

  .slideout-nav-list {
    display: block;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .slideout-nav-item {
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  }

  .slideout-nav.active .slideout-nav-item {
    opacity: 1;
    transform: translateY(0);
    color: #bda98b;
    border-bottom: 1px solid rgba(189, 169, 139, .3);
  }

  .slideout-nav.active .slideout-nav-item:nth-child(1) {
    transition-delay: 0.2s;
  }

  .slideout-nav.active .slideout-nav-item:nth-child(2) {
    transition-delay: 0.3s;
  }

  .slideout-nav.active .slideout-nav-item:nth-child(3) {
    transition-delay: 0.4s;
  }

  .slideout-nav.active .slideout-nav-item:nth-child(4) {
    transition-delay: 0.5s;
  }

  .slideout-nav.active .slideout-nav-item:nth-child(5) {
    transition-delay: 0.6s;
  }

  .slideout-nav.active .slideout-nav-item:nth-child(6) {
    transition-delay: 0.7s;
  }

  .slideout-nav-link {
    display: inline-block;
    color: #bda98b;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
  }

  .slideout-nav-contact {
    display: block;
    height: auto;
    margin-top: auto;
    padding: 25px 0;
    background: rgba(106, 141, 199, 0.70);
    font-size: 14px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1) 0.9s;
    position: relative;
  }

  .slideout-nav.active .slideout-nav-contact {
    opacity: 1;
    transform: translateY(0);
  }

  .slideout-nav-box {
    width: 90%;
    margin: 0 auto;
    text-align: center;
    color: #fff;
	        margin-bottom: 60px;  
  }

  .slideout-nav-address {
    margin-bottom: 30px;
  }

  .slideout-nav-tel {
    font-size: 28px;
    font-family: "Noto Serif";
    position: relative;
    padding: 20px 30px;
    color: #fff;  
  }

  .slideout-nav-tel::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
background: rgba(113, 183, 174, 0.80);
    filter: blur(2.549999952316284px);
    z-index: -1;
  }

  .slideout-nav-tel::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 97%;
    height: 90%;
    border: 1px solid rgba(255, 255, 255, 0.50);
    z-index: 1;
    transform: translate(-50%, -50%);
  }

  .slideout-nav-tel i {
    font-size: 25px;
    margin-right: 5px;
  }

  .mt35 {
    margin-top: 35px;
  }

  .arrow-icon {
    color: #6A8DC7;
  }


  /* 初期状態：非表示 */
  .sub-menu {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: max-height 0.4s ease, opacity 0.4s ease, visibility 0.4s ease;
   position: static;
    transform: none;
    box-shadow: none;
    border: none;
    display: none;  
}

  /* 「診療案内」がタップされて親に .open がついたら表示 */
  .slideout-nav-item.open .sub-menu {
    display: block;
    width: 100%;
    max-height: 100%;
    opacity: 1;
    visibility: visible;
    background: rgba(189, 169, 139, .2);
    /* border-radius: 4px; */
    padding: 1px 1px;
    margin-top: 5px;
    border-radius: 0%;
  }

  .has-submenu.open .sub-menu li {
    background: transparent;
    border-bottom: 1px solid rgba(189, 169, 139, .3);
  }

  .has-submenu.open .sub-menu li a {
    box-shadow: none;
    margin-left: 0;
    padding: 20px 0px;
    background: transparent;
  }

  /* 最後の項目の下線はなし */
  .slideout-nav-item .sub-menu li:last-child a {
    border-bottom: none;
  }

  .slideout-nav-item .sub-menu li:last-child a {
    border-bottom: none;
  }

  .slideout-nav {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 90%;
    height: 100vh;
    background: #fff;
    z-index: 999;
    overflow-y: auto;
    padding: 20px 0;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .slideout-nav-link:hover {
    color: inherit !important;
  }

  .slideout-nav.active {
    display: block;
    transform: translateX(0);
  }

  .slideout-nav-list {
    flex-direction: column;
    gap: 0;
  }

  .slideout-nav-item {
    padding: 20px;
  }

  .slideout-nav-item a {
    margin-left: 20px;
  }

}

/* スマホ */
@media screen and (max-width: 480px) {
  .header-flex {
    padding: 0;
  }

  h1 {
    margin-bottom: 3px;
  }

  .header-logo img {
    width: 145px;
  }
}


/* =========================================================
   ヘッダー修正用 追加CSS
   ※ 既存CSSは消さず、このブロックを一番下に追記
========================================================= */

/* ヘッダー全体をメイン画像より前面に */
header {
  z-index: 200;
}

/* ロゴ・診療時間・電話を確実に前へ */
.header-flex {
  position: relative;
  z-index: 201;
  align-items: flex-start;
}

.header-logo {
  position: relative;
  z-index: 220;
  flex-shrink: 0;
}

.header-logo a {
  display: block;
  position: relative;
  z-index: 221;
}

.header-logo img {
  display: block;
  position: relative;
  z-index: 222;
}

/* h1が画像の前後関係に影響している場合の保険 */
.header-logo h1,
.page-header-logo h1,
.page-header-logo .site-h1 {
  position: relative;
  z-index: 223;
}

/* 右側要素も前面に */
.header-right,
.header-time,
.header-tel {
  position: relative;
  z-index: 210;
}

/* タブレットでの干渉対策 */
@media screen and (max-width: 1199px) and (min-width: 769px) {
  header {
    padding: 8px 16px;
  }

  .header-flex {
    padding: 8px 16px;
    gap: 14px;
    align-items: flex-start;
  }

  .header-logo img {
    width: 230px;
  }

  .header-right {
    gap: 12px;
  }

  .header-time-box {
    padding: 6px 12px;
    font-size: 13px;
  }

  .medical-hours {
    font-size: 16px;
  }

  .header-tel-box {
    padding: 12px 16px;
  }

  .header-tel-box-text {
    font-size: 13px;
  }

  .header-tel-box-number {
    font-size: 34px;
  }

  .header-tel-box-number i {
    font-size: 28px;
    margin-right: 8px;
  }
}

/* さらに狭いタブレット幅 */
@media screen and (max-width: 1024px) and (min-width: 769px) {
  .header-logo img {
    width: 200px;
  }

  .header-right {
    gap: 10px;
  }

  .header-time-box {
    padding: 5px 10px;
    font-size: 12px;
  }

  .medical-hours {
    font-size: 15px;
  }

  .header-tel-box {
    padding: 10px 14px;
  }

  .header-tel-box-text {
    font-size: 12px;
  }

  .header-tel-box-number {
    font-size: 28px;
  }

  .header-tel-box-number i {
    font-size: 24px;
    margin-right: 6px;
  }
}