/* =========================================================
   layout.css — ヘッダー・フッター・セクション枠
   ========================================================= */

/* ---- コンテナ ---- */
.l-inner {
  width: 100%;
  max-width: calc(var(--content-max) + var(--content-pad) * 2);
  margin-inline: auto;
  padding-inline: var(--content-pad);
}
.l-inner--narrow { max-width: 840px; }

.l-main { display: block; }

/* ---- セクション共通余白 ---- */
.l-section {
  padding-block: 56px;
}
@media (min-width: 1024px) {
  .l-section { padding-block: 88px; }
}

/* =========================================================
   ヘッダー（追従）  PC は Figma 1440 実測値
   ========================================================= */
.l-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(255, 255, 255, .95);
  border-bottom: 1px solid #dcfce7;
  transition: box-shadow .25s var(--ease);
}
.l-header.is-scrolled { box-shadow: 0 2px 14px rgba(35, 52, 45, .10); }
/* ヘッダー分の本文押し下げ */
.l-main { padding-top: var(--header-h); }

.l-header__inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 100%;
  padding: 0 16px 0 12px;
}
.l-header__logo { flex: none; }
.l-header__logo-img { width: auto; height: 50px; }

/* ---- グローバルナビ ---- */
.l-gnav__list { display: flex; gap: 24px; }
.l-gnav__item a {
  color: #24352d;
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  transition: color .2s var(--ease);
}
.l-gnav__item a:hover { color: #0a9d58; }
.l-gnav__actions { display: flex; align-items: center; gap: 12px; }

/* Instagram（ヘッダー）。PCはアイコンのみ、ドロワーでは文字も出す */
.l-gnav__sns {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  color: #24352d;
  font-size: 1.5rem;
  font-weight: 700;
  transition: color .2s var(--ease);
}
.l-gnav__sns:hover { color: #e1306c; }
.l-gnav__sns .c-icon { width: 26px; height: 26px; }

/* ヘッダーの見積もりボタン（200×51・角丸4px・グラデ） */
.l-gnav__actions .c-btn--mail {
  gap: 9px;
  height: 51px;
  padding: 0 24px;
  border-radius: 4px;
  font-size: 2rem;
  line-height: 1;
  box-shadow: 0 6px 16px rgba(238, 120, 0, .18);
}
.l-gnav__actions .c-btn--mail .c-icon { width: 11px; height: 11px; }

/* ---- PC（1280〜）：横並び ---- */
.l-header__toggle { display: none; }
@media (min-width: 1280px) {
  .l-header__inner { padding: 0 24px 0 18px; }
  .l-header__logo-img { width: 210px; height: auto; }
  .l-gnav {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
  }
  .l-gnav__list { gap: 16px; }
  /* 横並びナビのときは Instagram をアイコンのみにする */
  .l-gnav__sns { width: 40px; height: 40px; justify-content: center; gap: 0; }
  .l-gnav__sns .c-icon { width: 26px; height: 26px; }
  /* 文字は見た目だけ隠す（読み上げには残す） */
  .l-gnav__sns-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .l-gnav__actions .c-tel__link { height: 46px; padding: 0 13px; }
  .l-gnav__actions .c-tel__num { font-size: 2.2rem; }
  .l-gnav__actions .c-btn--mail { width: 168px; height: 46px; padding: 0; font-size: 1.7rem; }
}
@media (min-width: 1440px) {
  .l-header__inner { padding: 0 38px 0 18px; }
  .l-header__logo-img { width: 250px; height: 68px; }
  .l-gnav__list { gap: 18px; } /* Instagram を足した分、24px から少し詰めている */
  .l-gnav__sns .c-icon { width: 28px; height: 28px; }
  .l-gnav__actions .c-tel__link { width: 240px; height: 50px; padding: 0 15px; }
  .l-gnav__actions .c-tel__num { font-size: 2.8rem; }
  .l-gnav__actions .c-btn--mail { width: 200px; height: 51px; font-size: 2rem; }
}

/* ---- 〜1279px：ナビをドロワー化 ---- */
@media (max-width: 1279px) {
  .l-header__inner { justify-content: space-between; }
  .l-gnav {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(86vw, 340px);
    height: 100dvh;
    background: #fff;
    box-shadow: -8px 0 30px rgba(35, 52, 45, .18);
    transform: translateX(100%);
    transition: transform .32s var(--ease);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 8px;
    padding: calc(var(--header-h) + 24px) 24px 32px;
    overflow-y: auto;
  }
  .l-gnav.is-open { transform: translateX(0); }
  .l-gnav__list { flex-direction: column; gap: 4px; }
  .l-gnav__item a {
    display: block;
    padding: 16px 8px;
    font-size: 1.7rem;
    border-bottom: 1px solid var(--c-border);
  }
  .l-gnav__actions {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    margin-top: 20px;
  }
  .l-gnav__actions .c-btn--mail { width: 100%; }
  .l-gnav__sns {
    order: -1;
    justify-content: center;
    height: 46px;
    border: 1px solid var(--c-border);
    border-radius: 9999px;
  }

  /* ハンバーガー */
  .l-header__toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    z-index: 120;
  }
  .l-header__toggle-bar {
    display: block;
    width: 100%;
    height: 2px;
    background: #0a9d58;
    border-radius: 2px;
    transition: transform .3s var(--ease), opacity .3s var(--ease);
  }
  .l-header__toggle[aria-expanded="true"] .l-header__toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .l-header__toggle[aria-expanded="true"] .l-header__toggle-bar:nth-child(2) { opacity: 0; }
  .l-header__toggle[aria-expanded="true"] .l-header__toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* ドロワー展開時の背景オーバーレイ */
  body.is-nav-open::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(35, 52, 45, .4);
    z-index: 90;
  }
}

/* =========================================================
   ページヘッダー（下層）
   ========================================================= */
.c-page-head {
  background: var(--c-green-light);
  padding-block: 40px;
  text-align: center;
}
@media (min-width: 1024px) {
  .c-page-head { padding-block: 64px; }
}
.c-page-head__en {
  display: block;
  color: var(--c-orange);
  font-weight: 700;
  letter-spacing: .12em;
  font-size: 1.3rem;
  margin-bottom: 8px;
}
.c-page-head__ja {
  font-size: 2.6rem;
}
@media (min-width: 1024px) {
  .c-page-head__ja { font-size: 3.4rem; }
}

/* =========================================================
   パンくず
   ========================================================= */
.c-breadcrumb {
  padding-top: calc(var(--header-h) + 12px);
  padding-bottom: 4px;
  font-size: 1.3rem;
  color: var(--c-text-muted);
}
body.is-front .c-breadcrumb { padding-top: 12px; }
.c-breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  align-items: center;
}
.c-breadcrumb li {
  display: flex;
  align-items: center;
  gap: 8px;
}
.c-breadcrumb li:not(:last-child)::after {
  content: "›";
  color: var(--c-border);
}
.c-breadcrumb a { color: var(--c-text-muted); }
.c-breadcrumb a:hover { color: var(--c-green); }
.c-breadcrumb [aria-current="page"] { color: var(--c-text); }

/* =========================================================
   フッター（Figma y11401〜11778：白地・高さ376.5）
   ========================================================= */
.l-footer {
  background: #fff;
  padding: 48px 16px 32px;
  border-bottom: 2px solid #f3f4f6;
}
.l-footer__inner { display: grid; gap: 36px; max-width: 1160px; margin-inline: auto; }
.l-footer__logo { display: inline-block; }
.l-footer__logo img { width: 260px; height: auto; }
.l-footer__address { color: #9ca3af; font-size: 1.1rem; line-height: 16px; }
.l-footer__contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  margin-top: 12px;
}
.l-footer__contact-label { color: #0a9d58; font-size: 1.2rem; font-weight: 700; line-height: 18px; }
.l-footer .c-tel--plain .c-tel__icon { display: none; }
.l-footer .c-tel--plain .c-tel__link { gap: 0; }
.l-footer .c-tel--plain .c-tel__num { margin-top: 1px; font-size: 3.3rem; line-height: 36px; }
.l-footer .c-tel--plain .c-tel__hours { margin-top: 2px; font-size: 1.2rem; font-weight: 400; line-height: 16px; }
.l-footer__mail {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 234px;
  height: 50px;
  border-radius: 9999px;
  background: #f08b39;
  color: #fff;
  font-size: 1.7rem;
  font-weight: 700;
  transition: background-color .2s var(--ease), transform .2s var(--ease);
}
.l-footer__mail:hover { background: #e6883b; color: #fff; transform: translateY(-2px); }
.l-footer__sns { margin-top: 20px; }
.l-footer__sns-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #6b7280;
  font-size: 1.3rem;
  font-weight: 700;
  transition: color .2s var(--ease);
}
.l-footer__sns-link:hover { color: #e1306c; }
.l-footer__sns-link .c-icon { width: 22px; height: 22px; }

.l-footer__copy {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 2px solid #f3f4f6;
  color: #9ca3af;
  font-size: 1.1rem;
  line-height: 16px;
}

.l-footer__menus { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 16px; }
.l-footer__col-title { color: #087a45; font-size: 1.4rem; font-weight: 700; line-height: 20px; }
.l-footer__col ul { display: grid; margin-top: 11.7px; }
.l-footer__col li,
.l-footer__col a { color: #6b7280; font-size: 1.2rem; font-weight: 400; line-height: 24px; }
.l-footer__col a:hover { color: #0a9d58; }

@media (min-width: 768px) {
  .l-footer__menus { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
/* 1280〜1439px はヘッダーの余白が少ないので、ナビの間隔を詰めて Instagram の場所を作る */
@media (min-width: 1280px) and (max-width: 1439px) {
  .l-gnav__list { gap: 10px; }
  .l-gnav__actions { gap: 8px; }
  .l-gnav__sns { width: 36px; }
}

/* デザイン実寸の横並びは、合計幅1192pxが収まる幅から適用する
   （1024〜1239px はタブレット同様の縦積みレイアウト） */
@media (min-width: 1240px) {
  .l-footer { height: 376.5px; padding: 0; }
  .l-footer__inner { grid-template-columns: 496px 1fr; gap: 0 39.9px; }
  .l-footer__logo { margin-top: 50.1px; }
  .l-footer__logo img { width: 362.5px; height: 98.6px; }
  .l-footer__contact { flex-wrap: nowrap; gap: 0; margin-top: 11.6px; }
  .l-footer__tel { width: 254px; }
  .l-footer__copy { margin-top: 43.6px; padding-top: 24.6px; }
  .l-footer__menus { grid-template-columns: repeat(4, 164px); gap: 0; padding-top: 90.7px; }
  /* コピーライトは左列の下端へ（メニュー列の高さに引きずられないよう 1行目に重ねて下揃え） */
  .l-footer__brand { grid-area: 1 / 1; }
  .l-footer__menus { grid-area: 1 / 2 / span 2; }
  .l-footer__copy  { grid-area: 2 / 1; margin-top: 43.6px; }
  .l-footer__sns   { grid-area: 2 / 2; align-self: end; margin: 0 0 4px; }
}

/* フッター下のSP追従CTA分の余白 */
@media (max-width: 767px) {
  .l-footer { margin-bottom: 60px; }
}

/* =========================================================
   SP追従CTA（電話 / メール）
   ========================================================= */
.l-fixed-cta {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 95;
  display: grid;
  grid-template-columns: 1fr 1fr;
  box-shadow: 0 -2px 12px rgba(35, 52, 45, .16);
  transform: translateY(100%);
  visibility: hidden;
  transition: transform .3s var(--ease), visibility .3s var(--ease);
}
.l-fixed-cta.is-visible { transform: none; visibility: visible; }
.l-fixed-cta__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 60px;
  color: #fff;
  font-weight: 700;
  font-size: 1.5rem;
}
.l-fixed-cta__btn .c-icon { width: 20px; height: 20px; }
.l-fixed-cta__btn--tel { background: var(--c-green); }
.l-fixed-cta__btn--mail { background: var(--c-orange); }
@media (min-width: 768px) {
  .l-fixed-cta { display: none; }
}
