/*
Theme Name: Album Rescue
Theme URI:
Author:
Description: アルバムレスキュー
Version: 1.0
Text Domain: album-rescue
*/
main h2 {
    font-family: 'Shippori Mincho', serif;
    position: relative;
    z-index: 1;
    display: block;
    width: fit-content;
    margin: 0 auto;
    text-align: center;
    padding-bottom: 16px;
}
main h2::after {
    content: '';
    position: absolute;
    z-index: -1;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 40px;
    background-image: url('http://keen-yoron-4164.candypop.jp/album-rescue/wp-content/uploads/2026/09/title-01.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
	opacity: 0.7;
}

main h2.no-deco::after {
    content: none;
}

.fv-fade {
  opacity: 0;
  animation: fv-fade-in 2s ease-out forwards;
}

@keyframes fv-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* 表示される順番(写真右→写真左→キャッチコピー→下のテキスト) */
[data-fv-group="photo-right"] { animation-delay: 0s; }
[data-fv-group="photo-left"]  { animation-delay: 1s; }
[data-fv-group="logo"]        { animation-delay: 2s; }
[data-fv-group="text"]        { animation-delay: 3s; }

/* カルーセル */
#baDots .swiper-pagination-bullet {
  width: 10px;
  height: 10px;
  margin: 0 !important;
  background: currentColor;
  opacity: 0.25;
}
#baDots .swiper-pagination-bullet-active {
  opacity: 1;
}

/* ===== ビフォーアフター比較スライダー ===== */
.compare {
  --pos: 50%;
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 1rem;
  user-select: none;
  touch-action: pan-y;
}

.compare img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

/* before を左側だけ見せる */
.compare__before {
  clip-path: inset(0 calc(100% - var(--pos)) 0 0);
}

/* 区切り線 */
.compare__divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 2px;
  background: #fff;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 2;
}

/* 丸いつまみ */
.compare__handle {
  position: absolute;
  top: 50%;
  left: var(--pos);
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.compare__handle::before {
  content: "◀ ▶";
  font-size: 10px;
  letter-spacing: 2px;
  color: #62737e;
}

/* 操作用のrangeは全面に透明で重ねる */
.compare__range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  z-index: 3;
  -webkit-appearance: none;
  appearance: none;
}

/* ===== お問い合わせフォーム ===== */
.cf-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.25rem 0;
}

.cf-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  color: #4A5A66;
}

.cf-req,
.cf-opt {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.1rem 0.5rem;
  border-radius: 9999px;
  white-space: nowrap;
}
.cf-req { background: #DC9181; color: #fff; }
.cf-opt { background: #E8E1D6; color: #5C564E; }

.cf-field { flex: 1; }

/* 入力欄 */
.cf-field input[type="text"],
.cf-field input[type="email"],
.cf-field input[type="tel"],
.cf-field select,
.cf-field textarea {
  width: 100%;
  padding: 1rem 1.25rem;
  border: 1px solid #DDD5C8;
  border-radius: 0.75rem;
  background: #fff;
  font-size: 1rem; /* スマホでのズーム防止 */
  color: #5C564E;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.cf-field input:focus,
.cf-field select:focus,
.cf-field textarea:focus {
  outline: none;
  border-color: #A4BD9A;
  box-shadow: 0 0 0 3px rgba(164, 189, 154, 0.25);
}
.cf-field ::placeholder { color: #B5ADA2; }
.cf-field textarea { height: 220px; resize: vertical; }

/* セレクトの矢印 */
.cf-select { position: relative; max-width: 420px; }
.cf-select select { appearance: none; -webkit-appearance: none; cursor: pointer; }
.cf-select::after {
  content: "";
  position: absolute;
  right: 1.25rem;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid #5C564E;
  border-bottom: 2px solid #5C564E;
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

/* ラジオ・チェックボックス */
.cf-field .wpcf7-list-item { margin: 0 1.5rem 0.5rem 0; display: inline-block; }
.cf-field .wpcf7-list-item label { display: inline-flex; align-items: center; gap: 0.4rem; cursor: pointer; }
.cf-field input[type="radio"],
.cf-field input[type="checkbox"],
.cf-accept input[type="checkbox"] {
  width: 1.15rem;
  height: 1.15rem;
  accent-color: #DC9181;
}

/* 個人情報ボックス */
.cf-privacy {
  margin-top: 2rem;
  height: 200px;
  overflow-y: auto;
  padding: 1.5rem;
  background: #FAF7F1;
  border-radius: 0.75rem;
  font-size: 0.8rem;
  line-height: 1.9;
}
.cf-privacy p { margin-bottom: 1rem; }
.cf-privacy-title { font-weight: 700; color: #4A5A66; font-size: 0.9rem; }

/* 同意チェック */
.cf-accept {
  margin-top: 2rem;
  text-align: center;
  font-weight: 700;
  color: #4A5A66;
}
.cf-accept .wpcf7-list-item { margin: 0; }
.cf-accept label { display: inline-flex; align-items: center; gap: 0.6rem; cursor: pointer; }

/* 送信ボタン */
.cf-submit { margin-top: 2rem; text-align: center; }
.cf-submit input[type="submit"] {
  min-width: 280px;
  padding: 1.1rem 2rem;
  border: none;
  border-radius: 9999px;
  background: #DC9181;
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: opacity 0.2s;
}
.cf-submit input[type="submit"]:hover { opacity: 0.85; }
.cf-submit input[type="submit"]:disabled {
  background: #E8E1D6;
  color: #fff;
  cursor: not-allowed;
}
.cf-submit .wpcf7-spinner { display: block; margin: 0.75rem auto 0; }

/* エラーメッセージ */
.wpcf7-not-valid-tip { font-size: 0.8rem; color: #C0392B; margin-top: 0.4rem; }
.wpcf7 form .wpcf7-response-output {
  margin: 2rem 0 0;
  padding: 1rem;
  border-radius: 0.75rem;
  text-align: center;
  font-size: 0.9rem;
}

/* PC：左に項目名、右に入力欄 */
@media (min-width: 768px) {
  .cf-row {
    flex-direction: row;
    align-items: flex-start;
    gap: 2.5rem;
    padding: 1.5rem 0;
  }
  .cf-label {
    width: 260px;
    flex-shrink: 0;
    padding-top: 1rem;
    justify-content: space-between;
  }
  .cf-privacy { padding: 2rem 2.5rem; }
}

/* 比較表のスクロール案内アイコン */
.scroll-hint {
  transform: translate(-50%, -50%);
  animation: scroll-hint-move 1.6s ease-in-out infinite;
}
@keyframes scroll-hint-move {
  0%, 100% { transform: translate(-50%, -50%); }
  50%      { transform: translate(calc(-50% + 12px), -50%); }
}
.scroll-hint.is-hidden {
  opacity: 0;
}
