/**
 * WILL Asset Planning テーマ - カスタムCSS
 *
 * @package WillTheme
 */

/* カスタムフォント設定 */
.font-serif {
  font-family: 'Noto Serif Japanese', serif;
}

/* グラスモーフィズムのブラウザサポート */
@supports (backdrop-filter: blur(10px)) {
  .backdrop-blur-md {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }

  .backdrop-blur-xl {
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
  }

  .backdrop-blur-sm {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
  }
}

/* スムーススクロール */
html {
  scroll-behavior: smooth;
  font-size: 18px; /* ベースフォントサイズを18pxに設定 */
}

/* モバイルメニューのオーバーレイ */
.mobile-menu-overlay {
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 9998 !important;
  pointer-events: none;
}

.mobile-menu-overlay.opacity-100 {
  pointer-events: auto;
}

/* モバイルメニューのアニメーション */
.mobile-menu {
  will-change: transform;
  z-index: 9999 !important;
}

/* ヘッダーのz-index */
.header-main {
  z-index: 50;
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
}

/* ヘッダーメニューリンクのフォントサイズ */
.header-main nav a,
.header-main #menu-main-menu a,
.header-main .menu-item a {
  font-size: 1rem; /* text-base = 16px */
}

/* カスタムロゴのスタイル調整 */
.custom-logo-link img {
  height: auto;
  max-height: 64px;
  width: auto;
}

@media (max-width: 640px) {
  .custom-logo-link img {
    max-height: 48px;
  }
}

@media (min-width: 1024px) {
  .custom-logo-link img {
    max-height: 80px;
  }
}

/* カスタムカラー */
:root {
  --color-navy-primary: #101828;
  --color-navy-secondary: #1e293b;
  --color-navy-dark: #0f172a;
  --color-amber-primary: #d97706;
  --color-amber-hover: #b45309;
}

/* プログレッシブ画像読み込み */
img {
  max-width: 100%;
  height: auto;
}

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

/* フォーカススタイル */
a:focus,
button:focus {
  outline: 2px solid var(--color-amber-primary);
  outline-offset: 2px;
}

/* ブロックエディタコンテンツの改行サポート */
.entry-content,
.wp-block-post-content {
  line-height: 1.8;
}

.entry-content p,
.wp-block-post-content p {
  margin-bottom: 1.5em;
  line-height: 1.8;
}

.entry-content br,
.wp-block-post-content br {
  display: block;
  content: "";
  margin-top: 0.5em;
}

/* ブロックエディタのブロック間隔 */
.entry-content > *,
.wp-block-post-content > * {
  margin-top: 0;
  margin-bottom: 1.5em;
}

.entry-content > *:first-child,
.wp-block-post-content > *:first-child {
  margin-top: 0;
}

.entry-content > *:last-child,
.wp-block-post-content > *:last-child {
  margin-bottom: 0;
}

/* すべてのブロックのmargin-bottomを無効化 */
.wp-block,
[class*="wp-block-"] {
  margin-bottom: 0 !important;
}

/* セクションブロックのmargin-bottomを無効化 */
.will-hero-section,
.will-philosophy-section,
section {
  margin-bottom: 0 !important;
}

/* ============================================
   Contact Form 7 カスタムスタイル
   ============================================ */

/* フォームコンテナ */
.will-consultation-form {
  max-width: 800px;
  margin: 0 auto;
  font-family: 'Inter', 'Noto Sans JP', sans-serif;
  padding: 8rem 0
}

/* Contact Form 7の余分なbrタグを非表示 */
.will-consultation-form br,
.will-form-field br,
.will-consultation-section br,
.will-form-radio-group br,
.will-preference-group br {
  display: none;
}

/* ラベル内のbrは表示（必要に応じて） */
.will-form-label br {
  display: inline;
}

/* フォームフィールド */
.will-form-field {
  display: flex;
  flex-direction: column;
  margin-bottom: 32px;
}
.will-form-field p {
  margin-bottom: 0;
}

/* ラベル */
.will-form-label {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  font-size: 20px;
  font-weight: 400;
  line-height: 28px;
  color: #101828;
  letter-spacing: -0.4492px;
  margin-bottom: 1rem;
}

.will-form-label-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.will-form-label-text {
  font-family: 'Inter', 'Noto Sans JP', sans-serif;
}

.will-form-required {
  color: #e7000b;
  font-size: 20px;
  font-weight: 400;
  line-height: 28px;
  letter-spacing: -0.4492px;
}

/* テキスト入力 */
.will-form-input,
.will-form-textarea {
  width: 100%;
  height: 64px;
  padding: 16px 24px;
  border: 2px solid #d1d5dc;
  border-radius: 10px;
  font-size: 18px;
  font-weight: 400;
  line-height: normal;
  color: rgba(10, 10, 10, 0.5);
  letter-spacing: -0.4395px;
  font-family: 'Inter', 'Noto Sans JP', sans-serif;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
  background-color: white;
}

.will-form-input:focus,
.will-form-textarea:focus {
  outline: none;
  border-color: #101828;
  color: #101828;
}

.will-form-textarea {
  height: 120px;
  resize: vertical;
  padding-top: 16px;
}

/* ラジオボタングループ */
.will-form-radio-group {
  display: grid;
  /* grid-template-columns: repeat(2, 1fr); */
  gap: 16px;
}

/* 3つの選択肢がある場合は3列 */
.will-form-radio-group:has(.wpcf7-list-item:nth-child(3)) {
  /* grid-template-columns: repeat(3, 1fr); */
}

@media (max-width: 768px) {
  .will-form-radio-group {
    grid-template-columns: 1fr;
  }
}

.will-form-radio-group .wpcf7-radio {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* 3つの選択肢がある場合は3列 */
.will-form-radio-group .wpcf7-radio:has(.wpcf7-list-item:nth-child(3)) {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 768px) {
  .will-form-radio-group .wpcf7-radio {
    grid-template-columns: 1fr;
  }
}

.will-form-radio-group .wpcf7-list-item {
  margin: 0;
}

.will-form-radio-group .wpcf7-form-control-wrap {
  display: contents;
}

.will-form-radio-group label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80px;
  height: auto;
  padding: 16px 20px;
  background: white;
  border: 2px solid #d1d5dc;
  border-radius: 10px;
  font-size: 18px;
  font-weight: 400;
  line-height: 28px;
  color: #364153;
  letter-spacing: -0.4395px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  white-space: nowrap;
  width: 100%;
  box-sizing: border-box;
}

.will-form-radio-group .wpcf7-list-item-label {
  display: inline-block;
  white-space: nowrap;
}

.will-form-radio-group input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.will-form-radio-group input[type="radio"]:checked + label,
.will-form-radio-group label:has(input[type="radio"]:checked) {
  border-color: #101828;
  background: #101828;
  color: white;
}

/* 相談セクション */
.will-consultation-section {
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  border-radius: 14px;
  padding: 34px;
  margin-bottom: 32px;
}

.will-consultation-title {
  font-size: 24px;
  font-weight: 400;
  line-height: 32px;
  color: #101828;
  letter-spacing: 0.0703px;
  margin: 0 0 48px 0;
}

/* 希望グループ */
.will-preference-group {
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin-bottom: 32px;
}

.will-preference-group:last-of-type {
  margin-bottom: 0;
}

.will-preference-header {
  display: flex;
  align-items: center;
}
.will-preference-header p {
	margin-bottom: 0;
}

.will-preference-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.will-preference-title {
  font-size: 20px;
  font-weight: 400;
  line-height: 28px;
  color: #101828;
  letter-spacing: -0.4492px;
}

.will-preference-fields {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (max-width: 768px) {
  .will-preference-fields {
    grid-template-columns: 1fr;
  }
}

.will-preference-field {
  display: flex;
  flex-direction: column;
}
.will-preference-field p {
	margin-bottom: 0;
}

.will-preference-field-full {
  display: flex;
  flex-direction: column;
}
.will-preference-field-full p {
	margin-bottom: 0;
}

.will-preference-label {
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  color: #4a5565;
  letter-spacing: -0.1504px;
  margin-bottom: 1rem;
  margin-top: 0;
}

.will-form-date-input,
.will-form-time-input {
  width: 100%;
  height: 56px;
  padding: 16px 24px;
  border: 2px solid #d1d5dc;
  border-radius: 10px;
  font-size: 18px;
  font-weight: 400;
  line-height: normal;
  color: rgba(10, 10, 10, 0.5);
  letter-spacing: -0.4395px;
  font-family: 'Inter', 'Noto Sans JP', sans-serif;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
}

.will-form-date-input:focus,
.will-form-time-input:focus {
  outline: none;
  border-color: #101828;
  color: #101828;
}

/* 相談セクション内のラジオボタン */
.will-consultation-section .will-form-radio-group {
  display: grid;
  /* grid-template-columns: repeat(2, 1fr); */
  gap: 16px;
}

.will-consultation-section .will-form-radio-group .wpcf7-radio {
  grid-template-columns: repeat(2, 1fr);
}

.will-consultation-section .will-form-radio-group .wpcf7-form-control-wrap {
  display: contents;
}

.will-consultation-section .will-form-radio-group label {
  height: 64px;
  position: relative;
  padding-left: 20px;
  padding-right: 20px;
  white-space: nowrap;
  width: 100%;
  box-sizing: border-box;
}

.will-consultation-section .will-form-radio-group .wpcf7-list-item-label {
  display: inline-block;
  white-space: nowrap;
}

/* 注意書き */
.will-consultation-notice {
  background: white;
  border: 1px solid #d1d5dc;
  border-radius: 10px;
  padding: 17px;
  margin-top: 32px;
}

.will-consultation-notice p {
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  color: #4a5565;
  letter-spacing: -0.1504px;
  margin: 0 0 8px 0;
}

.will-consultation-notice p:last-child {
  margin-bottom: 0;
}

/* フォーム通知 */
.will-form-notice {
  background: #eff6ff;
  border: 2px solid #bedbff;
  border-radius: 14px;
  padding: 26px;
  margin-bottom: 32px;
}

.will-form-notice p {
  font-size: 18px;
  font-weight: 400;
  line-height: 29.25px;
  color: #364153;
  letter-spacing: -0.4395px;
  margin: 0;
}

/* 送信ボタン */
.will-form-submit {
  width: 316px;
  height: 48px;
  background: #101828;
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 20px;
  font-weight: 500;
  line-height: 28px;
  letter-spacing: -0.4492px;
  font-family: 'Inter', 'Noto Sans JP', sans-serif;
  cursor: pointer;
  transition: background-color 0.2s ease;
  display: block;
  margin: 0 auto;
}

.will-form-submit:hover {
  background: #1e293b;
}

.will-form-submit:focus {
  outline: 2px solid var(--color-amber-primary);
  outline-offset: 2px;
}

/* Contact Form 7のデフォルトスタイルを上書き */
.wpcf7-form {
  margin: 0;
}

.wpcf7-form-control-wrap {
  display: block;
  width: 100%;
}

.wpcf7-not-valid-tip {
  color: #e7000b;
  font-size: 14px;
  margin-top: 4px;
}

.wpcf7-validation-errors,
.wpcf7-mail-sent-ok {
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 24px;
}

.wpcf7-validation-errors {
  background: #fee2e2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.wpcf7-mail-sent-ok {
  background: #d1fae5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

