:root {
  --primary: #006BCB;
  --primary-light: #2589e0;
  --primary-dark: #00508f;
  --primary-pale: #e6f1fb;
  --accent: #00a3e0;
  --bg: #fafbfc;
  --white: #ffffff;
  --text: #1f2937;
  --text-sub: #6b7280;
  --border: #e5e7eb;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Noto Sans JP', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
.serif { font-family: 'Noto Serif JP', serif; }
.display { font-family: 'Cormorant Garamond', serif; letter-spacing: 0.02em; }

/* ====== Top Info Bar ====== */
.topbar {
  background: var(--primary);
  color: white;
  font-size: 13px;
  padding: 8px 0;
}
.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.topbar-left { display: flex; gap: 24px; }
.topbar-right { display: flex; gap: 20px; }
.topbar a { color: white; text-decoration: none; opacity: 0.9; }

/* ====== Header ====== */
header {
  background: white;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}
.logo-mark {
  width: 110px;
  height: 110px;
  background: transparent;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* デフォルトは左向き（顔がこちら向き）、反転したい時は .flip クラス付与 */
}
.logo-mark.flip img {
  transform: scaleX(-1);
}
.logo-text .en {
  font-family: 'Cormorant Garamond', serif;
  font-size: 11px;
  letter-spacing: 0.25em;
  color: var(--primary);
  font-weight: 500;
}
.logo-text .jp {
  font-family: 'Noto Serif JP', serif;
  font-size: 17px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: 0.05em;
}
nav ul {
  display: flex;
  gap: 36px;
  list-style: none;
  align-items: center;
}
nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  position: relative;
  transition: color 0.3s;
}
nav a:hover { color: var(--primary); }
nav a::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s;
}
nav a:hover::after { width: 100%; }
.nav-cta {
  background: var(--primary);
  color: white !important;
  padding: 10px 22px;
  border-radius: 4px;
}
.nav-cta:hover { background: var(--primary-light); }
.nav-cta::after { display: none; }

/* ====== Button ====== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  transition: all 0.3s;
}
.btn-primary {
  background: var(--primary);
  color: white;
}
.btn-primary:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 107, 203, 0.3);
}
.btn-outline {
  background: white;
  color: var(--primary);
  border: 1px solid var(--primary);
}
.btn-outline:hover { background: var(--primary-pale); }

/* ====== Page Header (sub pages) ====== */
.page-hero {
  background: linear-gradient(135deg, #e6f1fb 0%, #f2f8fd 50%, #ffffff 100%);
  padding: 80px 24px 60px;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(0, 107, 203, 0.1) 0%, transparent 70%);
  border-radius: 50%;
}
.page-hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}
.page-hero .en {
  font-family: 'Cormorant Garamond', serif;
  font-size: 14px;
  letter-spacing: 0.3em;
  color: var(--primary);
  margin-bottom: 16px;
  display: block;
}
.page-hero .en::before {
  content: '';
  display: inline-block;
  width: 40px;
  height: 1px;
  background: var(--primary);
  vertical-align: middle;
  margin-right: 16px;
}
.page-hero h1 {
  font-family: 'Noto Serif JP', serif;
  font-size: 38px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: 0.05em;
  margin-bottom: 20px;
}
.breadcrumb {
  font-size: 13px;
  color: var(--text-sub);
}
.breadcrumb a {
  color: var(--text-sub);
  text-decoration: none;
}
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { margin: 0 8px; }

/* ====== Common Section ====== */
section { padding: 80px 24px; }
.container { max-width: 1000px; margin: 0 auto; }
.container-wide { max-width: 1200px; margin: 0 auto; }
.section-head { text-align: center; margin-bottom: 56px; }
.section-head .en {
  font-family: 'Cormorant Garamond', serif;
  font-size: 14px;
  letter-spacing: 0.3em;
  color: var(--primary);
  margin-bottom: 12px;
  display: block;
}
.section-head h2 {
  font-family: 'Noto Serif JP', serif;
  font-size: 30px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: 0.05em;
}
.section-head .line {
  width: 40px;
  height: 2px;
  background: var(--primary);
  margin: 20px auto 0;
}

/* ====== Content Page ====== */
.content-section { background: white; padding: 80px 24px; }
.content-section h2 {
  font-family: 'Noto Serif JP', serif;
  font-size: 26px;
  font-weight: 500;
  color: var(--text);
  margin: 48px 0 20px;
  padding-left: 16px;
  border-left: 4px solid var(--primary);
}
.content-section h2:first-child { margin-top: 0; }
.content-section h3 {
  font-family: 'Noto Serif JP', serif;
  font-size: 20px;
  font-weight: 500;
  color: var(--primary);
  margin: 32px 0 14px;
}
.content-section h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--primary-dark);
  margin: 24px 0 10px;
}
.content-section p {
  color: var(--text);
  line-height: 2;
  margin-bottom: 18px;
  font-size: 15px;
}
.content-section ul {
  list-style: none;
  padding: 0;
  margin-bottom: 24px;
}
.content-section ul li {
  padding: 10px 0 10px 28px;
  border-bottom: 1px solid var(--border);
  position: relative;
  font-size: 15px;
}
.content-section ul li::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 18px;
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
}
.content-section ul li:last-child { border-bottom: none; }
.lead-box {
  background: var(--primary-pale);
  padding: 32px;
  border-radius: 8px;
  margin-bottom: 40px;
  font-size: 15px;
  line-height: 2;
  border-left: 4px solid var(--primary);
}

/* ====== Service Grid (診療案内一覧用) ====== */
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 32px;
}
.service-card {
  background: white;
  padding: 40px 28px;
  border-radius: 8px;
  text-align: center;
  transition: all 0.3s;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--border);
  display: block;
}
.service-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: 0 12px 28px rgba(0, 107, 203, 0.12);
}
.service-card .icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  color: var(--primary);
}
.service-card h4 {
  font-family: 'Noto Serif JP', serif;
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 10px;
  color: var(--text);
}
.service-card p {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.8;
}
.service-card .more {
  display: inline-block;
  margin-top: 14px;
  font-size: 12px;
  color: var(--primary);
  font-weight: 500;
}

/* ====== CTA Section ====== */
.cta-section {
  background: var(--primary);
  color: white;
  padding: 60px 24px;
  text-align: center;
  background-image: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}
.cta-section h3 {
  font-family: 'Noto Serif JP', serif;
  font-size: 26px;
  font-weight: 500;
  margin-bottom: 16px;
}
.cta-section p { margin-bottom: 24px; opacity: 0.9; }
.cta-tel {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 48px;
  font-weight: 700;
  color: white;
  text-decoration: none;
  letter-spacing: 0.02em;
  display: inline-block;
}
.cta-tel::before {
  content: '📞';
  margin-right: 12px;
  font-size: 40px;
}

/* ====== Footer ====== */
footer {
  background: #003566;
  color: white;
  padding: 64px 24px 24px;
}
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
.footer-brand .en {
  font-family: 'Cormorant Garamond', serif;
  font-size: 12px;
  letter-spacing: 0.3em;
  color: rgba(255,255,255,0.6);
  margin-bottom: 8px;
  display: block;
}
.footer-brand h4 {
  font-family: 'Noto Serif JP', serif;
  font-size: 20px;
  margin-bottom: 16px;
  font-weight: 500;
}
.footer-brand p {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  line-height: 1.9;
  word-break: keep-all;
}
@media (max-width: 768px) {
  .footer-brand p {
    font-size: 12px;
    letter-spacing: -0.01em;
  }
}
.footer-col h5 {
  font-size: 13px;
  margin-bottom: 16px;
  color: rgba(255,255,255,0.6);
  font-family: 'Cormorant Garamond', serif;
  letter-spacing: 0.2em;
  font-weight: 500;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.3s;
}
.footer-col a:hover { color: white; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
}

/* ====== Mobile ====== */
@media (max-width: 768px) {
  .topbar-inner, nav ul { display: none; }
  .page-hero h1 { font-size: 26px; }
  .service-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .content-section h2 { font-size: 22px; }
  .content-section h3 { font-size: 18px; }
  section, .content-section { padding: 48px 20px; }
  .cta-tel { font-size: 34px; }
  .cta-tel::before { font-size: 28px; }
  
  /* スマホのロゴ調整 */
  .logo-mark { width: 88px; height: 88px; }
  .logo-text .en { font-size: 9px; letter-spacing: 0.2em; }
  .logo-text .jp { font-size: 15px; letter-spacing: 0.02em; white-space: nowrap; }
  .logo { gap: 10px; }
}

/* ====== Animations ====== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-fade { animation: fadeUp 0.8s ease-out backwards; }

/* LINEバナー（スマホ右上固定）- 全ページ共通 */
.line-banner-fixed {
  display: none;
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 999;
  background: #06C755;
  color: white;
  padding: 10px 16px;
  border-radius: 24px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(6, 199, 85, 0.4);
  align-items: center;
  gap: 6px;
  transition: all 0.3s;
}
.line-banner-fixed:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(6, 199, 85, 0.5);
}
.line-banner-fixed svg { width: 18px; height: 18px; fill: white; }
@media (max-width: 768px) {
  .line-banner-fixed { display: inline-flex; }
}

/* フッターのサブロゴ */
.footer-sub-logo {
  width: 192px;
  height: 192px;
  margin-bottom: 16px;
  background: white;
  border-radius: 20px;
  padding: 12px;
  display: inline-block;
}
.footer-sub-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
@media (max-width: 768px) {
  .footer-sub-logo { width: 160px; height: 160px; }
}

/* トップバーの公式LINEリンク */
.topbar-right .topbar-line {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #06C755;
  color: white !important;
  padding: 4px 12px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 700;
  margin-left: 12px;
  transition: all 0.2s;
}
.topbar-right .topbar-line:hover {
  background: #05a648;
  transform: translateY(-1px);
}
.topbar-right .topbar-line svg {
  fill: white;
}
@media (max-width: 768px) {
  .topbar-right .topbar-line { 
    padding: 3px 10px; 
    font-size: 11px;
  }
}
