/* ========================================
   共通フッター
   青白系背景・大きなロゴ・矢印なし
======================================== */

.nobo-footer {
  /* 配色 */
  --footer-white: #fff;
  --footer-maincolor: #0272d4;
  --footer-navy: #142f53;
  --footer-text: #485563;
  --footer-link: #344b65;
  --footer-gold: #96743b;
  --footer-line: #d4e0eb;
  --footer-background: #f0f6fb;

  /* レイアウト */
  --footer-logo-width: 400px;
  --footer-side-space: 48px;

  /* フォント */
  --footer-serif:
    "Zen Old Mincho",
    "Yu Mincho",
    "Hiragino Mincho ProN",
    serif;

  position: relative;
  isolation: isolate;
  width: 100%;
  margin: 0;
  padding: 64px 0 32px;

  border-top: 1px solid var(--footer-line);

  color: var(--footer-text);
  background: var(--footer-background);
  font-family: var(--footer-serif);
}

/* ========================================
   基本設定
======================================== */

.nobo-footer,
.nobo-footer::before,
.nobo-footer::after,
.nobo-footer *,
.nobo-footer *::before,
.nobo-footer *::after {
  box-sizing: border-box;
}

.nobo-footer :where(h2, p, ul, address) {
  margin: 0;
}

.nobo-footer ul {
  padding: 0;
  list-style: none;
}

.nobo-footer a {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

/* 矢印用の旧要素を非表示 */
.nobo-footer__nav-link svg,
.nobo-footer__official-link svg,
.nobo-footer__pagetop-icon {
  display: none;
}

/* リンクの疑似要素による矢印も解除 */
.nobo-footer__nav-link::before,
.nobo-footer__nav-link::after,
.nobo-footer__official-link::before,
.nobo-footer__official-link::after,
.nobo-footer__pagetop::before,
.nobo-footer__pagetop::after {
  content: none;
}

/* ========================================
   全体レイアウト
======================================== */

.nobo-footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 0.34fr) minmax(0, 0.66fr);
  align-items: start;
  gap: 48px;

  width: min(100%, 1440px);
  margin-inline: auto;
  padding-inline: var(--footer-side-space);
}

.nobo-footer__clinic,
.nobo-footer__content {
  min-width: 0;
}

/* ========================================
   左側：ロゴ・医院情報
======================================== */

.nobo-footer__brand {
  display: block;
  width: min(100%, var(--footer-logo-width));
  max-width: 100%;
}

/* 元画像の縦横比を維持 */
.nobo-footer .nobo-footer__logo {
  display: block;
  flex: none;

  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0;

  object-fit: contain;
  object-position: left center;
}

.nobo-footer__clinic-details {
  margin-top: 24px;
  padding-left: 0;
}

.nobo-footer__address {
  color: var(--footer-text);

  font-size: 16px;
  font-style: normal;
  line-height: 1.9;
  letter-spacing: 0.025em;
  overflow-wrap: anywhere;
}

.nobo-footer__address > span {
  display: block;
}

.nobo-footer__access {
  margin-top: 10px;

  color: var(--footer-text);
  font-size: 15px;
  line-height: 1.9;
  letter-spacing: 0.025em;
  overflow-wrap: anywhere;
}

/* ========================================
   右側：ナビゲーション
======================================== */

.nobo-footer__nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  column-gap: 24px;
  row-gap: 32px;
}

.nobo-footer__nav-group {
  min-width: 0;
}

.nobo-footer__nav-title {
  color: var(--footer-navy);

  font-size: 18px;
  font-weight: 500;
  line-height: 1.7;
  letter-spacing: 0.025em;
  overflow-wrap: anywhere;
}

.nobo-footer__nav-title::after {
  content: "";
  display: block;

  width: 30px;
  height: 1px;
  margin-top: 12px;

  background: var(--footer-gold);
}

.nobo-footer__nav-list {
  margin-top: 18px;
}

.nobo-footer__nav-list li {
  min-width: 0;
}

.nobo-footer__nav-list li + li {
  margin-top: 4px;
}

.nobo-footer .nobo-footer__nav-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;

  min-width: 0;
  min-height: 44px;
  padding: 8px 0;

  color: var(--footer-link);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.8;
  letter-spacing: 0.015em;
  overflow-wrap: anywhere;

  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;

  transition: color 220ms ease;
}

.nobo-footer__nav-link > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* ========================================
   下部：関連リンク・コピーライト
======================================== */

.nobo-footer__bottom {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;

  margin-top: 36px;
  padding-top: 24px;

  border-top: 1px solid var(--footer-line);
}

.nobo-footer__legal {
  flex: 1;
  min-width: 0;
}

.nobo-footer__legal-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  column-gap: 22px;
  row-gap: 4px;
}

.nobo-footer__legal-list li {
  min-width: 0;
}

/* 折り返し時に区切り線だけが残らないよう解除 */
.nobo-footer__legal-list li + li::before {
  content: none;
}

.nobo-footer .nobo-footer__legal-list a {
  display: inline-flex;
  align-items: center;

  min-height: 44px;
  max-width: 100%;
  padding-block: 6px;

  color: var(--footer-link);
  font-size: 14px;
  line-height: 1.8;
  letter-spacing: 0.015em;
  overflow-wrap: anywhere;

  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;

  transition: color 220ms ease;
}

.nobo-footer__copyright {
  margin-top: 12px;
  color: var(--footer-text);
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.nobo-footer__copyright small {
  font-size: 13px;
  letter-spacing: 0.015em;
}

/* ========================================
   PAGE TOP：テキストボタン
======================================== */

.nobo-footer .nobo-footer__pagetop {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;

  width: 108px;
  min-height: 46px;
  padding: 12px 14px;

  border: 1px solid var(--footer-line);
  border-radius: 2px;

  color: var(--footer-navy);
  background: var(--footer-white);
  text-align: center;

  transition:
    color 220ms ease,
    background-color 220ms ease,
    border-color 220ms ease;
}

.nobo-footer__pagetop-label {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

/* ========================================
   フォーカス・ホバー
======================================== */

.nobo-footer a:focus-visible {
  outline: 2px solid var(--footer-maincolor);
  outline-offset: 4px;
}

@media (hover: hover) and (pointer: fine) {
  .nobo-footer .nobo-footer__nav-link:hover,
  .nobo-footer .nobo-footer__legal-list a:hover {
    color: var(--footer-maincolor);
    text-decoration-line: underline;
  }

  .nobo-footer .nobo-footer__pagetop:hover {
    border-color: var(--footer-navy);
    color: var(--footer-white);
    background-color: var(--footer-navy);
  }
}

/* ========================================
   中間サイズのPC
   ロゴとナビの横幅を確保
======================================== */

@media screen and (min-width: 1101px) and (max-width: 1279px) {
  .nobo-footer {
    --footer-side-space: 32px;
  }

  .nobo-footer__inner {
    grid-template-columns: minmax(0, 0.36fr) minmax(0, 0.64fr);
    gap: 36px;
  }

  .nobo-footer__nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 32px;
    row-gap: 28px;
  }
}

/* ========================================
   タブレット
======================================== */

@media screen and (min-width: 768px) and (max-width: 1100px) {
  .nobo-footer {
    --footer-side-space: 32px;
    --footer-logo-width: 400px;

    padding: 48px 0 30px;
  }

  .nobo-footer__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }

  .nobo-footer__clinic-details {
    margin-top: 20px;
  }

  .nobo-footer__nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap: 24px;
  }

  .nobo-footer__nav-title {
    font-size: 17px;
  }

  .nobo-footer__bottom {
    margin-top: 30px;
  }
}

/* ========================================
   スマートフォン
======================================== */

@media screen and (max-width: 767px) {
  .nobo-footer {
    --footer-side-space: 24px;
    --footer-logo-width: 360px;

    padding: 42px 0 28px;
  }

  .nobo-footer__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  /* ロゴ・医院情報 */
  .nobo-footer__clinic-details {
    margin-top: 20px;
  }

  .nobo-footer__address {
    font-size: 16px;
    letter-spacing: 0.015em;
  }

  .nobo-footer__access {
    margin-top: 8px;
    font-size: 15px;
    letter-spacing: 0.015em;
  }

  /* リンクは2列 */
  .nobo-footer__nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 24px;
    row-gap: 30px;
  }

  .nobo-footer__nav-title {
    font-size: 17px;
    letter-spacing: 0.015em;
  }

  .nobo-footer__nav-title::after {
    width: 28px;
    margin-top: 10px;
  }

  .nobo-footer__nav-list {
    margin-top: 14px;
  }

  .nobo-footer__nav-list li + li {
    margin-top: 2px;
  }

  .nobo-footer .nobo-footer__nav-link {
    min-height: 44px;
    padding-block: 8px;

    font-size: 16px;
    line-height: 1.8;
    letter-spacing: 0;
  }

  /* 関連リンク・コピーライト */
  .nobo-footer__bottom {
    flex-direction: column;
    align-items: stretch;
    gap: 22px;

    margin-top: 30px;
    padding-top: 22px;
  }

  .nobo-footer__legal-list {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .nobo-footer .nobo-footer__legal-list a {
    min-height: 44px;
    font-size: 14px;
    letter-spacing: 0;
  }

  .nobo-footer__copyright {
    margin-top: 14px;
  }

  .nobo-footer__copyright small {
    font-size: 12px;
    letter-spacing: 0;
  }

  .nobo-footer .nobo-footer__pagetop {
    align-self: flex-end;
    width: 108px;
  }
}

/* ========================================
   小さなスマートフォン
======================================== */

@media screen and (max-width: 359px) {
  .nobo-footer {
    --footer-side-space: 18px;
  }

  .nobo-footer__nav {
    column-gap: 18px;
    row-gap: 26px;
  }

  .nobo-footer__nav-title {
    font-size: 16px;
    letter-spacing: 0;
  }

  .nobo-footer .nobo-footer__nav-link {
    font-size: 15px;
  }
}

/* ========================================
   動きを抑える設定
======================================== */

@media (prefers-reduced-motion: reduce) {
  .nobo-footer .nobo-footer__nav-link,
  .nobo-footer .nobo-footer__legal-list a,
  .nobo-footer .nobo-footer__pagetop {
    transition: none;
  }
}