﻿/* ========================================
   リセット & ベース
======================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans JP', sans-serif;
  background: #fff;
  color: #291900;
  overflow-x: hidden;
}

/* ========================================
   レスポンシブ切り替え（768px ブレイク）
======================================== */
.pc-only { display: none; }
.sp-only { display: block; }

@media (min-width: 768px) {
  .pc-only { display: block; }
  .sp-only { display: none; }

  /* flex を使う PC 専用要素 */
  .header__cta.pc-only {
    display: flex;
  }
}

/* ========================================
   ヘッダー（Figma header node-id=1395-2326）
======================================== */
.header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  min-height: 62px;
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .header {
    min-height: 105px;
    padding: 12px 40px;
  }
}

/* ロゴ:西村あさひ法律事務所・外国法共同事業（Figma: #8d3a00, 32px, 400） */
.header__logo {
  font-family: 'Noto Serif JP', serif;
  font-size: 19px;
  font-weight: 400;
  color: #8d3a00;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

@media (min-width: 768px) {
  .header__logo {
    font-size: 32px;
  }
}

/* PC ヘッダー CTA エリア
   ※ display は .pc-only / @media で制御するため
      ここでは display を指定しない */
.header__cta {
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* 電話ボタン（Figma cta_hero_call node-id=1397-8498） */
.header__phone {
  display: inline-flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 9.21px;
  width: 100%;
  max-width: 356px;
  padding: 7.36px 29.46px 5.52px 29.46px;
  background: linear-gradient(90deg, #FF6A00 0%, #FF9549 50%, #FF6A00 95%);
  box-shadow: 0px 4px 4px rgba(91, 91, 91, 0.25);
  border-radius: 1.84px;
  color: #fff;
  text-decoration: none;
  transition: opacity 0.2s;
  box-sizing: border-box;
}

.header__phone:hover {
  opacity: 0.95;
}

/* 1行目: お急ぎの方はこちらに電話ください */
.header__phone-label {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  text-align: center;
  color: #fff;
  font-size: 18px;
  font-family: 'A-OTF Ryumin Pr6N', 'Noto Serif JP', serif;
  font-weight: 700;
  letter-spacing: 0.36px;
  word-wrap: break-word;
  line-height: 1.38;
}

/* 2行目: アイコン + 番号 */
.header__phone-row {
  display: inline-flex;
  align-self: stretch;
  justify-content: center;
  align-items: center;
  gap: 5.52px;
}

.header__phone-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header__phone-icon svg {
  display: block;
  width: 46px;
  height: 30px;
}

/* 0120-586-270 */
.header__phone-number {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: right;
  color: #FFFF00;
  font-size: 35.4px;
  font-family: 'A-OTF Ryumin Pr6', 'Noto Serif JP', serif;
  font-weight: 550;
  letter-spacing: 3.74px;
  word-wrap: break-word;
  line-height: 1.16;
}

/* LINE ボタン */
.header__line {
  display: flex;
  align-items: center;
  gap: 4.13px;
  background: linear-gradient(125deg, #05c756 0%, #35ce75 46.6%, #05c756 100%);
  color: #fff;
  text-decoration: none;
  border-radius: 1.65px;
  padding: 9.09px 24.79px 6.61px 10.74px;
  height: 81px;
  width: 361px;
  transition: opacity 0.2s;
}

.header__line:hover {
  opacity: 0.9;
}

.header__line-icon {
  width: 65px;
  height: 65px;
  object-fit: contain;
  flex-shrink: 0;
}

.header__line-text {
  display: flex;
  flex-direction: column;
  gap: 0;
  align-items: center;
}

.header__line-label {
  font-size: 14px;
  font-weight: 700;
  color: #FFFCFC;
  letter-spacing: 0.48px;
}

.header__line-action {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 24.3px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 1.22px;
  margin-top: -5px;
}

/* ========================================
   セクション画像（共通）
======================================== */
.section-img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
}

/* SP セクション */
.sp-section {
  width: 100%;
}

/* PC セクション */
.pc-section {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
}

/* フッター */
.pc-footer {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
}

/* フッター（リンク付き・LP・下層ページ共通） */
.footer-links {
  background: #E8710A;
  color: #fff;
  padding: 36px 24px 24px;
  width: 100%;
}
.footer-links__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  justify-content: center;
  margin-bottom: 24px;
}
.footer-links__nav a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.2s;
}
.footer-links__nav a:hover {
  color: #fff;
  text-decoration: underline;
}
.footer-links__copy {
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}
@media (max-width: 767px) {
  .footer-links {
    padding: 28px 16px 20px;
  }
  .footer-links__nav {
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
  }
  .footer-links__nav a {
    font-size: 13px;
  }
  .footer-links__copy {
    font-size: 11px;
  }
}

/* ========================================
   CTA セクション（画像＋クリッカブルオーバーレイ）
======================================== */
.cta-wrap {
  position: relative;
  width: 100%;
}

/* SPのCTA: 390 × 956 のアスペクト比 */
.cta-sp {
  aspect-ratio: 390 / 956;
  max-width: 100%;
}

/* PCのCTA: 1440 × 1101 のアスペクト比 */
.cta-pc {
  aspect-ratio: 1440 / 1101;
  max-width: 1440px;
  margin: 0 auto;
}

/* CTA内の背景画像: コンテナを完全に埋める（直接の子img のみ） */
.cta-wrap > img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  display: block;
}

/* オーバーレイ（透明なクリック領域） */
.cta-btn {
  position: absolute;
  display: block;
  cursor: pointer;
  z-index: 10;
  /* デバッグ用: background: rgba(255,0,0,0.2); */
}

/* ── SP 電話CTA（テキストコーディング / 計測対応）
   Figma node 1412-649: 360×180px
   cta-sp (aspect-ratio 390/956) 内での位置: top 68.8%, height 18.8%
*/
.cta-phone--sp {
  position: absolute;
  left: 3.8%;
  top: 68.8%;
  width: 92.3%;
  height: 18.8%;
  display: flex;
  flex-direction: column;
  border: 1px solid #FF6A00;
  overflow: hidden;
  text-decoration: none;
  border-radius: 2px;
  z-index: 10;
  transition: opacity 0.2s;
  box-sizing: border-box;
}

.cta-phone--sp:hover {
  opacity: 0.92;
}

/* 上部バナー（Figma: 360×115px = 63.9% of 180px） */
.cta-phone-sp__banner {
  flex: 0 0 63.9%;
  background-image: url('images/cta-phone-bg.png');
  background-size: cover;
  background-position: center 30%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cta-phone-sp__banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 106, 0, 0.19);
}

/* テキスト: お急ぎの方は / こちらに電話ください!! */
.cta-phone-sp__label {
  position: relative;
  z-index: 1;
  color: #fff;
  font-family: 'A-OTF Ryumin Pr6N', 'Noto Serif JP', serif;
  font-size: min(4.95vw, 19.32px);
  font-weight: 700;
  text-align: center;
  line-height: 1.52;
  letter-spacing: 0.77px;
  text-shadow: 0 2px 11px rgba(0, 0, 0, 0.7);
  margin: 0;
}

/* 下部: 白背景＋電話番号 */
.cta-phone-sp__row {
  flex: 1;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5.65px;
}

.cta-phone-sp__icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.cta-phone-sp__icon img {
  width: min(9.15vw, 35.7px);
  height: auto;
  display: block;
}

/* 電話番号: 0120-586-270 */
.cta-phone-sp__number {
  font-family: 'A-OTF Ryumin Pr6', 'Noto Serif JP', serif;
  font-size: min(9.8vw, 38.24px);
  font-weight: 550;
  color: #FF6A00;
  letter-spacing: 2.68px;
  line-height: 1;
  white-space: nowrap;
}

/* ── SP LINE CTA: 画面幅に応じて崩れないよう調整
   cta-sp (aspect-ratio 390/956) 内での位置: top 89.5%, height 8.4%
*/
.cta-wrap.cta-sp .btn-line {
  position: absolute;
  left: 3.7%;
  top: 89.5%;
  width: 92.6%;
  min-height: 52px;
  height: 8.4%;
  box-sizing: border-box;
  z-index: 10;
  overflow: hidden;
  padding: 6px 10px 6px 8px;
  gap: 6px;
  align-items: center;
}

/* SP LINE CTA：画像表示（cta_hero_line.png） */
.cta-wrap.cta-sp .btn-line .btn-line__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}
.cta-wrap.cta-sp .btn-line:has(.btn-line__img) {
  padding: 0;
}

/* PC LINE CTA: 画像表示（cta_hero_line.png） */
.cta-wrap.cta-pc .btn-line:has(.btn-line__img) {
  padding: 0;
  background: transparent;
  border-radius: 1.65px;
  overflow: hidden;
  width: 100%;
  max-width: 905px;
  height: 110px; /* 固定高さ: 画面幅によるサイズ変動を防ぐ */
}

.cta-wrap.cta-pc .btn-line .btn-line__img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

/* アイコン: 幅に応じて縮小しつつ最小サイズを確保 */
.cta-wrap.cta-sp .btn-line .btn-line__icon {
  width: min(14vw, 52px);
  height: min(14vw, 52px);
  min-width: 36px;
  min-height: 36px;
  flex-shrink: 0;
}

/* テキストエリア: はみ出さないように縮小可能に */
.cta-wrap.cta-sp .btn-line .btn-line__body {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.cta-wrap.cta-sp .btn-line .btn-line__row {
  gap: 4px;
  flex-wrap: nowrap;
  min-width: 0;
  line-height: 1.3;
}

/* フォント: clamp で画面幅に応じて可読かつはみ出さないサイズに */
.cta-wrap.cta-sp .btn-line .btn-line__24h {
  font-size: clamp(11px, 3.8vw, 18px);
  white-space: nowrap;
  flex-shrink: 0;
}

.cta-wrap.cta-sp .btn-line .btn-line__team {
  font-size: clamp(10px, 3.4vw, 16px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.cta-wrap.cta-sp .btn-line .btn-line__lead {
  font-size: clamp(13px, 5vw, 22px);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  min-width: 0;
}

/* ── LINE ボタン（正解 20260212_new に合わせた見た目） ── */
.btn-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4.13px;
  padding: 9.09px 24.79px 6.61px 10.74px;
  background: #05C756;
  border-radius: 1.65px;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}
.btn-line__icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}
.btn-line__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}
.btn-line__row {
  display: inline-flex;
  align-items: center;
  gap: 6.61px;
  margin-bottom: 2px;
}
.btn-line__24h {
  color: #FFFF00;
  font-size: 18.18px;
  font-weight: 700;
}
.btn-line__team {
  color: #fff;
  font-size: 16.52px;
  font-weight: 700;
}
.btn-line__lead {
  color: #fff;
  font-size: 24.32px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

/* ── PC CTA オーバーレイボタン群（20260212_new 準拠） ──
   aspect-ratio 1440/1101 の cta-pc コンテナ内で
   bottom: 6% = キャンバス下から約 66px 相当の位置
*/
.cta-wrap.cta-pc .cta-buttons--overlay {
  position: absolute;
  left: 50%;
  bottom: 4%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  width: 90%;
  max-width: 905px;
  z-index: 10;
}

/* 電話 CTA ブロック */
.cta-phone--block {
  display: block;
  position: relative;
  width: 100%;
  max-width: 905px;
  height: 180px;
  background: #fff;
  border: 2px solid #76B54F;
  border-radius: 2px;
  box-shadow: 0 3px 14px rgba(13, 86, 0, 0.35);
  overflow: hidden;
  text-decoration: none;
  transition: opacity 0.2s;
}

.cta-phone--block:hover {
  opacity: 0.92;
}

/* 背景画像エリア（左側の人物写真） */
.cta-phone--block .cta-phone__bg {
  position: absolute;
  left: 0;
  top: 0;
  width: 370px;
  height: 180px;
}

.cta-phone--block .cta-phone__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ラベル: お急ぎの方はこちらに電話ください!! */
.cta-phone--block .cta-phone__label {
  position: absolute;
  left: 380px;
  top: 21px;
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  color: #FF6A00;
  letter-spacing: 1.12px;
  white-space: nowrap;
}

/* アイコン + 電話番号 行 */
.cta-phone--block .cta-phone__row {
  position: absolute;
  left: 319px;
  top: 72px;
  right: 24px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 11px;
}

.cta-phone--block .cta-phone__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 67px;
  height: 67px;
  flex-shrink: 0;
}

.cta-phone--block .cta-phone__icon img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

/* 電話番号: 0120-586-270 */
.cta-phone--block .cta-phone__number {
  font-size: 63.57px;
  font-weight: 550;
  color: #FF6A00;
  letter-spacing: 5.15px;
  text-align: right;
  line-height: 1;
}

/* ========================================
   ホバーエフェクト（CTA ボタン）
======================================== */
.cta-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
}

/* ========================================
   SP 追従CTA（LINE・電話）画像を切らさず画面幅に収める
======================================== */
.sp-sticky-cta {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 300;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 767px) {
  .sp-sticky-cta.sp-only {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: stretch;
    width: 100%;
    max-width: 100%;
    height: 72px;
  }
  .sp-sticky-cta a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    text-decoration: none;
    box-sizing: border-box;
    overflow: hidden;
    padding: 0;
  }
  /* LINE 7割・電話 3割 */
  .sp-sticky-cta__line {
    flex: 7 1 0;
    width: 60%;
    max-width: 60%;
    min-width: 0;
  }
  .sp-sticky-cta__tel {
    flex: 3 1 0;
    width: 40%;
    max-width: 40%;
    min-width: 0;
  }
  .sp-sticky-cta img {
    width: 100%;
    height: 97%;
    max-width: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
  }
  /* 追従バナー分の余白（コンテンツが隠れないように） */
  main { padding-bottom: 72px; }
}

@media (min-width: 768px) {
  .sp-sticky-cta { display: none !important; }
}

/* ========================================
   アクセシビリティ補助
======================================== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* フォーカス表示 */
a:focus-visible,
button:focus-visible {
  outline: 3px solid #ff6a00;
  outline-offset: 2px;
  border-radius: 2px;
}
