/* ========================================
   さわやか歯科クリニック  カスタムCSS
   テーマ：清潔感・優しさ／白×青
======================================== */
/*
Theme Name: Sawayaka Dental Clinic
Theme URI: https://example.com/
Description: さわやか歯科クリニックのオリジナルテーマです。
Version: 1.0.0
Author: Maina Takahashi
*/


:root {
  --color-primary: #2b8fd6;       /* メインの青 */
  --color-primary-dark: #1f6fa8;  /* 濃い青 */
  --color-accent: #6fc6e8;        /* 明るい水色 */
  --color-bg-soft: #eef7fc;       /* 淡い青背景 */
  --color-text: #333b42;          /* 基本テキスト */
  --color-muted: #6c7a85;         /* 補足テキスト */
  --color-footer: #f1f3f5;        /* フッター薄グレー */
}

/* ---------- ベース ---------- */
body {
  font-family: "Noto Sans JP", sans-serif;
  color: var(--color-text);
  font-size: 1.0625rem;
  line-height: 1.8;
  background-color: #ffffff;
}

h1, h2, h3, h4, .logo-text {
  font-family: "Zen Maru Gothic", "Noto Sans JP", sans-serif;
}

a {
  color: var(--color-primary-dark);
}

/* セクション共通の見出し */
.section-head .section-en {
  color: var(--color-accent);
  font-size: 1rem;
  letter-spacing: 0.15em;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-primary-dark);
  position: relative;
  display: inline-block;
  padding-bottom: 0.75rem;
}

.section-title::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 56px;
  height: 4px;
  border-radius: 2px;
  background-color: var(--color-accent);
}

html {
  scroll-behavior: smooth; /* スクロールをなめらかにする設定（すでにあれば不要です） */
  scroll-padding-top: 100px; /* ★ここを追加！ヘッダーの高さ（約80〜90px）より少し多めに余白を作ります */
}

/* ---------- 予約ボタン ---------- */
.btn-reserve {
  background-color: var(--color-primary);
  color: #fff;
  font-weight: 700;
  border: none;
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(43, 143, 214, 0.35);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-reserve:hover,
.btn-reserve:focus {
  background-color: var(--color-primary-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(31, 111, 168, 0.45);
}

/* ---------- 1. ヘッダー ---------- */
.site-header {
  background-color: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  z-index: 1030;
}

.logo-icon {
  color: var(--color-primary);
  font-size: 1.8rem;
}

.logo-text {
  color: var(--color-primary-dark);
  font-size: 1.4rem;
  font-weight: 700;
}

.nav-menu {
  list-style: none;
  padding-left: 0;
}

.nav-menu a {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
  font-size: 1.05rem;
  transition: color 0.2s ease;
}

.nav-menu a:hover {
  color: var(--color-primary);
}
.menu  {
 display: none;
 }

/* ---------- 2. メインビジュアル ---------- */
.hero {
  position: relative;
  min-height: 620px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: url("images/hero.png") center / cover no-repeat;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(43, 143, 214, 0.45),
    rgba(111, 198, 232, 0.25)
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  color: #fff;
  padding: 2rem 1rem;
  max-width: 880px;
}

.hero-title {
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1.5;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
  margin-bottom: 1.25rem;
}

.hero-sub {
  font-size: 1.25rem;
  font-weight: 500;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
  margin-bottom: 0;
}
/* ---------- 3. お知らせ ---------- */
.news-bar {
  background-color:var(--color-bg-soft);
  border-top: 1px solid #e6eef3;
  border-bottom: 1px solid #e6eef3;
}

.news-inner {
  padding: 1rem 0;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.news-label {
  background-color: var(--color-primary);
  color: #fff;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.35rem 1.25rem;
  white-space: nowrap;
}

.news-list {
  list-style: none;
  padding-left: 0;
}

.news-list .news-date {
  color: var(--color-muted);
  font-weight: 700;
  margin-right: 1.25rem;
}

.news-list .news-text {
  color: var(--color-text);
}

.news-more {
  color: var(--color-primary-dark);
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
}

.news-more:hover {
  text-decoration: underline;
}

/* ---------- 4. 当院の特徴 ---------- */
.features {
  background-color: #fff;
}

.feature-card {
  background-color: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 32px rgba(43, 143, 214, 0.18);
}

.feature-img {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.feature-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.feature-body {
  padding: 1.75rem;
  position: relative;
}

.feature-num {
  display: inline-block;
  font-family: "Zen Maru Gothic", sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: 0.25rem;
}

.feature-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-primary-dark);
  margin-bottom: 0.75rem;
}

.feature-text {
  color: var(--color-muted);
  font-size: 1rem;
  margin-bottom: 0;
}
/* ---------- 5. クイックナビ ---------- */
.quicknav {
  background-color: var(--color-bg-soft);
}

.quicknav-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.75rem;
  background-color: #fff;
  border-radius: 18px;
  padding: 2.25rem 1rem;
  height: 100%;
  text-decoration: none;
  color: var(--color-primary-dark);
  box-shadow: 0 6px 18px rgba(43, 143, 214, 0.12);
  transition: all 0.2s ease;
  border: 2px solid transparent;
}

.quicknav-card:hover {
  transform: translateY(-6px);
  border-color: var(--color-accent);
  color: var(--color-primary);
}

.quicknav-icon {
  font-size: 2.8rem;
  color: var(--color-primary);
}

.quicknav-text {
  font-size: 1.2rem;
  font-weight: 700;
}



/* ---------- 6. アクセス＆診療時間 ---------- */
.access {
  background-color: #ffffff;
}

.block-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-primary-dark);
  margin-bottom: 1.25rem;
}

.hours-table {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
  background-color: var(--color-bg-soft); /* テーブル内に淡い青を敷きます */
  border-radius: 12px;
  overflow: hidden;
}
  

.hours-table thead th {
  background-color: var(--color-primary);
  color: #fff;
  font-weight: 700;
  border: none;
  padding: 0.9rem 0.5rem;
}

.hours-table tbody th,
.hours-table tbody td {
  padding: 1rem 0.5rem;
  font-size: 1.05rem;
  border-color: #e6eef3;
}

.hours-table tbody th {
  background-color: var(--color-bg-soft);
  color: var(--color-text);
  font-weight: 700;
  white-space: nowrap;
}

.hours-table td {
  color: var(--color-primary);
  font-weight: 700;
}

.hours-table td.rest {
  color: #c4ccd2;
}

.hours-table td.half {
  color: var(--color-accent);
}

.hours-note {
  color: var(--color-muted);
  font-size: 0.95rem;
}

.map-frame {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.map-frame iframe {
  width: 100% !important;
  max-width: 100%;
  height: 300px;
  border: 0;
  display: block;
}

.access-info li {
  display: flex;
  align-items: flex-start;
  font-size: 1.05rem;
  margin-bottom: 0.85rem;
}

.access-info i {
  color: var(--color-primary);
  font-size: 1.2rem;
  margin-top: 0.15rem;
}

/* ---------- 7. フッター ---------- */
.site-footer {
  background-color: var(--color-footer);
  color: var(--color-text);
}

.footer-address {
  color: var(--color-muted);
}

.footer-tel {
  font-weight: 700;
  color: var(--color-primary-dark);
  font-size: 1.1rem;
}

.footer-head {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-primary-dark);
  margin-bottom: 1rem;
}

.footer-links li {
  margin-bottom: 0.6rem;
}

.footer-links a {
  color: var(--color-text);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--color-primary);
}

.footer-bottom {
  background-color: #e3e7ea;
  color: var(--color-muted);
}

/* ---------- レスポンシブ調整 ---------- */
@media (max-width: 1200px) {
  .hero-title {
    font-size: 2rem;
  }
  .hero {
    min-height: 480px;
  }
  .logo-text {
    font-size: 1.15rem;
  }
}

/* 診療時間テーブルのはみ出し・右側の隙間を防止する設定 */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%; /* 横幅を親要素に完全に合わせます */
}

.hours-table {
  margin-bottom: 0;
  width: 100%;
  min-width: 480px; /* テーブルが潰れすぎないように最小幅を設定し、この枠内でだけスクロールさせます */
}

/* 原因であるBootstrapのガター（隙間計算）のバグを強制修正 */
#access .row {
  --bs-gutter-x: 0rem !important; /* ガターの計算自体を0にして、はみ出しの元を断ちます */
  margin-left: 0 !important;
  margin-right: 0 !important;
}

#access [class*="col-"] {
  /* 原因になっていた左右のcalc計算を完全に上書きし、固定値の余白（12px）に固定します */
  padding-left: 12px !important;
  padding-right: 12px !important;
}


/* ==========================================
   ★一番右ハンバーガー＆真ん中WEB予約ボタン版CSS
   ========================================== */

/* 通常時（PC表示：1200px以上）の時はナビゲーションを横並びにする */
@media (min-width: 1201px) {
  .menu-icon, .overlay {
    display: none !important;
  }

.menu {
  display: block; /* PCでは普通に表示 */
  position: static;
  width: auto;
  height: auto;
  background: transparent;
  box-shadow: none;
}
.menu ul {
  display: flex;
  align-items: center;
  list-style: none;
  padding: 0;
  margin: 0;
}
.menu li {
  margin: 0 24px 0 0;
  width: auto;
}
.menu a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  transition: color 0.3s;
  padding: 0;
  border-bottom: none;
}
.menu a:hover {
  color: #007bff;
}
}
/* ==========================================
   スマホ・タブレット表示（1199px以下）の設定
   ========================================== */
@media (max-width: 1199px) {
  .header-right-box {
    position: relative;
  }

  /* 三本線ボタン */
  .menu-icon {
    display: flex !important; /* スマホではボタンを出現させる */
    width: 28px;
    height: 20px;
    cursor: pointer;
    z-index: 9999;
    flex-direction: column;
    justify-content: space-between;
    margin-left: 18px;
    position: relative;
  }

  .menu-icon span {
    display: block;
    width: 100%;
    height: 3px;
    background: #007bff;
    border-radius: 2px;
    transition: 0.4s ease-in-out;
  }

  /* ハンバーガーが「X」に変形 */
  #menu-toggle:checked + .menu-icon span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  #menu-toggle:checked + .menu-icon span:nth-child(2) {
    opacity: 0;
  }
  #menu-toggle:checked + .menu-icon span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
  }

  /* オーバーレイ背景（画面を暗くする） */
  .overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    z-index: 9997;
  }

  #menu-toggle:checked ~ .overlay {
    opacity: 1;
    pointer-events: auto;
  }

  /* メニュー本体 */
  .menu {
    display: none ;
    position: fixed !important;
    top: 0 !important;
    right: 0;
    width: 30% !important;
    height: 100vh !important;
    background: #fff !important;
    box-shadow: -2px 0 10px rgba(0,0,0,0.15) !important;
    padding: 80px 24px 50px 24px !important;
    z-index: 9998 !important;
    box-sizing: border-box !important;
  }

  /* ★チェックが入った時だけ右端を0にして画面内に引っ張り出す */
  #menu-toggle:checked ~ .menu {
    display: block !important; 
  }
  

  /* メニュー内の縦並びリスト */
  .menu ul {
    display: block !important; /* 横並びから縦並びにリセット */
    list-style: none;
    padding: 0 30px;
    margin: 0;
  }

  .menu li {
    margin: 0;
    width: 100%;
  }

  /* メニュー内のリンク文字 */
  .menu a {
    text-decoration: none;
    color: #333;
    font-size: 1.1rem;
    font-weight: 500;
    display: block;
    padding: 16px 0 !important; /* 上下の適切なクッションに固定 */
    border-bottom: 1px solid #f0f0f0 !important; /* 下線を復活 */
    transition: color 0.3s;
  }
}