/* ============================================================
   相模原眼科 共通CSS (common.css)
   ============================================================
   全ページで読み込む基盤CSS
   - リセット & ベーススタイル
   - CSS変数（カラー・フォント・サイズ）
   - ヘッダー（sticky + モバイル対応）
   - グローバルナビゲーション
   - パンくずリスト
   - フッター
   - 共通ボタン
   - 共通CTA（予約導線）
   - ユーティリティクラス
   - レスポンシブ
   ============================================================ */

/* ----------------------------------------------------------
   CSS Variables
   ---------------------------------------------------------- */
:root {
  /* --- Colors --- */
  --c-primary:       #0693e3;          /* メインカラー（vivid-cyan-blue） */
  --c-primary-dark:  #0576b9;
  --c-primary-light: #e8f4fd;
  --c-accent:        #cf2e2e;          /* アクセント（vivid-red） */
  --c-accent-hover:  #b52525;
  --c-line:          #06c755;          /* LINE公式カラー */
  --c-line-hover:    #05b04c;
  --c-text:          #333333;
  --c-text-light:    #666666;
  --c-text-muted:    #999999;
  --c-bg:            #ffffff;
  --c-bg-gray:       #f5f5f5;
  --c-bg-light:      #fafafa;
  --c-border:        #dddddd;
  --c-border-light:  #eeeeee;

  /* --- Typography --- */
  --font-base: "Noto Sans JP", -apple-system, BlinkMacSystemFont,
               "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo",
               "Segoe UI", sans-serif;
  --font-en:   "Arial", "Helvetica Neue", sans-serif;

  /* --- Sizes --- */
  --w-content:  900px;               /* コンテンツ最大幅 */
  --w-wide:     1100px;              /* ワイドコンテンツ最大幅 */
  --h-header:   80px;                /* ヘッダー高さ（PC） */
  --h-header-m: 60px;                /* ヘッダー高さ（SP） */

  /* --- Spacing --- */
  --sp-section:  60px;               /* セクション間余白 */
  --sp-block:    24px;               /* ブロック間余白 */
  --gutter:      20px;               /* 左右パディング */

  /* --- Border Radius --- */
  --radius-s:  4px;
  --radius-m:  8px;
  --radius-l:  12px;

  /* --- Shadow --- */
  --shadow-s: 0 2px 4px rgba(0,0,0,0.06);
  --shadow-m: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-l: 0 8px 24px rgba(0,0,0,0.10);

  /* --- Transition --- */
  --transition: 0.25s ease;
}


/* ----------------------------------------------------------
   Reset & Base
   ---------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-base);
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--c-primary);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover {
  color: var(--c-primary-dark);
  text-decoration: underline;
}

ul, ol { list-style: none; }

table {
  border-collapse: collapse;
  width: 100%;
}


/* ----------------------------------------------------------
   Layout Containers
   ---------------------------------------------------------- */
.l-content {
  max-width: var(--w-content);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.l-wide {
  max-width: var(--w-wide);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.l-section {
  padding: var(--sp-section) 0;
}


/* ----------------------------------------------------------
   Header
   ---------------------------------------------------------- */
.header {
  background: var(--c-bg);
  border-bottom: 3px solid var(--c-primary);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-s);
}

.header__inner {
  max-width: var(--w-wide);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: var(--h-header);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.header__logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--c-text);
}

.header__logo img {
  height: 44px;
  width: auto;
}

.header__logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--c-text);
  letter-spacing: 0.04em;
}

.header__logo-sub {
  display: block;
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--c-text-muted);
  letter-spacing: 0;
}

/* Header Actions (TEL, WEB予約, LINE) */
.header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header__tel {
  font-size: 0.85rem;
  color: var(--c-text);
  text-decoration: none;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.header__tel-number {
  font-family: var(--font-en);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.header__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  border-radius: var(--radius-s);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
}

.header__btn--reserve {
  background: var(--c-primary);
  color: #fff;
}
.header__btn--reserve:hover {
  background: var(--c-primary-dark);
  color: #fff;
  text-decoration: none;
}

.header__btn--line {
  background: var(--c-line);
  color: #fff;
}
.header__btn--line:hover {
  background: var(--c-line-hover);
  color: #fff;
  text-decoration: none;
}

.header__btn--access {
  background: var(--c-bg-gray);
  color: var(--c-text);
}
.header__btn--access:hover {
  background: #e8e8e8;
  text-decoration: none;
}

/* Mobile Menu Toggle */
.header__menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 36px;
  height: 36px;
  position: relative;
}
.header__menu-toggle span,
.header__menu-toggle span::before,
.header__menu-toggle span::after {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--c-text);
  position: absolute;
  left: 6px;
  transition: all var(--transition);
}
.header__menu-toggle span { top: 17px; }
.header__menu-toggle span::before { content: ""; top: -8px; }
.header__menu-toggle span::after { content: ""; top: 8px; }

.header__menu-toggle.is-active span { background: transparent; }
.header__menu-toggle.is-active span::before { top: 0; transform: rotate(45deg); }
.header__menu-toggle.is-active span::after { top: 0; transform: rotate(-45deg); }


/* ----------------------------------------------------------
   Global Navigation
   ---------------------------------------------------------- */
.gnav {
  background: var(--c-bg);
  border-bottom: 1px solid var(--c-border-light);
}

.gnav__list {
  max-width: var(--w-wide);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  justify-content: center;
  gap: 0;
}

.gnav__item {
  position: relative;
}

.gnav__link {
  display: block;
  padding: 14px 20px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--c-text);
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
}

.gnav__link:hover,
.gnav__link.is-current {
  color: var(--c-primary);
  text-decoration: none;
}

.gnav__link:hover::after,
.gnav__link.is-current::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 20px;
  right: 20px;
  height: 3px;
  background: var(--c-primary);
}


/* ----------------------------------------------------------
   Breadcrumb
   ---------------------------------------------------------- */
.breadcrumb {
  max-width: var(--w-content);
  margin: 0 auto;
  padding: 14px var(--gutter);
  font-size: 0.8rem;
  color: var(--c-text-muted);
}

.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

.breadcrumb__item {
  display: flex;
  align-items: center;
}

.breadcrumb__item::after {
  content: ">";
  margin: 0 8px;
  color: var(--c-text-muted);
  font-size: 0.7rem;
}

.breadcrumb__item:last-child::after {
  display: none;
}

.breadcrumb__link {
  color: var(--c-text-muted);
  text-decoration: none;
}
.breadcrumb__link:hover {
  color: var(--c-primary);
  text-decoration: underline;
}

.breadcrumb__current {
  color: var(--c-text-light);
}


/* ----------------------------------------------------------
   Footer
   ---------------------------------------------------------- */
.footer {
  background: #2a2a2a;
  color: #fff;
  padding: 48px var(--gutter) 24px;
}

.footer__inner {
  max-width: var(--w-wide);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
}

.footer__logo img {
  height: 36px;
  margin-bottom: 16px;
}

.footer__info {
  font-size: 0.85rem;
  line-height: 2;
  color: #ccc;
}

.footer__info a {
  color: #ccc;
}
.footer__info a:hover {
  color: #fff;
}

.footer__nav {
  display: flex;
  gap: 24px;
}

.footer__nav-link {
  color: #ccc;
  font-size: 0.85rem;
  text-decoration: none;
}
.footer__nav-link:hover {
  color: #fff;
  text-decoration: underline;
}

.footer__bottom {
  max-width: var(--w-wide);
  margin: 24px auto 0;
  padding-top: 24px;
  border-top: 1px solid #444;
  text-align: center;
}

.footer__copy {
  font-size: 0.75rem;
  color: #888;
  font-family: var(--font-en);
}

/* Footer CTA (Mobile Fixed) */
.footer-cta {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: var(--c-bg);
  box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
  padding: 8px 12px;
}

.footer-cta__list {
  display: flex;
  gap: 8px;
}

.footer-cta__item {
  flex: 1;
}

.footer-cta__link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 8px;
  border-radius: var(--radius-s);
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
}

.footer-cta__link--tel {
  background: var(--c-text);
  color: #fff;
}

.footer-cta__link--reserve {
  background: var(--c-primary);
  color: #fff;
}

.footer-cta__link--line {
  background: var(--c-line);
  color: #fff;
}


/* ----------------------------------------------------------
   Common Buttons
   ---------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 32px;
  border-radius: var(--radius-m);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  white-space: nowrap;
}
.btn:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow-m);
}

.btn--primary {
  background: var(--c-primary);
  color: #fff;
}
.btn--primary:hover {
  background: var(--c-primary-dark);
  color: #fff;
}

.btn--accent {
  background: var(--c-accent);
  color: #fff;
}
.btn--accent:hover {
  background: var(--c-accent-hover);
  color: #fff;
}

.btn--line {
  background: var(--c-line);
  color: #fff;
}
.btn--line:hover {
  background: var(--c-line-hover);
  color: #fff;
}

.btn--outline {
  background: transparent;
  color: var(--c-primary);
  border: 2px solid var(--c-primary);
}
.btn--outline:hover {
  background: var(--c-primary);
  color: #fff;
}

.btn--white {
  background: #fff;
  color: var(--c-primary);
}
.btn--white:hover {
  background: var(--c-primary-light);
  color: var(--c-primary-dark);
}

.btn--back {
  background: var(--c-bg-gray);
  color: var(--c-text-light);
  font-size: 0.9rem;
  padding: 10px 24px;
}
.btn--back:hover {
  background: #e0e0e0;
  color: var(--c-text);
}

.btn--sm {
  padding: 8px 20px;
  font-size: 0.85rem;
}

.btn--lg {
  padding: 18px 40px;
  font-size: 1.1rem;
  min-width: 240px;
}

.btn--block {
  display: flex;
  width: 100%;
}


/* ----------------------------------------------------------
   Common CTA Section (予約導線)
   ---------------------------------------------------------- */
.cta {
  background: var(--c-primary);
  border-radius: var(--radius-l);
  padding: 40px 32px;
  text-align: center;
  color: #fff;
  margin: var(--sp-section) 0;
}

.cta__title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.cta__text {
  font-size: 0.95rem;
  margin-bottom: 24px;
  opacity: 0.95;
}

.cta__buttons {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.cta__address {
  margin-top: 20px;
  font-size: 0.85rem;
  opacity: 0.8;
  line-height: 1.8;
}

/* CTA Light Variant */
.cta--light {
  background: var(--c-primary-light);
  color: var(--c-text);
}
.cta--light .cta__title { color: var(--c-primary-dark); }


/* ----------------------------------------------------------
   Utility Classes
   ---------------------------------------------------------- */
.u-text-center  { text-align: center; }
.u-text-left    { text-align: left; }
.u-text-right   { text-align: right; }
.u-text-primary { color: var(--c-primary); }
.u-text-accent  { color: var(--c-accent); }
.u-text-muted   { color: var(--c-text-muted); }
.u-text-small   { font-size: 0.85rem; }
.u-text-en      { font-family: var(--font-en); letter-spacing: 0.08em; }

.u-mt-0  { margin-top: 0; }
.u-mt-s  { margin-top: 16px; }
.u-mt-m  { margin-top: 24px; }
.u-mt-l  { margin-top: 40px; }
.u-mt-xl { margin-top: 60px; }

.u-mb-0  { margin-bottom: 0; }
.u-mb-s  { margin-bottom: 16px; }
.u-mb-m  { margin-bottom: 24px; }
.u-mb-l  { margin-bottom: 40px; }
.u-mb-xl { margin-bottom: 60px; }

.u-sp-only { display: none; }
.u-pc-only { display: block; }

.u-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}


/* ----------------------------------------------------------
   Responsive (Mobile: < 768px)
   ---------------------------------------------------------- */
@media (max-width: 768px) {
  :root {
    --sp-section: 40px;
    --gutter:     16px;
  }

  /* Header */
  .header__inner {
    height: var(--h-header-m);
  }
  .header__logo-text { font-size: 1.05rem; }
  .header__actions .header__btn--access { display: none; }
  .header__menu-toggle { display: block; }

  /* Global Nav (Mobile: slide-down) */
  .gnav {
    display: none;
    position: absolute;
    top: var(--h-header-m);
    left: 0;
    right: 0;
    background: var(--c-bg);
    border-bottom: 1px solid var(--c-border);
    box-shadow: var(--shadow-m);
    z-index: 999;
  }
  .gnav.is-open { display: block; }
  .gnav__list { flex-direction: column; padding: 8px 0; }
  .gnav__link { padding: 12px 24px; border-bottom: 1px solid var(--c-border-light); }
  .gnav__link:hover::after,
  .gnav__link.is-current::after { display: none; }

  /* Footer */
  .footer__inner { flex-direction: column; gap: 24px; }
  .footer__nav { flex-direction: column; gap: 12px; }

  /* Footer CTA (Mobile Fixed) */
  .footer-cta { display: block; }
  body { padding-bottom: 60px; }

  /* Buttons */
  .btn--lg { min-width: auto; width: 100%; }
  .cta__buttons { flex-direction: column; align-items: center; }
  .cta__buttons .btn { min-width: 280px; }

  /* Utility */
  .u-sp-only { display: block; }
  .u-pc-only { display: none; }
}

@media (max-width: 480px) {
  html { font-size: 15px; }
  .header__actions .header__tel { display: none; }
}
