/* ========================================= */
/* アニメーション */
/* ========================================= */
.anim-box.fadeup.is-animated {
  animation: fadeup 5s cubic-bezier(0.33, 1, 0.68, 1) forwards;
}

@keyframes fadeup {
  0% {
    transform: translateY(30px);
    opacity: 0;
  }
  80% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== CSS変数 ===== */
:root {
  /* カラー */
  --primary: #003366; /* 深い紺色に変更 */
  --primary-light: #78b2e0; /* 元の色そのまま */
  --secondary: #b87333; /* 高級感あるブロンズ色 */
  --color-accent: #c0a060; /* ゴールド寄りのアクセントカラー */
  --secondary-dark: #8b541f;
  --accent: #c0a060; /* ゴールド寄りのアクセントカラー */
  --accent-dark: #997a3d;
  --text: #222; /* 少し濃い目のダークグレー */
  --text-light: #f9f9f9;
  --white: #fff;
  
  /* フォント */
  --font-main: 'Noto Serif JP', serif; /* 高級感ある明朝系に変更 */
  
  /* スペーシング */
  --space-xs: 5px;
  --space-sm: 10px;
  --space-md: 20px;
  --space-lg: 30px;
  --space-xl: 40px;
  
  /* シャドウ */
  --shadow-sm: 0 2px 6px rgba(0,0,0,0.15);
  --shadow-md: 0 6px 12px rgba(0,0,0,0.3);
  --shadow-lg: 0 10px 20px rgba(0,0,0,0.4);

  /* ボーダーラディウス */
  --border-radius-sm: 4px;
  --border-radius-md: 8px;
  --border-radius-lg: 12px;

}

/* ===== ベーススタイル ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth; /* スムーズスクロール */
}

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

a {
  text-decoration: none;
  color: var(--primary);
  transition: color 0.3s ease;
}

a:hover {
  color: var(--accent);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
  box-shadow: var(--shadow-sm);
}

section {
  padding: var(--space-xl) var(--space-md);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* ===== ボタンスタイル ===== */
.btn:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  opacity: 0.9;
}

.btn-primary-light {
  display: inline-block;
  font-weight: 700;
  padding: 7px 22px;  /* ←縦サイズを半分に */
  border-radius: 8px;
  color: var(--white) !important;
  box-shadow: 0 6px 12px rgba(0, 51, 102, 0.6);
  transition: all 0.3s ease;
  text-align: center;
  white-space: nowrap;
  font-family: var(--font-main);
  border: 1.5px solid var(--primary);
  background-clip: padding-box;
  cursor: pointer;
  letter-spacing: 0.05em;
  background-color: var(--primary); /* Consolidated from original duplicate */
}

.btn-primary-light:hover { /* Consolidated from original duplicate */
    background-color: #3a7bd5;
    opacity: 0.9;
}


.btn-secondary {
  display: inline-block;
  font-weight: 700;
  padding: 7px 22px;  /* ←縦サイズを半分に */
  border-radius: 8px;
  color: var(--white) !important;
  box-shadow: 0 6px 12px rgba(184, 115, 51, 0.6);
  transition: all 0.3s ease;
  text-align: center;
  white-space: nowrap;
  font-family: var(--font-main);
  border: 1.5px solid var(--secondary);
  background-clip: padding-box;
  cursor: pointer;
  letter-spacing: 0.05em;
  background: var(--secondary);
}

.btn-secondary:hover {
  background: var(--secondary-dark);
  border-color: var(--secondary-dark);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.btn-accent {
  display: inline-block;
  font-weight: 700;
  padding: 7px 22px;  /* ←縦サイズを半分に */
  border-radius: 8px;
  color: #fff !important;
  box-shadow: 0 6px 12px rgba(192, 160, 96, 0.7);
  transition: all 0.3s ease;
  text-align: center;
  white-space: nowrap;
  font-family: var(--font-main);
  border: 1.5px solid var(--accent);
  background-clip: padding-box;
  cursor: pointer;
  letter-spacing: 0.05em;
  background: var(--accent);
}

.btn-accent:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}


/* ===== ヘッダー ===== */
header {
  background: var(--primary-light);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
  font-family: var(--font-main);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-md);
}

.logo h1 {
  font-size: 1.6rem;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: 0.07em;
  font-family: var(--font-main);
  padding-top: 0.3em;    /* 上のスペース */
  padding-bottom: 0.3em; /* 下のスペース */
}

.logo h1 a {
  text-decoration: none;
  color: var(--white); /* ロゴ内のリンクの色を白に上書き */}

.logo h1 a:hover {
  color: var(--accent);
}

/* ナビゲーションメニューの初期状態 (モバイル用) */
.navbar {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 1.5s ease-out, opacity 0s ease-out;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: var(--primary-light);
}

.navbar ul {
  display: flex;
  gap: var(--space-md);
  list-style: none;
}

.navbar a {
  color: var(--white);
  font-weight: normal;
  font-size: 1rem;
  padding: var(--space-xs) 0;
  position: relative;
  font-family: var(--font-main);
}

.navbar a::after {
  content: '';
  position: absolute;
  bottom: 0px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width 0.7s ease;
  border-radius: 3px;
}

.navbar a:hover::after {
  width: 100%;
}

.header-contact {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
}

/* ===== ハンバーガーメニュー ===== */
.menu-toggle {
  display: none;
  cursor: pointer;
  width: 30px;
  height: 30px;
  position: relative;
  z-index: 10;
}

.menu-toggle span {
  transition: all 0.5s;
  position: absolute;
  height: 2px;
  background-color: var(--white);
  width: 100%;
  border-radius: 2px;
}

.menu-toggle span:nth-of-type(1) {
  top: 4px;
}

.menu-toggle span:nth-of-type(2) {
  top: 12px;
}

.menu-toggle span:nth-of-type(3) {
  top: 20px;
}

.menu-toggle.open span:nth-of-type(1) {
  top: 10px;
  transform: translateY(6px) rotate(-33deg);
}

.menu-toggle.open span:nth-of-type(2) {
  opacity: 0;
}

.menu-toggle.open span:nth-of-type(3) {
  top: 22px;
  transform: translateY(-6px) rotate(33deg);
}

/* ナビゲーションメニューが開いたときのアニメーション */
.navbar.active {
  max-height: 500px;
  opacity: 1;
  transition: max-height 1.5s ease-in, opacity 0s ease-in;
}

/* モバイルメニュー内のリンクスタイル */
.navbar.active ul {
  flex-direction: column;
  padding: var(--space-sm) var(--space-md);
  gap: var(--space-xs);
}

.navbar.active ul li {
  width: 100%;
  text-align: center;
}

.navbar.active ul li a {
  display: inline-block;
  padding: var(--space-xs) 2ch;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* ===== デスクトップ用スタイル（メニューバーを中央に） ===== */
@media (min-width: 992px) {
  .header-container {
    justify-content: flex-start;
  }

  .logo {
    margin-right: auto;
    order: 1;
  }

  .navbar {
    position: static;
    max-height: unset;
    opacity: 1;
    transition: none;
    width: auto;
    box-shadow: none;
    order: 2;
    margin-left: auto;
    margin-right: auto;
    display: block; /* デスクトップで表示されない場合の対策 */
  }

  .navbar ul {
    flex-direction: row;
    padding: 0;
    gap: var(--space-md);
  }

  .navbar a {
    display: inline-block;
    padding: var(--space-xs) 0;
    width: auto;
    text-align: left;
    position: relative; /* 下線のために必須 */
  }

  .header-contact {
    order: 3;
    margin-left: auto;
  }

  .menu-toggle {
    display: none;
  }
}

/* ===== ヒーローセクション ===== */
.hero {
  background: url('01-2.jpg') top center/auto 100% repeat-x;
  color: var(--white);
  text-align: center;
  padding: 7.5rem var(--space-md);
  position: relative;
  font-family: var(--font-main);
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

.hero h2 {
  font-size: 2.05rem;
  margin-bottom: var(--space-md);
  text-shadow: 0 2px 6px rgba(0,0,0,0.6);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.hero p {
  font-size: 1.05rem;
  margin-bottom: var(--space-lg);
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
  font-weight: 400;
}

/* ===== セクションタイトル ===== */
.section-title {
  text-align: center;
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: var(--space-xl);
  position: relative;
  font-family: var(--font-main);
  letter-spacing: 0.07em;
  color: #000;
}

.section-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 5px;
  background: var(--primary);
  margin: var(--space-sm) auto 0;
  border-radius: 3px;
}

/* ===== サービスセクション ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.service-card {
  background: var(--white);
  border-radius: 12px;
  padding: var(--space-lg);
  text-align: center;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  font-family: var(--font-main);
}

.service-card i {
  font-size: 2.5rem;
  margin-bottom: var(--space-sm);
  color: var(--primary);
}

.service-card h3 {
  font-size: 1.375rem;
  margin-bottom: var(--space-sm);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

/* ===== 料金セクション ===== */ 
.price-section {
  max-width: 650px;
  margin: var(--space-xl) auto;
  padding: var(--space-lg);
  text-align: center;
  font-family: var(--font-main);
}

.price-box {
  border: 1.5px solid #bfbfbf;
  padding: 1.25em;
  margin-bottom: 1.25em;
  border-radius: 10px;
  background-color: #fafafa;
  box-shadow: var(--shadow-sm);
}

.price-subtitle {
  font-size: 1.375rem;  /* 統一済み */
  font-weight: 700;
  margin-bottom: 0.7em;
  letter-spacing: 0.03em;
}

.pdf-link {
  margin: 0.6em 0;
  font-family: var(--font-main);
}

.pdf-link i {
  color: var(--primary);  /* PDFもリンクもテーマカラーに統一 */
  margin-right: 0.5em;
  font-size: 0.9em;
}

.pdf-link a {
  text-decoration: none;
  color: var(--text);
  font-weight: 400;
}

.pdf-link a:hover {
  text-decoration: underline;
}

/* Styles moved from index.html's <style> tag */
.price-box .fas {
  margin-right: 6px;
}
.price-box .fa-file-pdf {
  color: var(--primary);
}


/* ===== 弁護士紹介セクション ===== */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.team-card {
  background: var(--white);
  border-radius: 12px;
  padding: var(--space-md);
  box-shadow: var(--shadow-md);
  text-align: center;
  font-family: var(--font-main);
}

.team-card img {
  border-radius: 50%;
  width: 280px; /* サイズを調整 */
  height: 280px; /* サイズを調整 */
  object-fit: cover;
  margin: 0 auto var(--space-sm); /* 中央揃えとマージン */
  box-shadow: var(--shadow-sm);
}

.team-name {
  font-size: 1.375rem;
  font-weight: 700;
  margin-bottom: 0.7em;
  letter-spacing: 0.03em;
;}

.team-role {
  font-size: 1rem;
}

.team-card {
  display: block; /* aタグをブロック化 */
  text-decoration: none;
  color: inherit; /* 通常時文字色 */
  background: var(--white);
  border-radius: 12px;
  padding: var(--space-md);
  box-shadow: var(--shadow-md);
  text-align: center;
  font-family: var(--font-main);
  transition: transform 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
  position: relative; /* ラベル配置用 */
}

.team-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  color: inherit; /* ホバー時も文字色を変えない */
}

/* 右下の「弁護士紹介」ラベル */
.team-link-label {
  display: block;
  font-size: 0.75rem;
  color: #000;
  margin-top: 0.5em; /* ここで間隔 */
  text-align: right; /* 右寄せに */
  transition: color 0.2s ease, opacity 0.2s ease;
}


/* ホバー時にラベルだけグレーに */
.team-card:hover .team-link-label {
  color: #888; /* グレー */
  opacity: 1;
}


/* ========================================= */
/* お問い合わせフォーム */
/* ========================================= */
.form-container {
    max-width: 650px; /* 幅を少し広げる */
    margin: var(--space-xl) auto;
    padding: var(--space-lg);
    /* --color-gray-border が存在しないため直接指定 */
    border: 1px solid #CCCCCC;
    border-radius: var(--border-radius-lg);
    background-color: var(--white);
    box-shadow: var(--shadow-md);
}

.form-group {
    margin-bottom: var(--space-md);
}

.form-group label {
    display: block;
    margin-bottom: var(--space-xs);
    font-weight: 700;
    /* --color-primary が存在しないため直接指定（今回はメインのprimaryを使用） */
    color: var(--primary);
}

/* 必須項目（required）のアスタリスク表示 */
.form-group label.required::after {
    content: '*'; /* アスタリスクを追加 */
    /* --color-error が存在しないため直接指定 */
    color: #D9534F;
    font-weight: bold;
    margin-left: 5px;
}

.form-control {
    width: 100%;
    padding: var(--space-sm);
    /* --color-gray-border が存在しないため直接指定 */
    border: 1px solid #CCCCCC;
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    /* --font-body が存在しないため直接指定 */
    font-family: sans-serif; /* fallbackとして一般的なフォントを指定 */
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(120, 178, 224, 0.4); /* シャドウの透明度と広がりを調整 */
}

textarea.form-control {
    min-height: 120px; /* 高さを調整 */
    resize: vertical;
}

.required-note {
    font-size: 0.9em;
    /* --color-text-dark が存在しないため直接指定（--textを使用） */
    color: var(--text);
    margin-bottom: var(--space-md);
    text-align: right; /* 右寄せ */
}

.required-icon {
  color: #D9534F; /* エラーカラーを使用 */
  font-weight: bold;
  margin-left: 5px;
}

.form-description {
    font-size: 0.9em;
    /* --color-text-dark が存在しないため直接指定（--textを使用） */
    color: var(--text);
    margin-bottom: var(--space-sm);
    line-height: 1.6;
}

.name-group {
    display: flex;
    gap: var(--space-sm); /* 間隔を調整 */
    flex-wrap: wrap; /* モバイルで折り返す */
}

.name-item {
    flex: 1;
    min-width: 120px; /* 小さい画面で各項目が潰れないように最小幅を設定 */
}

/* 画面が非常に小さい場合は、姓と名が縦に並ぶように */
@media (max-width: 480px) {
    .name-group {
        flex-direction: column;
        gap: var(--space-xs);
    }
    .name-item {
        min-width: unset; /* 必要に応じてリセット */
    }
}

.name-label {
    display: block;
    font-size: 0.85em;
    /* --color-text-dark が存在しないため直接指定（--textを使用） */
    color: var(--text);
    /* --space-xxs が存在しないため直接指定 */
    margin-bottom: 4px;
}

.birthdate-group {
    display: flex;
    gap: var(--space-sm);
    align-items: center;
}

.birthdate-group input,
.birthdate-group select {
    min-width: 60px;
    flex-grow: 1; /* スペースがあれば広がる */
}

.date-unit {
    font-size: 0.9em;
    /* --color-text-dark が存在しないため直接指定（--textを使用） */
    color: var(--text);
    white-space: nowrap;
    /* --space-xxs が存在しないため直接指定 */
    margin-right: 4px;
}

/* モバイルでの生年月日グループのレイアウト調整 */
@media (max-width: 480px) {
    .birthdate-group {
        gap: var(--space-xs);
    }
    .birthdate-group input,
    .birthdate-group select {
        flex-grow: 1;
        flex-basis: auto; /* コンテンツに基づいてサイズ調整 */
    }
    .date-unit {
        margin-right: 0;
    }
}

.checkbox-container {
    margin-top: var(--space-xs);
}

.checkbox-row {
    display: flex;
    flex-wrap: wrap; /* 小さい画面で折り返す */
    gap: var(--space-sm);
    margin-bottom: var(--space-xs);
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
    font-size: 1rem;
    user-select: none; /* テキスト選択不可 */
}

.checkbox-input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkbox-custom {
    height: 20px;
    width: 20px;
    background-color: var(--white);
    border: 2px solid var(--primary-light);
    border-radius: var(--border-radius-sm);
    margin-right: var(--space-xs);
    display: inline-block;
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0; /* チェックボックスの縮小を防ぐ */
}

.checkbox-input:checked ~ .checkbox-custom {
    /* --color-primary が存在しないため直接指定（今回はメインのprimaryを使用） */
    background-color: var(--primary);
    /* --color-primary が存在しないため直接指定（今回はメインのprimaryを使用） */
    border-color: var(--primary);
}

.checkbox-custom::after {
    content: '';
    position: absolute;
    display: none;
    left: 6px;
    top: 4px;         /* 少し下にずらす */
    width: 4px;       /* 横幅を小さくする */
    height: 8px;      /* 縦幅を小さくする */
    border: solid var(--white);
    border-width: 0 2px 2px 0;  /* 線の太さを細めに */
    transform: rotate(45deg);
}

.checkbox-input:checked ~ .checkbox-custom::after {
    display: block;
}

.checkbox-text {
    /* --color-text-dark が存在しないため直接指定（--textを使用） */
    color: var(--text);
}

.checkbox-note {
    font-size: 0.85em;
    /* --color-text-dark が存在しないため直接指定（--textを使用） */
    color: var(--text);
    margin-top: var(--space-xs);
}

.form-submit {
    text-align: center;
    margin-top: var(--space-lg);
}

/* Button general style moved here for clarity */
.btn {
    display: inline-block;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--border-radius-sm);
    text-decoration: none;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
    border: none;
}

/* ===== アクセスセクション ===== */
.access iframe {
  width: 100%;
  height: 300px;
  border: 0;
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
}

/* ===== フッター ===== */
footer {
  background: var(--primary);
  color: var(--white);
  padding: var(--space-lg) var(--space-md);
  text-align: center;
  font-family: var(--font-main);
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  box-shadow: inset 0 4px 6px rgba(0, 0, 0, 0.4);
}

footer a {
  color: var(--accent);
  font-weight: 700;
}

footer a:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* ===== 固定フッターバナー ===== */
.fixed-footer-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--white);
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  box-shadow: 0 -2px 6px rgba(0,0,0,0.15);
  z-index: 999;
}

body {
  padding-bottom: 40px; /* 固定フッター分の余白を確保 */
}

/* ===== レスポンシブ ===== */
@media (max-width: 991px) {
  .header-container {
    flex-wrap: wrap;
  }
  
  .navbar ul {
    flex-direction: column;
    gap: var(--space-sm);
  }
  
  .menu-toggle {
    display: block;
  }
  
  .navbar {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
  }
  
  .navbar.active {
    max-height: 300px;
    opacity: 1;
  }
  
  section {
    padding: var(--space-lg) var(--space-sm);
  }
}