/* ============================================
   layout.css
   l- 接頭辞：ページ骨格（ヘッダー / フッター / ドロワー / CTAセクション等）
   ============================================ */


/* ============================================
   l-header
   ============================================ */
.l-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: var(--header-bg);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              background 0.3s ease;
  border-radius: 0 0 1.5rem 1.5rem;
}

.l-header.is-hidden {
  transform: translateY(-100%);
}

.l-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  /* padding: 0 2.5rem; CTAボタンが復活したらこちらに戻す*/
  padding: 0 4rem 0 2.5rem;  
  gap: 2rem;
}

/* ロゴ */
.l-header__logo {
  flex-shrink: 0;
  line-height: 0;
}

.l-header__logo img {
  height: 37px;
  width: auto;
}

/* グローバルナビ */
.l-header__nav {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

.l-header__nav-list {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.l-header__nav-list li {
  display: flex;
  align-items: center;
}

.l-header__nav-list a {
  font-family: var(--font-round);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
  white-space: nowrap;
  letter-spacing: var(--tracking-normal);
  transition: color 0.2s;
}

.l-header__nav-list a:hover {
  color: var(--color-primary);
}

/* ヘッダー右アクション */
.l-header__actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* ヘッダー内CTAボタン */
.l-header__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.5rem;
  background: var(--color-denki);
  color: var(--color-white);
  font-family: var(--font-round);
  font-size: var(--text-sm);
  font-weight: 700;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  transition: opacity 0.2s;
  /* ハンバーガーボタン分の右余白を確保 */
  margin-right: 3.625rem;
}

.l-header__cta:hover {
  opacity: 0.85;
}

/* ========================================
   ハンバーガーボタン（固定配置・全ページ共通）
   ======================================== */
.l-hamburger {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 300;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--color-primary);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: background 0.3s ease, opacity 0.2s;
}

.l-hamburger:hover {
  opacity: 0.85;
}

.l-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-white);
  border-radius: 2px;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              opacity  0.25s ease;
}

/* バッテン（×）アニメーション */
.l-hamburger.is-active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.l-hamburger.is-active span:nth-child(2) {
  transform: scaleX(0);
  opacity: 0;
}
.l-hamburger.is-active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* SP */
@media (max-width: 768px) {
  .l-header {
    /* SP はスクロールで隠さない（常時表示） */
    transform: none !important;
    border-radius: 0 0 1rem 1rem;
  }

  .l-header__inner {
    padding: 0 1rem;
    gap: 0.5rem;
  }

  .l-header__logo img {
    height: 25px;
  }

  .l-header__nav {
    display: none;
  }

  .l-header__cta {
    padding: .25rem 1rem;
    border-radius: var(--radius-lg);
    /* SP ではハンバーガー分の余白を縮小 */
    margin-right: 3rem;
  }

  /* SP のハンバーガーは小さめ */
  .l-hamburger {
    top: 0.75rem;
    right: 0.75rem;
    width: 34px;
    height: 34px;
    gap: 3px;
  }

  .l-hamburger span {
    width: 14px;
  }

  .l-hamburger.is-active span:nth-child(1) {
    transform: translateY(5px) rotate(45deg);
  }
  .l-hamburger.is-active span:nth-child(3) {
    transform: translateY(-5px) rotate(-45deg);
  }
}


/* ============================================
   l-drawer
   ============================================ */
.l-drawer {
  position: fixed;
  inset: 0;
  z-index: 200;
  /* visibility は transition 後に切り替えるため pointer-events で制御 */
  pointer-events: none;
}

.l-drawer.is-open {
  pointer-events: auto;
}

/* オーバーレイ（背景暗転） */
.l-drawer__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity 0.35s ease;
  cursor: pointer;
}

.l-drawer.is-open .l-drawer__overlay {
  opacity: 1;
}

/* パネル本体 */
.l-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  width: 560px;
  max-width: 100%;
  height: 100%;
  background: var(--color-bg-blue-light);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  /* easeInQuart（閉じる）- 速く始まり遅く終わる印象を逆転させてスライドアウト感を出す */
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overscroll-behavior: contain;
  border-radius: 1.5rem 0 0 1.5rem;
}

.l-drawer.is-open .l-drawer__panel {
  transform: translateX(0);
  /* easeOutQuart（開く）- ゆっくり止まる */
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 縦中央配置ラッパー */
.l-drawer__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 2.5rem 3.5rem 3.5rem;
  gap: 1.25rem;
  min-height: 0;
  overflow-y: scroll;
}

/* パネルヘッダー（ブランドロゴ・センター） */
.l-drawer__header {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.l-drawer__logo {
  height: 40px;
  width: auto;
}

/* パネルボディ */
.l-drawer__body {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* サービスナビカード */
.l-drawer__nav-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-primary);
  filter: drop-shadow(6px 6px 0px var(--color-primary));
}

.l-drawer__nav-list {
  display: flex;
  flex-direction: column;
}

.l-drawer__nav-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.125rem 1.5rem;
  transition: background 0.2s;
  min-height: 68px;
}

.l-drawer__nav-item:hover {
  background: rgba(0, 131, 206, 0.05);
}

.l-drawer__nav-list li + li .l-drawer__nav-item {
  border-top: 1px dashed var(--color-primary);
}

/* ロゴ画像 */
.l-drawer__nav-logo {
  height: 34px;
  width: auto;
  max-width: 100%;
  display: block;
}

/* CTAボタンラッパー（カード内・ボーダー上区切り） */
.l-drawer__nav-cta {
  padding: 1.5rem 1.25rem;
  border-top: 1px dashed var(--color-primary);
}

/* ドロワー内CTAボタン */
.l-drawer__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.875rem 1.5rem;
  background: var(--color-denki);
  color: var(--color-white);
  font-family: var(--font-round);
  font-size: var(--text-base);
  font-weight: 700;
  border-radius: var(--radius-xl);
  transition: opacity 0.2s;
}

.l-drawer__cta:hover {
  opacity: 0.85;
}

/* お問い合わせカード */
.l-drawer__contacts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.l-drawer__contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--color-white);
  border-radius: var(--radius-md);
  transition: box-shadow 0.2s;
  border: 1px solid var(--color-primary);
}

.l-drawer__contact-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.l-drawer__contact-icon {
  font-size: 24px;
  color: var(--color-primary);
}

.l-drawer__contact-title {
  font-family: var(--font-round);
  font-size: 16px;
  font-weight: 900;
  color: var(--color-primary);
  line-height: var(--leading-none);
}

.l-drawer__contact-desc {
  font-size: 12px;
  color: var(--color-primary);
  line-height: var(--leading-normal);
  flex: 1;
}

.l-drawer__contact-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.6rem 0.5rem;
  background: var(--color-primary);
  color: var(--color-white);
  font-family: var(--font-round);
  font-size: 14px;
  font-weight: 900;
  border-radius: var(--radius-xl);
  transition: opacity 0.2s;
}

.l-drawer__contact-btn:hover {
  opacity: 0.85;
}

/* SP: ドロワーはほぼ全幅 */
@media (max-width: 768px) {
  .l-drawer__panel {
    width: 100%;
    border-radius: 0;
  }

  .l-drawer__content {
    padding: 2.5rem 1.5rem 3.5rem;
    gap: 1rem;
  }

  .l-drawer__nav-item {
    padding: 1rem 1.25rem;
    min-height: 60px;
  }

  .l-drawer__contacts {
    grid-template-columns: 1fr;
  }
  .l-drawer__contact-btn{
    width: 200px;
  }
}


/* ============================================
   l-cta（お問い合わせCTAセクション）
   ============================================ */
.l-cta {
  background: var(--gradient-cta);
  padding: var(--section-py) var(--section-px) calc(var(--section-py) + 1.5rem);
}

.l-cta__inner {
  max-width: var(--content-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 3.5rem;
}
.l-cta__title-desc{
  display: grid;
  gap: 1.5rem;
}
.l-cta__title {
  font-family: var(--font-round);
  font-size: var(--text-4xl);
  font-weight: 800;
  color: var(--color-white);
  line-height: var(--leading-tight);
}

.l-cta__desc {
  font-size: var(--text-base);
  color: var(--color-text-sub);
  line-height: var(--leading-loose);
  max-width: var(--content-narrower);
}

/* お問い合わせカード2枚 */
.l-cta__cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  width: 100%;
  max-width: 800px;
}

.l-cta__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: #ffffff10;
  border: 1px solid #ffffff40;
  border-radius: var(--radius-lg);
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.l-cta__card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.l-cta__card-icon {
  font-size: 32px;
  color: var(--color-white);
}

.l-cta__card-title {
  font-family: var(--font-round);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-white);
  line-height: var(--leading-tight);
}

.l-cta__card-desc {
  font-size: var(--text-sm);
  color: var(--color-white);
  line-height: var(--leading-normal);
  flex: 1;
}

.l-cta__card-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 200px;
  padding: 0.875rem 1.5rem;
  background: var(--color-white);
  color: #083056;
  font-family: var(--font-round);
  font-size: var(--text-base);
  font-weight: 700;
  border-radius: var(--radius-xl);
  transition: opacity 0.2s;
}

.l-cta__card-btn:hover {
  opacity: 0.85;
}

/* SP */
@media (max-width: 768px) {
  .l-cta {
    padding: var(--section-py) var(--section-px) calc(var(--section-py) + 1rem);
  }
  .l-cta__inner{
    max-width: none;
  }

  .l-cta__title {
    font-size: var(--text-4xl);
  }

  .l-cta__cards {
    grid-template-columns: 1fr;
    max-width: 342px;
  }

  .l-cta__card-btn {
    width: 100%;
  }
}


/* ============================================
   l-footer
   ============================================ */
.l-footer {
  background: var(--color-bg-gray);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  padding: 7.81vw 7.81vw 0;
  margin-top: -1.5rem;
}

.l-footer__inner {
  display: grid;
  grid-template-columns: 280px 1fr;
  padding: 0 0 2rem;
  margin: 0 auto;
}

/* フッターロゴ・説明文 */
.l-footer__brand {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.l-footer__logo {
  height: 57px;
  width: auto;
}

.l-footer__desc {
  font-size: 12px;
  line-height: var(--leading-loose);
}

/* フッターナビ */
.l-footer__nav {
  display: grid;
  grid-template-columns: repeat(3, max-content);
  gap: 4.38vw;
  justify-content: end;
}

.l-footer__nav-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.l-footer__nav-heading {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text);
}

.l-footer__nav-group ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.l-footer__nav-group a {
  font-size: var(--text-sm);
  color: var(--color-text-sub);
  transition: color 0.2s;
}

.l-footer__nav-group a:hover {
  color: var(--color-primary);
}

.l-footer__nav-sublist {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
  padding-left: .5rem;
}

.l-footer__nav-sublist a {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: var(--text-xs);
  color: var(--color-text-sub);
  transition: color 0.2s;
}

.l-footer__nav-sublist a::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 1px;
  background: var(--color-text-sub);
}

.l-footer__nav-sublist a:hover {
  color: var(--color-primary);
}

/* フッターボトム（著作権・法的リンク） */
.l-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 2rem 0;
  border-top: 1px solid var(--color-border);
  margin: 0 auto;
}
.l-footer__legal {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.l-footer__legal a {
  font-size: var(--text-xs);
  color: var(--color-text-sub);
  transition: color 0.2s;
}

.l-footer__legal a:hover {
  color: var(--color-primary);
}

.l-footer__copy {
  font-size: var(--text-xs);
  color: var(--color-text-sub);
}

/* SP */
@media (max-width: 768px) {
  .l-footer{
    padding: 3.5rem 1.5rem 0;
  }
  .l-footer__inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding-bottom: 1rem;
  }
  .l-footer__logo{
    height: 43px;
  }

  .l-footer__nav {
    grid-template-columns: 1fr 1fr 1fr;
    gap: .5em;
  }
  .l-footer__nav-group ul{
    gap: .5rem;
    li{
      line-height: var(--leading-tight);
    }
  }
  .l-footer__nav-sublist{
    padding-left: 0;
  }

  .l-footer__bottom {
    flex-direction: column-reverse;
    align-items: end;
    gap: 0.75rem;
    padding: 1rem 0 1.5rem;
  }
  .l-footer__copy{
    width: 100%;
    text-align: center;
  }
  .l-footer__legal {
    gap: 1rem;
  }
}

/* PC表示では改行を無効化（非表示） */
.sp-only {
  display: none;
}

/* スマホ表示（画面幅767px以下）で改行を有効化 */
@media screen and (max-width: 767px) {
  .sp-only {
    display: block;
  }
}


/* ============================================
   l-breadcrumb（下層ページ共通パンクズリスト）
   ============================================ */
.l-breadcrumb__list {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--color-white);
  border-radius: var(--radius-pill);
  font-size: 10px;
  line-height: var(--leading-none);
  color: var(--color-text-sub);
}

.l-breadcrumb__list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.l-breadcrumb__list li:not(:last-child)::after {
  content: '/';
  color: var(--color-text-sub);
  opacity: 0.5;
}

.l-breadcrumb__list a {
  color: var(--color-text-sub);
  transition: color 0.2s;
}

.l-breadcrumb__list a:hover {
  color: var(--color-page-key);
}

.l-breadcrumb__list li[aria-current="page"] {
  color: var(--color-text);
}