/* ========================================
   layout.css — コンテナ・ヘッダー・ナビ・フッター・セクション骨格
   松原メイフラワー病院
   ======================================== */

.l-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--sp-3xl);
}

/* ========================================
   ヘッダー
   ======================================== */
.l-header {
  background: var(--c-bg-white);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  box-shadow: var(--sh-header);
  transition: background 0.3s, box-shadow 0.3s;
}

/* fixedヘッダー分のスペース確保（has-mv以外） */
body:not(.has-mv) {
  padding-top: var(--sp-header);
}

/* MVあり（トップページ）：ヘッダーをページ最上部に重ねる */
body.has-mv {
  padding-top: 0;
}
body.has-mv .l-header {
  background: transparent;
  box-shadow: none;
}
body.has-mv .l-header.is-scrolled {
  background: var(--c-bg-white);
  box-shadow: var(--sh-header);
}

.l-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--sp-md2) 0;
}

.l-header-logo {
  display: flex;
  align-items: center;
  gap: var(--sp-md2);
}
.l-header-logo .logo-text h1 {
  font-family: var(--ff-accent);
  font-size: var(--fs-xl);
  font-weight: 700;
  color: var(--c-text-main);
  letter-spacing: 0.04em;
  line-height: 1.3;
  transition: color 0.3s;
}
.l-header-logo .logo-text p {
  font-family: var(--ff-main);
  font-weight: 400;
  font-size: var(--fs-sm2);
  color: var(--c-text-light);
  letter-spacing: 0.02em;
  transition: color 0.3s;
}
/* MV上の透明ヘッダー：ロゴを白文字に */
body.has-mv .l-header:not(.is-scrolled) .logo-text h1 {
  color: var(--c-text-white);
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
body.has-mv .l-header:not(.is-scrolled) .logo-text p {
  color: rgba(255,255,255,0.95);
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.l-header-right {
  display: flex;
  align-items: center;
  gap: var(--sp-xl);
}
.l-header-tel {
  text-align: right;
}
.l-header-tel .tel-number {
  font-family: var(--ff-main);
  font-size: var(--fs-2xl);
  font-weight: 900;
  color: var(--c-primary);
  letter-spacing: 0.03em;
  line-height: 1.2;
  transition: color 0.3s;
}
.l-header-tel .tel-number::before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  background: var(--c-primary);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M6.62 10.79c1.44 2.83 3.76 5.14 6.59 6.59l2.2-2.2c.27-.27.67-.36 1.02-.24 1.12.37 2.33.57 3.57.57.55 0 1 .45 1 1V20c0 .55-.45 1-1 1-9.39 0-17-7.61-17-17 0-.55.45-1 1-1h3.5c.55 0 1 .45 1 1 0 1.25.2 2.45.57 3.57.11.35.03.74-.25 1.02l-2.2 2.2z'/%3E%3C/svg%3E") no-repeat center;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M6.62 10.79c1.44 2.83 3.76 5.14 6.59 6.59l2.2-2.2c.27-.27.67-.36 1.02-.24 1.12.37 2.33.57 3.57.57.55 0 1 .45 1 1V20c0 .55-.45 1-1 1-9.39 0-17-7.61-17-17 0-.55.45-1 1-1h3.5c.55 0 1 .45 1 1 0 1.25.2 2.45.57 3.57.11.35.03.74-.25 1.02l-2.2 2.2z'/%3E%3C/svg%3E") no-repeat center;
  vertical-align: middle;
  margin-right: var(--sp-xs);
  transition: background 0.3s;
}
.l-header-tel .tel-note {
  font-size: var(--fs-sm2);
  color: var(--c-text-light);
  transition: color 0.3s;
}
/* MV上の透明ヘッダー：電話番号も白に */
body.has-mv .l-header:not(.is-scrolled) .tel-number {
  color: var(--c-text-white);
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
body.has-mv .l-header:not(.is-scrolled) .tel-number::before {
  background: var(--c-text-white);
}
body.has-mv .l-header:not(.is-scrolled) .tel-note {
  color: rgba(255,255,255,0.9);
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

/* PCでは電話番号タップ発信は不要なため、tel:リンクをクリック不可にする（モバイルは発信できるまま） */
@media (min-width: 769px) {
  a[href^="tel:"] {
    pointer-events: none;
    cursor: default;
  }
}

/* ハンバーガー */
.l-hamburger {
  display: none;
  width: 44px;
  height: 44px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-xs2);
  flex-shrink: 0;
}
.l-hamburger span {
  width: 24px;
  height: 2px;
  background: var(--c-text-main);
  display: block;
  border-radius: var(--r-2xs);
  transition: transform 0.3s, opacity 0.3s, background 0.3s;
}
body.has-mv .l-header:not(.is-scrolled) .l-hamburger span {
  background: var(--c-text-white);
}
.l-hamburger.is-active span:nth-child(1) { transform: rotate(45deg) translate(5.5px, 5.5px); }
.l-hamburger.is-active span:nth-child(2) { opacity: 0; }
.l-hamburger.is-active span:nth-child(3) { transform: rotate(-45deg) translate(5.5px, -5.5px); }

/* PC ナビゲーション（白背景＋オレンジ文字、上下に薄いオレンジ帯） */
.l-nav-bar {
  background: var(--c-bg-white);
  border-top: 1px solid var(--c-border-light);
  border-bottom: 3px solid var(--c-primary);
  transition: background 0.3s, border-color 0.3s;
}
.l-nav-menu {
  display: flex;
  justify-content: center;
}
.l-nav-menu li {
  flex: 1;
  min-width: 0;
  text-align: center;
  position: relative;
}
.l-nav-menu li a {
  display: block;
  overflow: hidden;
  padding: var(--sp-lg) var(--sp-xs);
  font-size: var(--fs-sm2);
  font-weight: 500;
  color: var(--c-text-main);
  letter-spacing: 0;
  white-space: nowrap;
  text-overflow: ellipsis;
  border-right: 1px solid var(--c-border-light);
  transition: color 0.2s, background 0.2s;
  position: relative;
}
.l-nav-menu li:last-child a { border-right: none; }
.l-nav-menu li a:hover {
  color: var(--c-primary);
  background: var(--c-primary-tint);
}
/* アクティブ状態（現在ページ）：文字だけオレンジ＋太字 */
.l-nav-menu > li.is-active > a {
  color: var(--c-primary);
  font-weight: 700;
}

/* MV上の透明ナビバー */
body.has-mv .l-header:not(.is-scrolled) .l-nav-bar {
  background: transparent;
  border-top-color: rgba(255,255,255,0.2);
  border-bottom-color: var(--c-primary);
}
body.has-mv .l-header:not(.is-scrolled) .l-nav-menu > li > a {
  color: var(--c-text-white);
  border-right-color: rgba(255,255,255,0.25);
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
body.has-mv .l-header:not(.is-scrolled) .l-nav-menu > li > a:hover {
  background: rgba(255,255,255,0.18);
  color: var(--c-text-white);
}
body.has-mv .l-header:not(.is-scrolled) .l-nav-menu > li.is-active > a {
  color: var(--c-text-white);
}
/* ドロップダウン内は常に通常の文字色（白背景に対する黒文字） */
body.has-mv .l-header:not(.is-scrolled) .l-nav-menu .dropdown li a {
  color: var(--c-text-sub);
  text-shadow: none;
}

/* モバイルメニュー */
.l-mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(45,42,38,0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s;
}
.l-mobile-menu-overlay.is-open { display: block; opacity: 1; }

.l-mobile-menu {
  display: none;
  position: fixed;
  top: 0; right: -100%;
  width: 85%; max-width: 360px;
  height: 100vh;
  background: var(--c-bg-white);
  z-index: 1000;
  transition: right 0.3s ease;
  overflow-y: auto;
  padding: var(--sp-9xl) var(--sp-2xl2) var(--sp-5xl);
}
.l-mobile-menu.is-open { right: 0; }

.l-mobile-menu-close {
  position: absolute;
  top: var(--sp-lg); right: var(--sp-lg);
  width: 40px; height: 40px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-full);
  background: var(--c-bg-white);
  font-size: var(--fs-md);
  color: var(--c-text-sub);
  display: flex;
  align-items: center;
  justify-content: center;
}
.l-mobile-menu ul li { border-bottom: 1px solid var(--c-border-light); }
.l-mobile-menu ul li a {
  display: block;
  padding: var(--sp-md) 0;
  font-size: var(--fs-md);
  color: var(--c-text-sub);
}
.c-mobile-tel {
  margin-top: var(--sp-2xl2);
  padding: var(--sp-xl);
  background: var(--c-primary-pale);
  border-radius: var(--r-xl);
  text-align: center;
}
.c-mobile-tel__label { font-size: var(--fs-base-sm); color: var(--c-text-light); margin-bottom: var(--sp-xs); }
.c-mobile-tel__number { display: block; font-size: var(--fs-xl2); font-weight: 900; color: var(--c-primary-dark); }
.c-mobile-tel__tap { font-size: var(--fs-sm2); color: var(--c-text-light); margin-top: var(--sp-2xs); }

/* ========================================
   セクション共通（TOPページ等の大セクション）
   ======================================== */
.l-section {
  padding: var(--sp-10xl) 0;
}
.l-section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: var(--sp-6xl);
}
.l-section-title {
  position: relative;
}
.l-section-title .t-heading {
  font-family: var(--ff-accent);
  font-size: var(--fs-2xl2);
  font-weight: 700;
  color: var(--c-text-main);
  letter-spacing: 0.04em;
  line-height: 1.4;
}

/* ========================================
   パンくずリスト
   ======================================== */
.l-breadcrumb {
  padding: var(--sp-2xl) 0 var(--sp-md2);
  font-size: var(--fs-base-md);
  color: var(--c-text-light);
  border-bottom: 1px solid var(--c-border-light);
}
.l-breadcrumb a {
  color: var(--c-primary-dark);
}
.l-breadcrumb span {
  margin: 0 var(--sp-sm);
  color: var(--c-border);
}

/* ========================================
   ページヒーロー（純白基調・薄いボーダーで区切るだけ）
   ======================================== */
.l-page-hero {
  background: var(--c-bg-white);
  padding: var(--sp-8xl) 0 var(--sp-7xl);
  position: relative;
  border-bottom: 1px solid var(--c-border-light);
}
.l-page-hero--image .l-container {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--sp-7xl);
  align-items: center;
}
.l-page-hero--image .hero-image {
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--sh-xl);
}
.l-page-hero--image .hero-image img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.l-page-hero h1, .l-page-hero h2 {
  font-size: var(--fs-3xl);
  letter-spacing: 0.04em;
  line-height: 1.4;
  position: relative;
  padding-left: var(--sp-lg2);
}
.l-page-hero h1::before, .l-page-hero h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 4px;
  background: var(--c-primary);
  border-radius: var(--r-2xs);
}
.l-page-hero .t-page-hero-desc {
  margin-top: var(--sp-md2);
  font-size: var(--fs-base);
  color: var(--c-text-sub);
  line-height: 1.8;
}

/* ========================================
   ページ本文コンテナ
   ======================================== */
.l-page-content {
  padding: var(--sp-9xl) 0 var(--sp-10xl);
}
.l-page-content h3 {
  font-size: var(--fs-xl);
  padding-bottom: var(--sp-md2);
  margin-bottom: var(--sp-2xl);
  border-bottom: 2px solid var(--c-primary-light);
  line-height: 1.5;
}
.l-page-content h4 {
  font-size: var(--fs-md2);
  color: var(--c-primary-dark);
  margin: var(--sp-4xl) 0 var(--sp-lg);
  padding-left: var(--sp-lg);
  border-left: 4px solid var(--c-primary);
  line-height: 1.5;
}
.l-page-content p {
  margin-bottom: var(--sp-xl);
  line-height: 2;
  color: var(--c-text-sub);
}
.l-page-content p:last-child {
  margin-bottom: 0;
}
.l-content-section {
  margin-bottom: var(--sp-7xl);
}
.l-content-section:last-child {
  margin-bottom: 0;
}

/* ========================================
   フッター（明るい白寄り背景）
   ======================================== */
.l-footer {
  background: var(--c-bg-footer);
  color: var(--c-text-sub);
  padding: var(--sp-8xl) 0 var(--sp-2xl2);
  border-top: 1px solid var(--c-border-light);
}
.l-footer-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--sp-6xl);
  margin-bottom: var(--sp-5xl);
}
.l-footer-logo h3 {
  font-family: var(--ff-accent);
  font-size: var(--fs-lg);
  color: var(--c-text-main);
  margin-bottom: var(--sp-md);
}
.l-footer-logo p {
  font-family: var(--ff-main);
  font-weight: 400;
  font-size: var(--fs-sm2);
  color: var(--c-text-sub);
  line-height: 2;
}
.l-footer-nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-sm) var(--sp-lg);
}
.l-footer-nav a {
  font-size: var(--fs-sm2);
  color: var(--c-text-sub);
  padding: var(--sp-xs2) 0;
  transition: color 0.2s;
}
.l-footer-nav a:hover {
  color: var(--c-primary);
}
.l-footer-copy {
  text-align: center;
  font-size: var(--fs-sm2);
  color: var(--c-text-sub);
  border-top: 1px solid var(--c-border-light);
  padding-top: var(--sp-xl);
}

/* ========================================
   レスポンシブ（768px以下）— 共通レイアウト
   ======================================== */
@media (max-width: 768px) {
  body:not(.has-mv) {
    padding-top: 64px;
  }

  .l-header-tel { display: none; }
  .l-hamburger { display: flex; }
  .l-nav-bar { display: none; }
  .l-mobile-menu { display: block; }
  .l-header-logo .logo-text h1 { font-size: var(--fs-base); }
  .l-header-logo .logo-text p {
    font-size: var(--fs-2xs);
    letter-spacing: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .l-section { padding: var(--sp-8xl) 0; }
  .l-section-title .t-heading { font-size: var(--fs-xl); }
  .l-section-header { flex-direction: column; gap: var(--sp-md2); align-items: flex-start; margin-bottom: var(--sp-3xl); }

  .l-footer-grid { grid-template-columns: 1fr; gap: var(--sp-2xl2); }
  .l-footer-nav { grid-template-columns: repeat(2, 1fr); }

  .l-page-hero { padding: 44px 0 var(--sp-5xl); }
  .l-page-hero h1, .l-page-hero h2 { font-size: var(--fs-xl2); padding-left: var(--sp-md2); }
  .l-page-hero h1::before, .l-page-hero h2::before { width: 3px; }
  .l-page-hero--image .l-container { grid-template-columns: 1fr; gap: var(--sp-2xl); }
  .l-page-content { padding: var(--sp-5xl) 0 var(--sp-7xl); }
  .l-page-content h3 { font-size: var(--fs-lg); }
  .l-page-content h4 { font-size: var(--fs-base); }
}
