@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700;900&display=swap');

/* Reset and base styles */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body, #root {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
}

p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

/* ===== Rich text (prose) styles for CMS content ===== */
.prose {
  color: #374151;
  line-height: 1.7;
}
.prose h1 {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.3;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: #111827;
}
.prose h2 {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.4;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
  color: #1f2937;
}
.prose h3 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.5;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  color: #374151;
}
.prose p {
  margin-bottom: 1rem;
  line-height: 1.7;
}
.prose ul, .prose ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}
.prose ul { list-style-type: disc; }
.prose ol { list-style-type: decimal; }
.prose li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}
.prose blockquote {
  border-left: 4px solid #d1d5db;
  padding-left: 1.25rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  margin: 0 0 1rem 0;
  color: #6b7280;
  font-style: italic;
}
.prose blockquote p { margin-bottom: 0; }
.prose code {
  background-color: #f3f4f6;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-family: ui-monospace, monospace;
  font-size: 0.875em;
  color: #e11d48;
}
.prose pre {
  background-color: #1f2937;
  color: #f9fafb;
  padding: 1rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin-bottom: 1rem;
}
.prose pre code {
  background-color: transparent;
  padding: 0;
  color: inherit;
}
.prose a { color: #3b82f6; text-decoration: underline; }
.prose a:hover { color: #2563eb; }
.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  margin: 1rem 0;
}
.prose hr {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 1.5rem 0;
}
.prose strong { font-weight: 600; color: #111827; }
.prose em { font-style: italic; }
.prose u { text-decoration: underline; }
.prose s { text-decoration: line-through; }

/* Tiptap text alignment support */
.prose [style*="text-align: center"],
.prose [style*="text-align:center"] {
  text-align: center !important;
}
.prose [style*="text-align: right"],
.prose [style*="text-align:right"] {
  text-align: right !important;
}
.prose [style*="text-align: justify"],
.prose [style*="text-align:justify"] {
  text-align: justify !important;
}

html {
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Noto Sans JP', sans-serif;
  background-color: #eee5dd;
  color: #4A4A4A;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 共通の見出しフォント適用クラス（必要に応じて各コンポーネントで使用） */
.font-heading {
  font-family: 'Noto Sans JP', sans-serif;
}

/* アコーディオン（ご利用者さまの声・FAQ）開閉時のシェブロン向き */
[aria-expanded="true"] svg.lucide-chevron-down {
  transform: rotate(180deg);
}
[aria-expanded="false"] svg.lucide-chevron-up {
  transform: rotate(180deg);
}
[aria-expanded] svg.lucide-chevron-down,
[aria-expanded] svg.lucide-chevron-up {
  transition: transform 0.3s ease;
}

/* ハンバーガーメニュー開閉（js/main.js が .is-open を付け外しする） */
#site-header .fixed.inset-0.is-open {
  opacity: 1 !important;
  visibility: visible !important;
}
#site-header .absolute.top-full.is-open {
  opacity: 1 !important;
  visibility: visible !important;
  transform: scale(1) !important;
}

/* ACFのWYSIWYGで入力した本文 */
.lp-agent-richtext > * + * {
  margin-top: 0.75em;
}

.lp-agent-richtext ul,
.lp-agent-richtext ol {
  padding-left: 1.5em;
}

.lp-agent-richtext ul {
  list-style: disc;
}

.lp-agent-richtext ol {
  list-style: decimal;
}

.lp-agent-richtext a {
  color: #fb9ba3;
  text-decoration: underline;
}

#advisor-story .advisor-story-content > * + * {
  margin-top: 1.5rem;
}

#advisor-story .advisor-story-content strong {
  margin-right: 0.25rem;
  margin-left: 0.25rem;
  color: #fb9ba3;
  font-weight: 700;
}

/* MW WP Form */
#contact .mw_wp_form {
  width: 100%;
  padding: 32px;
  border: 1px solid rgba(238, 229, 221, 0.8);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(128, 114, 102, 0.08);
  color: #4a4a4a;
}

#contact .mw_wp_form form,
#contact .mw_wp_form p {
  margin: 0;
}

#contact .Form-Item {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid #eee5dd;
}

#contact .Form-Item:first-child {
  padding-top: 0;
}

#contact .Form-Item-Label {
  display: flex;
  flex: 0 0 210px;
  align-items: center;
  gap: 8px;
  min-height: 50px;
  color: #5c544d;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.6;
}

#contact .Form-Item-Label-Required {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 3px 8px;
  border-radius: 9999px;
  background: #fb9ba3;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
}

#contact .Form-Item > p:last-child {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

#contact .Form-Item-Input,
#contact .Form-Item-Textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #d8d2cc;
  border-radius: 12px;
  outline: none;
  background: #fff;
  color: #4a4a4a;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  transition: border-color 0.2s ease, box-shadow 0.2s ease,
    background-color 0.2s ease;
}

#contact .Form-Item-Input {
  min-height: 50px;
  padding: 12px 16px;
}

#contact select.Form-Item-Input {
  padding-right: 44px;
  cursor: pointer;
}

#contact .Form-Item-Textarea {
  min-height: 180px;
  padding: 16px;
  resize: vertical;
}

#contact .Form-Item-Input::placeholder,
#contact .Form-Item-Textarea::placeholder {
  color: #aaa29b;
  opacity: 1;
}

#contact .Form-Item-Input:hover,
#contact .Form-Item-Textarea:hover {
  border-color: #bdb4ad;
}

#contact .Form-Item-Input:focus,
#contact .Form-Item-Textarea:focus {
  border-color: #fb9ba3;
  background: #fffdfd;
  box-shadow: 0 0 0 4px rgba(251, 155, 163, 0.18);
}

#contact input[type='number'].Form-Item-Input {
  flex: 1;
  width: auto;
  text-align: center;
}

#contact input[type='number'].Form-Item-Input:first-of-type {
  flex-grow: 1.5;
}

#contact .mwform-tel-field {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

#contact .mwform-tel-field .Form-Item-Input {
  flex: 1;
  width: 0;
  text-align: center;
}

#contact .error {
  display: block;
  flex-basis: 100%;
  margin-top: 8px;
  color: #df5260;
  font-size: 13px;
  font-weight: 500;
}

#contact .privacy {
  margin-top: 32px;
}

#contact .privacy h2 {
  margin: 0 0 16px;
  color: #5c544d;
  font-size: 20px;
  font-weight: 700;
  text-align: center;
}

#contact .privacy_box {
  max-height: 240px;
  padding: 20px;
  overflow-y: auto;
  border: 1px solid #eee5dd;
  border-radius: 12px;
  background: #f7f4f1;
  color: #6b625b;
  font-size: 13px;
  line-height: 1.9;
}

#contact .privacy_box p {
  margin-top: 12px;
}

#contact .Form-Btn,
#contact .mw_wp_form input[type='submit'] {
  display: block;
  width: min(100%, 560px);
  min-height: 58px;
  margin: 32px auto 0;
  padding: 15px 24px;
  border: 0;
  border-radius: 9999px;
  background: #fb9ba3;
  box-shadow: 0 8px 20px rgba(251, 155, 163, 0.28);
  color: #fff;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
  white-space: normal;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease,
    box-shadow 0.2s ease;
}

#contact .Form-Btn:hover,
#contact .mw_wp_form input[type='submit']:hover {
  background: #f47a86;
  box-shadow: 0 10px 24px rgba(251, 155, 163, 0.36);
  transform: translateY(-2px);
}

#contact .Form-Btn:focus-visible,
#contact .mw_wp_form input[type='submit']:focus-visible {
  outline: 3px solid rgba(251, 155, 163, 0.35);
  outline-offset: 3px;
}

#contact .mw_wp_form input[name='submitBack'] {
  background: #807266;
  box-shadow: none;
}

#contact .mw_wp_form_confirm .Form-Item > p:last-child {
  min-height: 50px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #f7f4f1;
  line-height: 1.7;
}

#contact .mw_wp_form_complete {
  line-height: 1.9;
  text-align: center;
}

@media (max-width: 767px) {
  #contact .mw_wp_form {
    padding: 24px 20px;
    border-radius: 20px;
  }

  #contact .Form-Item {
    flex-direction: column;
    gap: 10px;
    padding: 20px 0;
  }

  #contact .Form-Item-Label {
    flex: none;
    min-height: auto;
    font-size: 14px;
  }

  #contact .Form-Item > p:last-child {
    width: 100%;
  }

  #contact .Form-Item-Input,
  #contact .Form-Item-Textarea {
    font-size: 16px;
  }

  #contact .privacy {
    margin-top: 24px;
  }

  #contact .privacy_box {
    max-height: 200px;
    padding: 16px;
  }

  #contact .Form-Btn,
  #contact .mw_wp_form input[type='submit'] {
    min-height: 56px;
    margin-top: 24px;
    padding: 14px 18px;
    font-size: 14px;
  }
}
