/* ===================================================
   坂寄歯科医院 共通スタイルシート
   カラー: 背景 #FFFFFF / アクセント #1899DE / テキスト #1A1A2E
   =================================================== */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@300;400;500;700&display=swap');

/* ---------- CSS カスタムプロパティ ---------- */
:root {
  --bg:          #FFFFFF;
  --bg-card:     #F5F8FC;
  --bg-section:  #EBF2FA;
  --accent:      #1899DE;
  --accent-dim:  #1278b5;
  --text:        #1A1A2E;
  --text-muted:  #5A6A7A;
  --border:      #D0E3F0;
  --radius:      4px;
  --font:        'Noto Serif JP', serif;
  --transition:  0.3s ease;
  --max-w:       1100px;
}

/* ---------- リセット ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.85;
  min-height: 100vh;
}

img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; transition: opacity var(--transition); }
a:hover { opacity: 0.8; }

/* ---------- 共通ユーティリティ ---------- */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 20px; }
.section    { padding: 80px 0; }
.section-sm { padding: 50px 0; }
.text-center { text-align: center; }
.text-accent { color: var(--accent); }

/* ---------- セクション見出し ---------- */
.section-title {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
  color: var(--text);
}
.section-title span { color: var(--accent); }

.section-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.divider {
  width: 60px;
  height: 2px;
  background: var(--accent);
  margin: 16px auto 40px;
}
.divider-left { margin-left: 0; }

/* ---------- ボタン ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 32px;
  border-radius: 4px;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: #0A0F1E;
}
.btn-primary:hover { background: var(--accent-dim); opacity: 1; }

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}
.btn-outline:hover { background: rgba(201,168,76,0.1); opacity: 1; }

/* ---------- ヘッダー ---------- */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(255,255,255,0.98);
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 12px rgba(24,153,222,0.08);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  padding: 0 24px;
  max-width: var(--max-w);
  margin: 0 auto;
}

.site-logo {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.site-logo .name-ja {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0D1E30;
  letter-spacing: 0.08em;
  text-shadow: none;
}
.site-logo .name-en {
  font-size: 0.68rem;
  color: #1899DE;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 600;
}

/* デスクトップナビ */
.nav-desktop {
  display: flex;
  gap: 32px;
  list-style: none;
}
.nav-desktop a {
  color: #1A2A3A;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  position: relative;
  padding-bottom: 4px;
}
.nav-desktop a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width var(--transition);
}
.nav-desktop a:hover,
.nav-desktop a.active { color: var(--accent); opacity: 1; }
.nav-desktop a:hover::after,
.nav-desktop a.active::after { width: 100%; }

.header-cta { display: flex; align-items: center; gap: 14px; }
.header-tel {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.2;
}
.header-tel .tel-label { font-size: 0.6rem; color: var(--text-muted); letter-spacing: 0.1em; }
.header-tel .tel-num {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.04em;
}

/* ハンバーガー */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 6px;
}
.hamburger span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}
.hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* モバイルメニュー */
.nav-mobile {
  display: none;
  position: fixed;
  top: 68px; left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,0.99);
  z-index: 99;
  flex-direction: column;
  padding: 40px 24px;
  gap: 0;
  overflow-y: auto;
  box-shadow: 0 8px 24px rgba(24,153,222,0.1);
}
.nav-mobile.is-open { display: flex; }
.nav-mobile a {
  color: #1A2A3A;
  font-size: 1.1rem;
  padding: 16px 0;
  border-bottom: 1px solid #D0E4F0;
  letter-spacing: 0.08em;
}
.nav-mobile a:hover { color: var(--accent); }
.nav-mobile .mobile-cta {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ---------- フッター ---------- */
#site-footer {
  background: #1A2A3A !important;
  color: #FFFFFF;
  border-top: 1px solid #2A3A4A;
  padding: 60px 0 24px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
}

.footer-brand .name-ja {
  font-size: 1.4rem;
  font-weight: 700;
  color: #FFFFFF !important;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
  margin-bottom: 4px;
}
.footer-brand .name-en {
  font-size: 0.65rem;
  color: #1899DE !important;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.footer-brand p {
  font-size: 0.8rem;
  color: #A8C0D0 !important;
  line-height: 1.9;
}

.footer-nav h4, .footer-info h4 {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 16px;
}
.footer-nav ul { list-style: none; }
.footer-nav li { margin-bottom: 8px; }
.footer-nav a { color: #A8C0D0; font-size: 0.85rem; }
.footer-nav a:hover { color: var(--accent); opacity: 1; }

.footer-info p { font-size: 0.82rem; color: #A8C0D0; margin-bottom: 6px; }
.footer-info strong { color: #FFFFFF; }

.footer-logo .footer-clinic {
  font-size: 1.4rem;
  font-weight: 700;
  color: #FFFFFF !important;
}
.footer-logo .footer-en {
  font-size: 0.75rem;
  color: #1899DE !important;
  letter-spacing: 0.1em;
}
.footer-logo p, .footer-info p, .footer-info a {
  color: #A8C0D0 !important;
}
.footer-nav a {
  color: #A8C0D0 !important;
}
.footer-copy {
  color: #A8C0D0 !important;
  text-align: center;
  padding-top: 24px;
  font-size: 0.75rem;
  color: #A8C0D0;
}

/* ---------- カード ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color var(--transition), transform var(--transition);
}
.card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

/* ---------- グリッド ---------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }

/* ---------- テーブル ---------- */
.info-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.info-table th,
.info-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
.info-table th {
  color: var(--accent);
  font-weight: 500;
  width: 140px;
  white-space: nowrap;
}
.info-table td { color: var(--text-muted); }

/* ---------- バッジ ---------- */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  font-weight: 500;
}
.badge-accent { background: rgba(201,168,76,0.15); color: var(--accent); border: 1px solid var(--border); }
.badge-muted  { background: rgba(156,163,175,0.1);  color: var(--text-muted); }

/* ---------- ページヒーロー（内部ページ） ---------- */
.page-hero {
  padding: 120px 0 60px;
  background: linear-gradient(135deg, #EBF2FA 0%, #FFFFFF 60%, #EBF2FA 100%);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(24,153,222,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.page-hero-label {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.page-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  color: #0D1E30;
  line-height: 1.3;
  margin-bottom: 16px;
}
.page-hero p {
  color: #5A6A7A;
  max-width: 560px;
  font-size: 0.92rem;
}

/* ---------- アコーディオン ---------- */
.accordion { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.accordion + .accordion { margin-top: 12px; }

.accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  background: var(--bg-card);
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  user-select: none;
  transition: background var(--transition);
}
.accordion-header:hover { background: rgba(201,168,76,0.06); }
.accordion-icon {
  font-size: 1.2rem;
  color: var(--accent);
  transition: transform var(--transition);
}
.accordion.is-open .accordion-icon { transform: rotate(45deg); }

.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
  background: var(--bg);
}
.accordion.is-open .accordion-body { max-height: 600px; }
.accordion-body-inner {
  padding: 20px 22px;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.9;
  border-top: 1px solid var(--border);
}

/* ---------- 診療時間テーブル ---------- */
.hours-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: center;
}
.hours-table th,
.hours-table td {
  padding: 12px 8px;
  border: 1px solid var(--border);
}
.hours-table thead th { background: rgba(201,168,76,0.1); color: var(--accent); font-weight: 500; }
.hours-table .closed { color: var(--text-muted); }
.hours-table .open   { color: #6EE7B7; }
.hours-table .day-sun, .hours-table .day-hol { color: #F87171; }
.hours-table .day-sat { color: #60A5FA; }

/* ---------- フォーム ---------- */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: 0.83rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  letter-spacing: 0.06em;
}
.form-label .req { color: var(--accent); margin-left: 4px; }

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 12px 16px;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.88rem;
  outline: none;
  transition: border-color var(--transition);
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus { border-color: var(--accent); }
.form-textarea { min-height: 140px; resize: vertical; }
.form-select option { background: var(--bg-card); }

/* ---------- アニメーション ---------- */
[data-fade] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
[data-fade].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- パンくず ---------- */
.breadcrumb {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent); opacity: 1; }
.breadcrumb .sep { color: var(--border); }

/* ---------- マップ ---------- */
.map-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.map-wrap iframe { display: block; width: 100%; height: 400px; filter: grayscale(0.3) invert(0.85) hue-rotate(175deg); }

/* ---------- レスポンシブ ---------- */
@media (max-width: 900px) {
  .nav-desktop { display: none; }
  .hamburger { display: flex; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .section { padding: 60px 0; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .header-cta .btn { display: none; }
  .info-table th { width: 100px; font-size: 0.8rem; }
}


/* Fixed nav background */

#site-header.scrolled,
#site-header:not(.initial) {
  background: rgba(255,255,255,0.98) !important;
  backdrop-filter: blur(12px) !important;
  box-shadow: 0 2px 12px rgba(24,153,222,0.08) !important;
}
#site-header .nav-desktop a {
  color: #1A2A3A !important;
}
