/*
Theme Name: おかねの安心相談所
Theme URI: 
Author: 一般社団法人 おかねの安心相談所
Author URI: 
Description: 一般社団法人 おかねの安心相談所のランディングページ用 WordPress テーマ。投資用マンションの売却相談 LP。
Version: 1.0.0
Requires at least: 5.0
Tested up to: 6.5
Requires PHP: 7.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: okane-soudan
*/

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Helvetica Neue", Arial, "Hiragino Sans", sans-serif;
  background: #f5f7fa;
  color: #333;
  line-height: 1.6;
  min-height: 100vh;
}

.toc,
.side-cta {
  display: none;
}

@media (min-width: 768px) {
  .toc {
    display: block;
    position: fixed;
    top: 50%;
    left: max(24px, calc((100vw - 450px) / 2 - 240px));
    transform: translateY(-50%);
    width: 200px;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 12px;
    padding: 20px 18px;
    box-shadow: 0 8px 30px rgba(4, 159, 150, 0.12);
    border: 1px solid rgba(4, 159, 150, 0.15);
  }

  .toc__title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: #049F96;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(4, 159, 150, 0.2);
  }

  .toc__list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .toc__list a {
    display: block;
    padding: 8px 10px;
    font-size: 13px;
    color: #444;
    text-decoration: none;
    border-radius: 6px;
    position: relative;
    transition: background 0.2s, color 0.2s, padding-left 0.2s;
  }

  .toc__list a::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: #049F96;
    border-radius: 2px;
    transition: height 0.2s;
  }

  .toc__list a:hover {
    background: rgba(4, 159, 150, 0.08);
    color: #049F96;
    padding-left: 14px;
  }

  .toc__list a.is-active {
    background: rgba(4, 159, 150, 0.10);
    color: #049F96;
    font-weight: 700;
    padding-left: 14px;
  }

  .toc__list a.is-active::before {
    height: 60%;
  }

  .side-cta {
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: fixed;
    top: 50%;
    right: max(24px, calc((100vw - 450px) / 2 - 240px));
    transform: translateY(-50%);
    width: 200px;
    z-index: 50;
  }

  .side-cta__btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 18px 14px;
    color: #fff;
    text-decoration: none;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
  }

  .side-cta__btn::before {
    content: "";
    position: absolute;
    inset: 6px;
    border: 1px dashed rgba(255, 255, 255, 0.55);
    border-radius: 8px;
    pointer-events: none;
  }

  .side-cta__btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.16);
  }

  .side-cta__btn svg {
    width: 28px;
    height: 28px;
  }

  .side-cta__label {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin-top: 2px;
  }

  .side-cta__sub {
    font-size: 11px;
    opacity: 0.92;
    letter-spacing: 0.04em;
  }

  .side-cta__btn--tel {
    background: #EE7D33;
  }

  .side-cta__btn--mail {
    background: #049F96;
  }
}

@media (min-width: 768px) {
  body {
    background:
      radial-gradient(circle at 12% 18%, rgba(4, 159, 150, 0.10) 0, transparent 28%),
      radial-gradient(circle at 88% 24%, rgba(238, 125, 51, 0.08) 0, transparent 30%),
      radial-gradient(circle at 8% 78%, rgba(240, 191, 192, 0.18) 0, transparent 32%),
      radial-gradient(circle at 92% 82%, rgba(4, 159, 150, 0.08) 0, transparent 32%),
      linear-gradient(180deg, #f0f6f3 0%, #e9f1ee 100%);
    background-attachment: fixed;
    position: relative;
  }

  body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: url("img/bg-pattern.svg");
    background-repeat: repeat;
    background-size: 280px 280px;
    pointer-events: none;
    z-index: 0;
    opacity: 0.85;
  }

  .header,
  .container,
  .footer {
    position: relative;
    z-index: 1;
    box-shadow: 0 0 40px rgba(4, 159, 150, 0.08);
  }

  .container {
    box-shadow: 0 10px 50px rgba(4, 159, 150, 0.10);
  }

  .page {
    position: relative;
    z-index: 1;
    box-shadow: 0 10px 50px rgba(4, 159, 150, 0.10);
  }
}

.header {
  max-width: 450px;
  height: 70px;
  margin: 0 auto;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: stretch;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.header-logo {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 0 12px;
  min-width: 0;
}

.header-logo img {
  max-height: 44px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.header-actions {
  display: flex;
  flex-shrink: 0;
}

.header-btn {
  width: 96px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  gap: 2px;
  position: relative;
  transition: opacity 0.2s;
}

.header-btn:hover {
  opacity: 0.9;
}

.header-btn::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px dashed rgba(255, 255, 255, 0.65);
  pointer-events: none;
}

.header-btn--tel {
  background: #EE7D33;
}

.header-btn--mail {
  background: #049F96;
}

.header-btn svg {
  width: 22px;
  height: 22px;
}

.container {
  max-width: 450px;
  margin: 0 auto;
  background: #fff;
}

.container > [id],
.container > section[id] {
  scroll-margin-top: 80px;
}

.container img {
  display: block;
  width: 100%;
  height: auto;
}

.cta-buttons {
  background: #F0BFC0;
  margin-top: -2px;
  padding: 20px 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cta-buttons img {
  width: 100%;
}

.cta-buttons img[alt="テキスト"] {
  width: 92%;
  margin: 0 auto 4px;
}

.cta-buttons__mail {
  display: block;
  transition: opacity 0.2s;
}

.cta-buttons__mail:hover {
  opacity: 0.85;
}

.case-section {
  padding: 32px 20px 24px;
  background: #fff;
}

.case-section__title {
  text-align: center;
  font-size: 26px;
  font-weight: 700;
  color: #333;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
  letter-spacing: 0.08em;
}

.case-section__title::after {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  background: #049F96;
  margin: 10px auto 0;
  border-radius: 2px;
}

.case-section__list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.case-slider {
  position: relative;
}

.case-slider__viewport {
  overflow: hidden;
  border-radius: 8px;
}

.case-slider__track {
  display: flex;
  transition: transform 0.5s ease;
  will-change: transform;
}

.case-slider__slide {
  flex: 0 0 100%;
  min-width: 0;
}

.case-slider__slide img {
  display: block;
  width: 100%;
  height: auto;
}

.case-slider__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.85);
  color: #049F96;
  font-size: 16px;
  cursor: pointer;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.case-slider__arrow:hover {
  background: #fff;
}

.case-slider__arrow--prev {
  left: 8px;
}

.case-slider__arrow--next {
  right: 8px;
}

.case-slider__dots {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 20px;
}

.case-slider__dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #049F96;
  background: #fff;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, transform 0.2s;
}

.case-slider__dot:hover {
  background: #e6f5f3;
}

.case-slider__dot.is-active {
  background: #049F96;
  transform: scale(1.25);
}

.faq-section {
  background: #E2ECE6;
  padding: 40px 24px 48px;
}

.faq-section__title {
  text-align: center;
  font-size: 26px;
  font-weight: 700;
  color: #222;
  margin-bottom: 32px;
  letter-spacing: 0.06em;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.faq-item {
  padding-bottom: 24px;
  border-bottom: 1px solid #9FC4BE;
}

.faq-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.faq-item__row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.faq-item__question {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  background: none;
  border: none;
  padding: 0;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}

.faq-item__mark {
  color: #EE7D33;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
  flex-shrink: 0;
}

.faq-item__row--answer .faq-item__mark {
  color: #049F96;
}

.faq-item__text {
  flex: 1;
  display: block;
  font-size: 14px;
  line-height: 1.7;
  color: #333;
  margin: 2px 0 0;
}

.faq-item__question .faq-item__text {
  font-weight: 700;
}

.faq-item__toggle {
  position: relative;
  width: 18px;
  height: 18px;
  margin-top: 8px;
  flex-shrink: 0;
}

.faq-item__toggle::before,
.faq-item__toggle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  background: #EE7D33;
}

.faq-item__toggle::before {
  width: 18px;
  height: 2px;
  transform: translate(-50%, -50%);
}

.faq-item__toggle::after {
  width: 2px;
  height: 18px;
  transform: translate(-50%, -50%);
  transition: transform 0.25s ease;
}

.faq-item.is-open .faq-item__toggle::after {
  transform: translate(-50%, -50%) scaleY(0);
}

.faq-item__answer-wrap {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-item__answer-wrap .faq-item__row--answer {
  padding-top: 14px;
}

.faq-item.is-open .faq-item__answer-wrap {
  max-height: 600px;
}

.contact-section {
  background: #fff;
  padding: 48px 24px 56px;
  scroll-margin-top: 80px;
}

.contact-section__title {
  text-align: center;
  font-size: 26px;
  font-weight: 700;
  color: #222;
  margin-bottom: 12px;
  letter-spacing: 0.06em;
  position: relative;
  padding-bottom: 14px;
}

.contact-section__title::after {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  background: #049F96;
  margin: 12px auto 0;
  border-radius: 2px;
}

.contact-section__hero {
  width: 100%;
  height: auto;
  display: block;
  margin: 20px 0 16px;
}

.contact-section__tel {
  display: block;
  margin-bottom: 24px;
  transition: opacity 0.2s;
}

.contact-section__tel:hover {
  opacity: 0.85;
}

.contact-section__tel img {
  width: 100%;
  height: auto;
  display: block;
}

.contact-section__lead {
  text-align: center;
  font-size: 13px;
  line-height: 1.8;
  color: #555;
  margin-bottom: 24px;
  padding-top: 8px;
  border-top: 1px solid #e5e5e5;
  padding-top: 24px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.contact-form__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.contact-form__label {
  font-size: 14px;
  font-weight: 700;
  color: #222;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.contact-form__required {
  color: #e53935;
  font-weight: 700;
  font-size: 14px;
  margin-left: 2px;
}

.contact-form__input {
  width: 100%;
  padding: 12px 14px;
  font-size: 14px;
  font-family: inherit;
  border: 1px solid #c8c8c8;
  border-radius: 8px;
  background: #fff;
  color: #333;
  transition: border-color 0.2s;
}

.contact-form__input::placeholder {
  color: #b5b5b5;
}

.contact-form__input:focus {
  outline: none;
  border-color: #049F96;
}

.contact-form__input--textarea {
  resize: vertical;
  min-height: 200px;
  line-height: 1.6;
}

.contact-form__radios {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.contact-form__radio {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}

.contact-form__radio input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: #1e88e5;
  margin: 0;
}

.page {
  max-width: 450px;
  margin: 0 auto;
  background: #fff;
}

.page__inner {
  padding: 32px 24px 48px;
}

.page__title {
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  color: #222;
  margin-bottom: 24px;
  padding-bottom: 16px;
  position: relative;
  letter-spacing: 0.04em;
}

.page__title::after {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  background: #049F96;
  margin: 12px auto 0;
  border-radius: 2px;
}

.page__lead {
  font-size: 13px;
  line-height: 1.9;
  color: #444;
  margin-bottom: 32px;
}

.policy {
  margin-bottom: 24px;
}

.policy__heading {
  font-size: 15px;
  font-weight: 700;
  color: #049F96;
  margin-bottom: 8px;
  padding-left: 10px;
  border-left: 3px solid #049F96;
  line-height: 1.4;
}

.policy__text {
  font-size: 13px;
  line-height: 1.9;
  color: #333;
}

.policy__list {
  margin: 8px 0 0 20px;
  padding: 0;
  font-size: 13px;
  line-height: 1.9;
  color: #333;
}

.policy__list li {
  margin-bottom: 4px;
}

.policy__contact {
  margin-top: 10px;
  padding: 14px 16px;
  background: #f5faf9;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.8;
  color: #333;
}

.policy__contact a {
  color: #049F96;
  text-decoration: none;
}

.policy__date {
  font-size: 12px;
  color: #777;
  text-align: right;
  margin-top: 24px;
}

.page__back {
  display: inline-block;
  margin-top: 32px;
  font-size: 14px;
  color: #049F96;
  text-decoration: none;
  font-weight: 700;
}

.page__back:hover {
  text-decoration: underline;
}

.footer {
  max-width: 450px;
  margin: 0 auto;
  background: #E2ECE6;
  padding: 40px 24px 32px;
  text-align: center;
}

.footer__logo {
  margin-bottom: 36px;
  display: flex;
  justify-content: center;
}

.footer__logo img {
  max-width: 80%;
  height: auto;
}

.footer__link {
  display: inline-block;
  color: #222;
  font-size: 15px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
  margin-bottom: 28px;
}

.footer__link:hover {
  opacity: 0.7;
}

.footer__copyright {
  font-size: 12px;
  color: #333;
  line-height: 1.6;
}

.contact-form__submit {
  margin-top: 8px;
  padding: 16px;
  background: #049F96;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  box-shadow: 0 3px 0 #036e68;
}

.contact-form__submit:hover {
  background: #03b3a8;
}

.contact-form__submit:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #036e68;
}

/* ------------------------------------------------------------------
   Contact Form 7 互換調整
   CF7 は <form class="wpcf7-form"> や入力欄を囲む
   <span class="wpcf7-form-control-wrap"> 等を自動出力するため、
   それらに合わせて既存デザインを当て直す。
------------------------------------------------------------------ */

/* フィールドの縦並び・間隔を CF7 のフォーム本体に適用 */
.contact-form .wpcf7-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* CF7 が入力欄を囲む span をブロック化して width:100% を効かせる */
.contact-form .wpcf7-form-control-wrap {
  display: block;
}

/* バリデーションメッセージ等の余白調整 */
.contact-form .wpcf7-not-valid-tip {
  display: block;
  margin-top: 4px;
  font-size: 12px;
}

.contact-form .wpcf7-response-output {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.6;
}

/* ラジオボタン（CF7 は .wpcf7-list-item でマークアップする） */
.contact-form__radios .wpcf7-radio {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-form__radios .wpcf7-list-item {
  margin: 0;
}

.contact-form__radios .wpcf7-list-item > label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #333;
  cursor: pointer;
  font-weight: 400;
}

.contact-form__radios .wpcf7-list-item input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: #1e88e5;
  margin: 0;
}

/* CF7 の自動改行（wpautop）で入る余分な余白をリセットし、
   項目間の間隔を .contact-form の gap で一定に保つ */
.contact-form .wpcf7-form > p {
  margin: 0;
}

.contact-form .contact-form__field br {
  display: none;
}

/* ラベルと入力欄の間隔を field 内で一定に */
.contact-form .contact-form__field > .wpcf7-form-control-wrap,
.contact-form .contact-form__field > .contact-form__radios {
  margin-top: 0;
}

/* 送信ボタン周り：CF7 のスピナーがレイアウトを崩さないように */
.contact-form .wpcf7-spinner {
  margin: 0 auto;
}

.contact-form p:has(> .contact-form__submit) {
  margin: 0;
  display: flex;
  flex-direction: column;
}
