/* ============================================================
   common.css -- 全ページ共通スタイル（Phase 1）
   ============================================================ */

/* ========== レイアウト安定化 ========== */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

.site-header,
.header-inner,
.container,
.hero-content,
.form-card,
.mobile-nav,
.cta-wrapper,
.action-row,
.float-cta {
  box-sizing: border-box;
}

/* ========== フローティングCTA（追従・site/mobile-sticky-cta.js） ========== */
.float-cta {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 800;
}
.float-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--color-lead) 0%, var(--color-lead-hover) 100%);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 14px 22px;
  border-radius: 50px;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(239, 71, 111, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
  max-width: calc(100vw - 40px);
  line-height: 1.3;
  text-align: center;
}
.float-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(239, 71, 111, 0.5);
}
.float-btn--recruit {
  background: linear-gradient(135deg, var(--color-recruit) 0%, var(--color-recruit-hover) 100%);
  box-shadow: 0 6px 20px rgba(47, 163, 107, 0.4);
}
.float-btn--recruit:hover {
  box-shadow: 0 10px 28px rgba(47, 163, 107, 0.5);
}
.float-btn__icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  display: block;
}

@media (max-width: 1099px) {
  body[data-mode] .header-inner {
    justify-content: flex-start;
    gap: 8px;
    padding-left: max(12px, env(safe-area-inset-left, 0px));
    padding-right: max(12px, env(safe-area-inset-right, 0px));
  }

  body[data-mode] .header-left {
    flex: 1 1 auto;
    justify-content: flex-start;
    align-items: center;
    min-width: 0;
    gap: 8px;
  }

  body[data-mode] .header-logo-img {
    height: 34px !important;
  }

  body[data-mode] .header-company-name {
    display: block !important;
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.94rem !important;
    line-height: 1.15;
    text-align: left;
    white-space: nowrap !important;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body[data-mode] .hamburger {
    display: block !important;
    margin-left: auto;
    flex-shrink: 0;
  }

  body[data-mode] .header-cta {
    display: none !important;
  }

  body[data-mode] .header-nav {
    display: none !important;
  }

  body[data-mode] .mobile-nav {
    display: block !important;
    right: 0;
    width: min(320px, calc(100vw - 16px));
    max-width: 100vw;
    transform: translateX(calc(100% + env(safe-area-inset-right, 0px)));
    transition: transform 0.3s ease;
    pointer-events: none;
  }

  body[data-mode] .mobile-nav.is-open {
    transform: translateX(0);
    pointer-events: auto;
  }

  body[data-mode] .mobile-nav-overlay {
    display: none !important;
  }

  body[data-mode] .mobile-nav-overlay.is-visible {
    display: block !important;
  }
}

@media (max-width: 340px) {
  body[data-mode] .header-company-name {
    display: none !important;
  }
}

@media (min-width: 1100px) {
  body[data-mode] .header-nav {
    display: block !important;
  }

  body[data-mode] .hamburger {
    display: none !important;
  }

  body[data-mode] .header-cta {
    display: inline-flex !important;
  }

  body[data-mode] .mobile-nav,
  body[data-mode] .mobile-nav-overlay {
    display: none !important;
  }
}

/* ========== CTA サイズ統一 ========== */
:root {
  --cta-pill-radius: 999px;
  --footer-qr-size: 80px;
  --footer-qr-radius: 8px;
  --footer-qr-frame-padding: 6px;
}

.header-cta {
  font-size: 0.88rem;
  padding: 9px 18px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.cta-btn,
.cta-btn-recruit,
.secondary-btn,
.float-btn,
.phone-link,
.header-cta,
.tab-cta-link,
button.cta-btn,
button.cta-btn-recruit {
  border-radius: var(--cta-pill-radius);
}
.cta-btn,
.cta-btn-recruit,
button.cta-btn,
button.cta-btn-recruit {
  position: relative;
  overflow: hidden;
}
.cta-btn,
.cta-btn-recruit,
.secondary-btn,
.float-btn,
.phone-link,
.header-cta,
.tab-cta-link,
button.cta-btn,
button.cta-btn-recruit {
  box-sizing: border-box;
  max-width: 100%;
}
.cta-btn:not(.fv-cta-btn),
.cta-btn-recruit:not(.fv-cta-btn),
button.cta-btn,
button.cta-btn-recruit {
  max-width: 440px;
  font-size: 1.1rem;
  padding: 15px 30px;
  min-height: 54px;
  line-height: 1.2;
  text-align: center;
  white-space: normal;
}
.cta-wrapper > :where(.cta-btn, .cta-btn-recruit, .fv-cta-btn, .secondary-btn, .phone-link, button.cta-btn, button.cta-btn-recruit),
.action-row > :where(.cta-btn, .cta-btn-recruit, .secondary-btn, .phone-link),
.cta-form-group > :where(.cta-btn, .cta-btn-recruit, .secondary-btn, .phone-link, button.cta-btn, button.cta-btn-recruit) {
  margin-left: auto;
  margin-right: auto;
}
.cta-wrapper > :where(.cta-micro, .small-note),
.action-row > :where(.cta-micro, .small-note),
.cta-form-group > :where(.cta-micro, .small-note) {
  width: 100%;
  text-align: center;
}
.cta-form-group {
  width: 100%;
  text-align: center;
  box-sizing: border-box;
}
.form-card form {
  display: block;
  width: 100% !important;
  max-width: none !important;
  box-sizing: border-box;
}
.tab-cta-link {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  white-space: normal;
}
.hero-content .cta-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero-content .cta-wrapper > .cta-btn,
.hero-content .cta-wrapper > .cta-btn-recruit,
.hero-content .cta-wrapper > .fv-cta-btn,
.hero-content .cta-wrapper > button.cta-btn,
.hero-content .cta-wrapper > button.cta-btn-recruit {
  align-self: center;
  margin-left: auto;
  margin-right: auto;
}
.hero-content .cta-wrapper > .small-note {
  width: 100%;
  text-align: center;
}
@media (max-width: 767px) {
  :root {
    --mobile-cta-max-width: 320px;
    --mobile-cta-min-height: 52px;
    --mobile-cta-padding-y: 14px;
    --mobile-cta-padding-x: 18px;
    --mobile-cta-font-size: 0.92rem;
    --mobile-cta-gap: 8px;
    --mobile-cta-width: min(calc(100vw - 40px), var(--mobile-cta-max-width));
  }
  .header-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(100%, var(--mobile-cta-width));
    max-width: var(--mobile-cta-width);
    padding: var(--mobile-cta-padding-y) var(--mobile-cta-padding-x);
    min-height: var(--mobile-cta-min-height);
    font-size: var(--mobile-cta-font-size);
    text-align: center;
    white-space: normal !important;
  }
  .cta-wrapper,
  .action-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: none;
    gap: 10px;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }
  .cta-form-group,
  .form-card form > .cta-form-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: none;
    gap: 10px;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }
  .cta-wrapper {
    margin-top: 32px !important;
  }
  .cta-wrapper > .cta-micro,
  .cta-form-group > .cta-micro {
    margin-bottom: 0 !important;
  }
  .cta-wrapper > .small-note,
  .cta-form-group > .small-note {
    margin-top: 0 !important;
  }
  .cta-btn,
  .cta-btn-recruit,
  .fv-cta-btn,
  .secondary-btn,
  .phone-link,
  button.cta-btn,
  button.cta-btn-recruit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(100%, var(--mobile-cta-width)) !important;
    max-width: var(--mobile-cta-width) !important;
    min-width: 0 !important;
    margin-left: auto;
    margin-right: auto;
    min-height: var(--mobile-cta-min-height) !important;
    padding: var(--mobile-cta-padding-y) var(--mobile-cta-padding-x) !important;
    box-sizing: border-box !important;
    border-radius: 999px !important;
    font-size: var(--mobile-cta-font-size) !important;
    text-align: center;
    white-space: normal !important;
    overflow-wrap: anywhere;
    line-height: 1.3 !important;
  }
  .tab-cta-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(100%, var(--mobile-cta-width)) !important;
    max-width: min(100%, var(--mobile-cta-width)) !important;
    min-height: var(--mobile-cta-min-height) !important;
    padding: var(--mobile-cta-padding-y) var(--mobile-cta-padding-x) !important;
    box-sizing: border-box !important;
    border-radius: var(--cta-pill-radius) !important;
    font-size: var(--mobile-cta-font-size) !important;
    text-align: center;
    white-space: normal !important;
    overflow-wrap: anywhere;
    line-height: 1.3 !important;
    gap: 8px;
  }
  .contact-banner {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 16px !important;
    text-align: center !important;
  }
  .contact-banner > :first-child {
    width: 100%;
  }
  .contact-banner > * {
    width: 100%;
  }
  .contact-banner > .phone-link {
    margin-left: auto;
    margin-right: auto;
    min-width: 0 !important;
  }
  .float-cta {
    left: max(16px, env(safe-area-inset-left, 0px));
    right: max(16px, env(safe-area-inset-right, 0px));
    bottom: max(16px, env(safe-area-inset-bottom, 0px));
    display: flex;
    justify-content: center;
    width: auto;
  }
  .float-btn {
    max-width: min(100%, var(--mobile-cta-max-width));
  }
}

/* ========== Footer グリッド（PC 4列） ========== */
@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: minmax(0, 1.35fr) repeat(3, minmax(0, 1fr));
    align-items: start;
  }
}

/* ========== QR ブロック（PC のみ表示・会社情報列の直下に配置） ========== */
.footer-qr {
  text-align: left;
  margin-top: 20px;
  padding: 0;
  width: fit-content;
  max-width: 100%;
  box-sizing: border-box;
}
.footer-qr img {
  width: var(--footer-qr-size);
  height: var(--footer-qr-size);
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border-radius: var(--footer-qr-radius);
  background: #fff;
  padding: var(--footer-qr-frame-padding);
  display: block;
  margin: 0 0 8px;
  box-sizing: border-box;
  flex-shrink: 0;
}
.footer-qr p {
  color: rgba(255,255,255,0.75);
  font-size: 0.78rem;
  margin: 0;
}
@media (max-width: 767px) {
  .footer-qr { display: none; }
}

/* ============================================================
   箇条書きチェック（形状統一：建設LPお悩みカードの線画と同一）
   色は各要素の color / ::before の background-color で維持
   ============================================================ */
:root {
  --yuiz-check-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpolyline points='20 6 9 17 4 12' fill='none' stroke='%23fff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.worry-check-card .check-mark,
.worry-check-card .check-mark-green,
.worry-list > li > .check-mark,
.worry-list > li > .check-mark.check-mark-green,
.worry-list > li > .check-mark-green {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  margin-right: 14px;
  font-weight: normal;
  box-sizing: border-box;
  overflow: visible;
}

.worry-check-card .check-mark svg,
.worry-check-card .check-mark-green svg,
.worry-list > li > .check-mark svg,
.worry-list > li > .check-mark-green svg {
  width: 20px;
  height: 20px;
  display: block;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  overflow: visible;
}

/* お悩みカード内リスト：不動産LPと同様にアイコンと本文の余白・縦中央揃え */
.worry-check-card .worry-list > li {
  align-items: center;
  gap: 20px;
}
.worry-check-card .worry-list > li > .check-mark,
.worry-check-card .worry-list > li > .check-mark-green {
  margin-right: 0;
}
.worry-check-card .worry-list > li > .worry-text {
  flex: 1;
  min-width: 0;
}
