/* =========================================
   Affiliate Blocks - LP01 First View Block
   Vertical Hero Version
   画像上・文字下で安定表示
========================================= */

.ab-fv,
.ab-fv * {
  box-sizing: border-box;
}

.ab-fv {
  position: relative;
  width: 100%;
  max-width: 920px;
  margin: 28px auto 36px;
  padding: 26px 22px 28px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 88% 14%, rgba(30, 136, 229, 0.12) 0, rgba(30, 136, 229, 0.12) 100px, transparent 101px),
    radial-gradient(circle at 8% 92%, rgba(255, 152, 0, 0.10) 0, rgba(255, 152, 0, 0.10) 95px, transparent 96px),
    linear-gradient(180deg, #f7fbff 0%, #ffffff 58%, #f1f8ff 100%);
  border: 2px solid rgba(30, 136, 229, 0.16);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.11);
  overflow: hidden;
  isolation: isolate;
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
}

.ab-fv::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, #1e88e5 0%, #ff9800 55%, #ff5722 100%);
}

.ab-fv-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 22px;
  width: 100%;
}

/* 画像を常に上へ */
.ab-fv-visual {
  order: -1;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.ab-fv-image {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: 20px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.18);
}

.ab-fv-image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 240px;
  padding: 20px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
  border: 2px dashed rgba(30, 136, 229, 0.30);
  color: #64748b;
  font-size: 15px;
  font-weight: 800;
  text-align: center;
}

.ab-fv-content {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  min-width: 0;
}

/* 中央寄せベース */
.ab-fv-content {
  text-align: center;
}

.ab-fv-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 14px;
  padding: 7px 14px;
  border-radius: 999px;
  background: #ffffff;
  color: #1565c0;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.4;
  box-shadow: 0 7px 20px rgba(37, 99, 235, 0.12);
}

.ab-fv-badge::before {
  content: "✓";
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #1e88e5;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.ab-fv-title {
  margin: 0 0 16px !important;
  padding: 0 !important;
  color: #0f172a;
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 900;
  line-height: 1.18;
  letter-spacing: -0.035em;
  word-break: normal;
  overflow-wrap: break-word;
  text-wrap: balance;
}

.ab-fv-lead {
  max-width: 720px;
  margin: 0 auto 22px !important;
  color: #374151;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.85;
}

/* ポイントはPCでは中央配置、文章は左寄せ */
.ab-fv-points {
  display: grid;
  gap: 10px;
  max-width: 620px;
  margin: 0 auto 24px !important;
  padding: 0 !important;
  list-style: none !important;
}

.ab-fv-point {
  position: relative;
  margin: 0 !important;
  padding: 12px 15px 12px 44px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(30, 136, 229, 0.18);
  border-radius: 15px;
  color: #1f2937;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.55;
  text-align: left;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.05);
}

.ab-fv-point::before {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: #1e88e5;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

.ab-fv-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  width: 100%;
  margin-top: 20px;
}

.ab-fv-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 240px;
  max-width: 100%;
  min-height: 58px;
  padding: 16px 28px;
  border-radius: 999px;
  text-decoration: none !important;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.4;
  letter-spacing: 0.02em;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
  overflow: hidden;
  cursor: pointer;
}

.ab-fv-button:hover {
  transform: translateY(-2px);
  opacity: 0.94;
}

.ab-fv-button:active {
  transform: translateY(0);
}

.ab-fv-button span {
  position: relative;
  z-index: 2;
}

.ab-fv-button::after {
  content: "›";
  position: relative;
  z-index: 2;
  margin-left: 10px;
  font-size: 1.25em;
  font-weight: 900;
  line-height: 1;
}

.ab-fv-button-main {
  background: linear-gradient(135deg, #ff9800 0%, #ff5722 100%);
  color: #ffffff !important;
  box-shadow: 0 8px 0 #c94712, 0 14px 24px rgba(255, 87, 34, 0.28);
}

.ab-fv-button-main:hover {
  box-shadow: 0 6px 0 #c94712, 0 12px 22px rgba(255, 87, 34, 0.24);
}

.ab-fv-button-sub {
  background: #ffffff;
  color: #111827 !important;
  border: 2px solid rgba(30, 136, 229, 0.35);
  box-shadow: 0 8px 18px rgba(30, 136, 229, 0.13);
}

.ab-fv-button-sub:hover {
  box-shadow: 0 12px 24px rgba(30, 136, 229, 0.18);
}

.editor-button-preview {
  user-select: text;
}

.ab-fv-button-main::before {
  content: "";
  position: absolute;
  top: -45%;
  left: -85%;
  z-index: 1;
  width: 46%;
  height: 190%;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.72) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(25deg);
  animation: ab-fv-shine 2.8s infinite;
}

@keyframes ab-fv-shine {
  0% {
    left: -85%;
  }
  45% {
    left: 135%;
  }
  100% {
    left: 135%;
  }
}

.ab-fv-note {
  display: inline-block;
  position: relative;
  max-width: 620px;
  margin: 12px auto 0 !important;
  padding-left: 18px;
  color: #4b5563;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.6;
  text-align: left;
}

.ab-fv-note::before {
  content: "▲";
  position: absolute;
  left: 0;
  top: 0.12em;
  color: #ff9800;
  font-size: 12px;
}

/* デザイン色 */
.ab-fv.ab-fv--blue {
  background:
    radial-gradient(circle at 88% 14%, rgba(30, 136, 229, 0.12) 0, rgba(30, 136, 229, 0.12) 100px, transparent 101px),
    radial-gradient(circle at 8% 92%, rgba(255, 152, 0, 0.10) 0, rgba(255, 152, 0, 0.10) 95px, transparent 96px),
    linear-gradient(180deg, #f7fbff 0%, #ffffff 58%, #f1f8ff 100%);
}

.ab-fv.ab-fv--orange {
  background:
    radial-gradient(circle at 88% 14%, rgba(255, 152, 0, 0.12) 0, rgba(255, 152, 0, 0.12) 100px, transparent 101px),
    radial-gradient(circle at 8% 92%, rgba(255, 87, 34, 0.10) 0, rgba(255, 87, 34, 0.10) 95px, transparent 96px),
    linear-gradient(180deg, #fffaf3 0%, #ffffff 58%, #fff4e6 100%);
  border-color: rgba(255, 152, 0, 0.18);
}

.ab-fv.ab-fv--orange .ab-fv-badge {
  color: #b45f00;
}

.ab-fv.ab-fv--orange .ab-fv-badge::before,
.ab-fv.ab-fv--orange .ab-fv-point::before {
  background: #ff9800;
}

.ab-fv.ab-fv--green {
  background:
    radial-gradient(circle at 88% 14%, rgba(46, 175, 99, 0.12) 0, rgba(46, 175, 99, 0.12) 100px, transparent 101px),
    radial-gradient(circle at 8% 92%, rgba(30, 136, 229, 0.08) 0, rgba(30, 136, 229, 0.08) 95px, transparent 96px),
    linear-gradient(180deg, #f3fff7 0%, #ffffff 58%, #ecfbf1 100%);
  border-color: rgba(46, 175, 99, 0.18);
}

.ab-fv.ab-fv--green .ab-fv-badge {
  color: #1b7f45;
}

.ab-fv.ab-fv--green .ab-fv-badge::before,
.ab-fv.ab-fv--green .ab-fv-point::before {
  background: #2eaf63;
}

.ab-fv.ab-fv--green .ab-fv-button-main {
  background: linear-gradient(135deg, #2eaf63 0%, #168747 100%);
  box-shadow: 0 8px 0 #0f6334, 0 14px 24px rgba(46, 175, 99, 0.28);
}

.ab-fv.ab-fv--simple {
  background: #ffffff;
  border-color: #e5e7eb;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.ab-fv.ab-fv--simple .ab-fv-point {
  background: #fafafa;
  border-color: #e5e7eb;
}

/* エディター */
.editor-styles-wrapper .ab-fv {
  max-width: 920px;
}

.editor-styles-wrapper .ab-fv-title {
  font-size: clamp(30px, 4.6vw, 48px);
}

/* タブレット */
@media screen and (max-width: 900px) {
  .ab-fv {
    max-width: 100%;
    padding: 24px 18px 26px;
  }

  .ab-fv-title {
    font-size: clamp(28px, 5vw, 42px);
  }

  .ab-fv-lead {
    font-size: 15px;
  }

  .ab-fv-button {
    min-width: 220px;
    font-size: 16px;
  }
}

/* スマホ */
@media screen and (max-width: 767px) {
  .ab-fv {
    margin: 24px auto;
    padding: 22px 14px 24px;
    border-radius: 20px;
  }

  .ab-fv-badge {
    font-size: 12px;
    padding: 7px 12px;
  }

  .ab-fv-title {
    margin-bottom: 14px !important;
    font-size: 28px;
    line-height: 1.24;
    letter-spacing: -0.03em;
  }

  .ab-fv-lead {
    margin-bottom: 18px !important;
    font-size: 14px;
    line-height: 1.75;
    text-align: left;
  }

  .ab-fv-points {
    gap: 8px;
    margin-bottom: 20px !important;
  }

  .ab-fv-point {
    padding: 10px 12px 10px 38px;
    font-size: 14px;
  }

  .ab-fv-point::before {
    left: 12px;
    width: 18px;
    height: 18px;
    font-size: 11px;
  }

  .ab-fv-buttons {
    flex-direction: column;
    gap: 10px;
  }

  .ab-fv-button {
    width: 100%;
    min-width: 0;
    min-height: 54px;
    padding: 15px 20px;
    font-size: 16px;
  }

  .ab-fv-note {
    font-size: 12px;
  }

  .ab-fv-image {
    border-radius: 16px;
  }

  .ab-fv-image-placeholder {
    min-height: 180px;
    border-radius: 16px;
  }
}

/* 狭いスマホ */
@media screen and (max-width: 420px) {
  .ab-fv-title {
    font-size: 25px;
  }

  .ab-fv-lead {
    font-size: 13px;
  }

  .ab-fv-point {
    font-size: 13px;
  }

  .ab-fv-badge {
    font-size: 11px;
  }
}

/* 動きを減らす設定 */
@media (prefers-reduced-motion: reduce) {
  .ab-fv-button,
  .ab-fv-button::before {
    animation: none !important;
    transition: none !important;
  }
}