/**
 * LP テンプレート NEW 専用スタイル（Figma完全準拠版）
 * Template: templates/lp-new.php
 * Figma node: 1-13
 */

/* ============================================================
   CSS Variables & Base
   ============================================================ */
:root {
  --lp-yellow:     #ffd400;
  --lp-yellow-bg:  #fffce6;
  --lp-yellow-nav: #fff8d3;
  --lp-yellow-hl:  #ffe45e;
  --lp-gold:       #d0ad00;
  --lp-dark:       #222222;
  --lp-green:      #239979;
  --lp-red:        #e60013;
  --lp-gray-dark:  #373737;
  --lp-white:      #ffffff;
  --lp-inner:      1000px;
  --lp-gutter:     220px; /* Figma: 220px left/right margin at 1440px */
  --lp-gap:        40px;
}

.lp-new-wrap {
  font-family: 'Noto Sans JP', 'Roboto', sans-serif;
  color: var(--lp-dark);
  background: var(--lp-white);
}

/* ============================================================
   共通: インストールボタン
   ============================================================ */
.lp-install-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--lp-red);
  color: var(--lp-white);
  font-size: 20px;
  font-weight: 700;
  padding: 12px 48px;
  border-radius: 50px;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.2s;
}
.lp-install-btn:hover { opacity: 0.85; }
.lp-install-btn svg { width: 20px; height: 20px; flex-shrink: 0; }

.lp-cta-bar {
  display: flex;
  justify-content: center;
  padding: 60px 0 80px;
  background: var(--lp-white);
}

/* セクション間CTA（lp_render_cta） */
.lp-cta {
  display: flex;
  justify-content: center;
  padding: 60px 0 80px;
  background: #fff;
}

/* ============================================================
   MV（ヒーロー）セクション
   ============================================================ */
.lp-mv {
  position: relative;
  width: 100%;
  height: 545px;
  overflow: hidden;
}

.lp-mv__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  /* background-image は JS (data-mvbg) または インラインstyleで設定 */
}
.lp-mv__bg--placeholder {
  background-color: #1a1a2e;
}

.lp-mv__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(0,0,0,0.4) 0%,
    rgba(0,0,0,0.4) 60%,
    rgba(0,0,0,0) 100%
  );
}

.lp-mv__inner {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding-left: 260px;
  gap: 48px;
}

/* タイトルカード（オフセット影付き） */
.lp-mv__card-wrap {
  position: relative;
  width: 520px;
}
.lp-mv__card-shadow {
  position: absolute;
  inset: 16px -16px -16px 16px;
  background: rgba(255, 212, 0, 0.68);
  border-radius: 2px;
}
.lp-mv__card {
  position: relative;
  background: #f0f0f0;
  padding: 32px 40px;
  border-radius: 2px;
}

.lp-mv__card-title {
  font-size: 45px;
  font-weight: 700;
  color: var(--lp-dark);
  line-height: 1.32;
  letter-spacing: 0.04em;
  margin: 0;
  white-space: nowrap; /* Figmaの改行を尊重 */
}

/* CTAラップ */
.lp-mv__cta-wrap {
  display: flex;
  justify-content: center;
  width: 520px;
}
.lp-mv__cta-wrap .lp-install-btn {
  font-size: 20px;
  padding: 12px 48px;
}

/* ============================================================
   イントロセクション
   ============================================================ */
.lp-intro {
  background: var(--lp-white);
  padding: 80px 0 100px;
}

.lp-intro__inner {
  max-width: var(--lp-inner);
  margin: 0 auto;
  padding: 0 20px;
  text-align: center;
}

.lp-intro__heading-wrap {
  position: relative;
  display: inline-block; /* テキスト幅に自動収縮 */
  margin-bottom: 28px;
}
.lp-intro__heading-highlight {
  position: absolute;
  bottom: 4px;           /* テキストベースラインに合わせる */
  left: -6px;            /* テキスト端から少しだけはみ出す */
  right: -6px;
  height: 12px;          /* 40px見出しに対して適切な高さ */
  background: var(--lp-yellow-hl);
  z-index: 0;
}
.lp-intro__heading {
  position: relative;
  z-index: 1;
  font-family: 'Roboto', 'Noto Sans JP', sans-serif;
  font-size: 40px;
  font-weight: 600;
  color: var(--lp-dark);
  line-height: 1.28;
  text-align: center;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.lp-intro__lead {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.8;
  color: var(--lp-dark);
  text-align: center;
  margin-bottom: 80px; /* バッジとの余白 */
}

/* ============================================================
   ナビゲーションバッジ（4枚画像）
   ============================================================ */
.lp-nav-badges {
  background: var(--lp-white);
  padding: 0 0 80px;
}
.lp-nav-badges__inner {
  max-width: var(--lp-inner);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 16px;
}

/* 画像リンク */
.lp-nav-badge-img {
  display: block;
  flex: 1;
  max-width: 240px;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  border-radius: 16px;
  overflow: hidden;
}
.lp-nav-badge-img:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.14);
}
.lp-nav-badge-img img {
  width: 100%;
  height: auto;
  display: block;
}

/* ============================================================
   コンテンツセクション（共通）
   ============================================================ */
.lp-section {
  background: var(--lp-yellow-bg);
  padding-bottom: 48px;
}

.lp-section__body {
  padding-top: 48px;
}
.lp-section__inner {
  max-width: var(--lp-inner);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.lp-section__intro {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.8;
  color: var(--lp-dark);
  text-align: center;
  /* white-space: pre-wrap は利用しない（lp_br()に統一済み） */
}

/* ============================================================
   セクションヘッダーバー（全幅黄色）
   ============================================================ */
.lp-section-header {
  background: var(--lp-yellow);
  padding: 28px 0;
}

.lp-section-header__inner {
  max-width: var(--lp-inner);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

/* 左側 */
.lp-section-header__left {
  width: 480px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

/* ハザードパターン（斜線） */
.lp-section-header__hazard {
  width: 100%;
  height: 10px;
  background-image: repeating-linear-gradient(
    -45deg,
    var(--lp-dark)    0px, var(--lp-dark)    5px,
    var(--lp-yellow)  5px, var(--lp-yellow)  10px
  );
}

/* ラベルバッジ */
.lp-section-header__label-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.lp-section-header__badge-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.lp-section-header__badge {
  display: inline-block;
  background: var(--lp-dark);
  color: var(--lp-white);
  font-size: 20px;
  font-weight: 700;
  padding: 6px 20px;
  border-radius: 8px;
  white-space: nowrap;
}
.lp-section-header__badge-arrow {
  width: 16px;
  height: 10px;
  margin-top: 0;
}

.lp-section-header__title {
  font-size: 44px;
  font-weight: 900;
  color: var(--lp-dark);
  text-align: center;
  line-height: 1.28;
  white-space: nowrap;
}

/* 右側: リード文 */
.lp-section-header__lead {
  width: 480px;
  font-family: 'Roboto', 'Noto Sans JP', sans-serif;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.8;
  color: var(--lp-dark);
  /* white-space: pre-line は使わない（nl2brと二重改行になるため） */
}

/* ============================================================
   サブ見出し（左ボーダー付き）
   ============================================================ */
.lp-sub-heading {
  border-left: 12px solid var(--lp-yellow);
  padding-left: 32px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.lp-sub-heading__label {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.6;
  color: var(--lp-dark);
}
.lp-sub-heading__title {
  font-size: 36px;
  font-weight: 700;
  color: var(--lp-dark);
  line-height: 1.2;
  margin: 0;
}

/* ============================================================
   サイドアイテム（テキスト左 ＋ 黄枠画像右）
   ============================================================ */
.lp-section__items {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.lp-item-side__card {
  background: var(--lp-white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
/* 見出しはカード外・黄色背景上 */
.lp-item-side__heading {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 0 16px 20px;   /* 左パディングで黄ボーダー分を確保 */
  border-left: 10px solid var(--lp-yellow);
  margin-bottom: 12px;       /* カードとの間隔 */
}
.lp-item-side__label {
  font-size: 14px;
  font-weight: 500;
  color: var(--lp-dark);
  line-height: 1.6;
  opacity: 0.7;
}
.lp-item-side__title {
  font-size: 32px;
  font-weight: 700;
  color: var(--lp-dark);
  line-height: 1.2;
  margin: 0;
}
.lp-item-side__content {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 24px 28px 28px;
  gap: 24px;
}
.lp-item-side__text {
  flex: 1; /* テキストは伸縮、画像に合わせて配分 */
  min-width: 0;
  font-family: 'Roboto', 'Noto Sans JP', sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.8;
  color: var(--lp-dark);
}
.lp-item-side__text p { margin-bottom: 0.8em; }
.lp-item-side__text p:last-child { margin-bottom: 0; }

.lp-item-side__image-wrap {
  position: relative;
  flex-shrink: 0;
  width: 380px;
}
.lp-item-side__image-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 4px solid var(--lp-yellow);
  border-radius: 10px;
  pointer-events: none;
}
.lp-item-side__image {
  display: block;
  width: 100%;
  border-radius: 10px;
  object-fit: cover;
  aspect-ratio: 4 / 3;
}

/* セクション1 各アイテムの画像高さ指定 */
.lp-item-side-wrap--item1 .lp-item-side__image {
  aspect-ratio: unset;
  height: 224px;
}
.lp-item-side-wrap--item2 .lp-item-side__image {
  aspect-ratio: unset;
  height: 200px;
}
.lp-item-side-wrap--s3b2 .lp-item-side__image {
  aspect-ratio: unset;
  height: 200px;
}

/* ============================================================
   カードグリッド（2列 ＋ 3枚目中央）
   ============================================================ */
.lp-card-grid {
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.lp-card-grid__row {
  display: flex;
  gap: 40px;
  align-items: stretch;
}
.lp-card-grid__row--center {
  justify-content: center;
}

.lp-card {
  background: var(--lp-white);
  border-radius: 8px;
  box-shadow: 0 0 3px rgba(0,0,0,0.2);
  overflow: hidden;
  flex: 0 0 456px;
  display: flex;
  flex-direction: column;
}
.lp-card__header {
  background: var(--lp-gray-dark);
  padding: 8px 20px;
}
.lp-card__label {
  font-size: 20px;
  font-weight: 500;
  color: var(--lp-white);
  text-align: left;
  white-space: nowrap;
}
.lp-card__body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
}
.lp-card__image-wrap {
  padding: 20px 20px 0;
}
.lp-card__image {
  width: 100%;
  border-radius: 8px;
  object-fit: cover;
  aspect-ratio: 416 / 210;
  display: block;
}
.lp-card__image-placeholder {
  width: 100%;
  aspect-ratio: 416 / 210;
  background: #e0e0e0;
  border-radius: 8px;
}
.lp-card__caption {
  font-size: 32px;
  font-weight: 700;
  color: var(--lp-green);
  text-align: center;
  line-height: 1.4;
  padding: 12px 16px 16px;
}

/* ============================================================
   サブブロック（セクション3用）
   ============================================================ */
.lp-sub-block {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* ============================================================
   レスポンシブ
   ============================================================ */
@media (max-width: 1100px) {
  .lp-mv__inner {
    padding-left: 60px;
  }
  .lp-section-header__inner {
    flex-direction: column;
    gap: 24px;
  }
  .lp-section-header__left {
    width: 100%;
  }
  .lp-section-header__lead {
    width: 100%;
    text-align: center;
  }
  .lp-section-header__title {
    white-space: normal;
    font-size: 32px;
  }
  .lp-nav-badges__inner {
    flex-wrap: wrap;
    justify-content: center;
  }
  .lp-nav-badge {
    flex: 0 0 calc(50% - 8px);
    max-width: 240px;
  }
}

@media (max-width: 768px) {
  /* MV */
  .lp-mv { height: auto; min-height: 400px; }
  .lp-mv__inner {
    padding: 40px 20px;
    align-items: center;
    gap: 32px;
  }
  .lp-mv__card-wrap { width: fit-content; max-width: calc(100% - 10px); }
  .lp-mv__card-shadow { inset: 10px -10px -10px 10px; }
  .lp-mv__card { padding: 24px 20px; background: #f0f0f0; }
  .lp-mv__card-title { font-size: 28px; }
  .lp-mv__cta-wrap { width: 100%; box-sizing: border-box; }
  .lp-mv__cta-wrap .lp-install-btn { width: 100%; padding: 12px 0; justify-content: center; }

  /* イントロ */
  .lp-intro { padding: 48px 0 64px; }
  .lp-intro__heading {
    font-size: 24px;
    white-space: normal;
    line-height: 1.6;
    text-decoration: underline;
    text-decoration-color: var(--lp-yellow-hl);
    text-decoration-thickness: 10px;
    text-underline-offset: 4px;
  }
  .lp-intro__heading-highlight { display: none; }
  .lp-intro__lead { font-size: 14px; }

  /* バッジ */
  .lp-nav-badge { flex: 0 0 calc(50% - 4px); }
  .lp-nav-badge__circle { width: 140px; height: 140px; }
  .lp-nav-badge__icon { width: 44px; height: 44px; }
  .lp-nav-badge__title { font-size: 18px; }

  /* ナビゲーションバッジ画像リンク: 2カラム */
  .lp-nav-badges__inner {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }
  .lp-nav-badge-img {
    flex: 0 0 calc(50% - 6px);
    max-width: calc(50% - 6px);
  }

  /* セクションヘッダー */
  .lp-section-header__title { font-size: 28px; }
  .lp-section-header__lead { font-size: 18px; }
  .lp-section-header__badge { font-size: 16px; }

  /* サイドアイテム */
  .lp-item-side__content { flex-direction: column; }
  .lp-item-side__text { flex: 1; font-size: 16px; }
  .lp-item-side__image-wrap { width: 100%; }
  .lp-item-side__title { font-size: 24px; }

  /* カードグリッド */
  .lp-card-grid__row { flex-direction: column; }
  .lp-card { flex: 1; }
  .lp-card__caption { font-size: 22px; }

  /* CTAバー */
  .lp-cta-bar { padding: 40px 20px; }
  .lp-install-btn { font-size: 16px; padding: 12px 32px; }

  /* サブ見出し */
  .lp-sub-heading__title { font-size: 24px; }
}
