/* ==========================================================================
   page-service.css
   Mobile-first responsive layout
   base          → structural / shared (no sizing)
   < 640px       → phone (implicit: base only)
   >= 640px (sm) → small tablet
   >= 768px (md) → tablet
   >= 1024px(lg) → desktop
   ========================================================================== */

/* ── Base (structural / shared) ─────────────────────────────────────────── */

/* メニュー一覧 */
.service-grid { display: grid; }
.service-card { display: flex; flex-direction: column; text-decoration: none; }
.service-media { position: relative; border-radius: 10px; display: flex; flex-direction: column; }
.service-media img { width: 100%; height: auto; object-fit: cover; display: block; aspect-ratio: 100/78; border-radius: 10px; }
.service-media::after { content: ""; position: absolute; background: url("../img/service_badge_click.png") no-repeat center / contain; pointer-events: none; }
.service-title { width: 100%; background: url("../img/material_label_yellow.png") no-repeat center / 100% 100%; text-align: center; font-weight: 900; color: #003a8f; pointer-events: none; }

/* カード共通 */
.service-service-card { background: #ffffff; border-radius: 10px; position: relative; border: 1px solid var(--theme-color-grey); }
.service-service-head { display: flex; align-items: center; position: relative; }
.service-service-label { position: absolute; }
.service-service-label img { width: auto; object-fit: contain; display: block; }
.service-service-title { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-weight: 900; color: var(--theme-color-blue); }
.service-service-hero img { width: 100%; object-fit: cover; display: block; border: 1px solid var(--theme-color-grey); border-radius: 10px; }
.service-service-body { line-height: 1.7; color: #000; }
.service-service-body p { margin: 0 0 16px; }
.service-service-foot { line-height: 1.7; color: #000; }
.service-service-foot p { margin: 0 0 16px; }
.cta-row { display: flex; justify-content: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; font-weight: 900; border-radius: 5px; }
.btn-blue { background: var(--theme-color-blue); color: #ffffff; }
.btn-blue:hover { opacity: 0.92; }
.btn-orange { background: var(--theme-color-orange); color: #ffffff; }
.btn-orange:hover { opacity: 0.92; }
.service-hashtag span { color: var(--theme-color-blue-shallow); }
.service-extra img { width: 100%; height: auto; display: block; }

/* お悩みグリッド共通 */
.service-problem-grid { display: grid; }
.service-problem { display: block; border-radius: 12px; overflow: hidden; position: relative; }
.service-problem-img { width: 100%; object-fit: cover; display: block; }
.problem-label { position: absolute; left: 0; top: 0; width: 100%; z-index: 2; }
.problem-label-bg { position: absolute; left: 0; top: 0; object-fit: cover; display: block; z-index: 1; }
.problem-label-title { position: relative; z-index: 2; margin: 0; color: var(--theme-color-yellow); letter-spacing: .02em; }

/* よくある組み合わせ */
.service-combo-card { background: #ffffff; border-radius: 10px; position: relative; border: 1px solid var(--theme-color-grey); }
.combo-panel { position: relative; background: var(--theme-color-skyblue-shallow); border-radius: 16px; }
.combo-heading { position: absolute; left: 50%; transform: translateX(-50%); }
.combo-pill { background: #ffffff; border: 6px solid var(--theme-color-blue); color: var(--theme-color-blue); font-weight: 900; border-radius: 28% 50% 50% 47% / 54% 50% 45% 42%; }
.combo-row { display: flex; align-items: center; }
.combo-card { background: #ffffff; border-radius: 14px; }
.combo-x { color: var(--theme-color-blue); font-weight: 900; line-height: 1; }
.combo-service-card { display: block; text-decoration: none; color: inherit; }
.combo-service-media { position: relative; border-radius: 10px; display: flex; flex-direction: column; }
.combo-service-media img { width: 100%; height: auto; object-fit: cover; display: block; aspect-ratio: 100/78; border-radius: 10px; }
.combo-service-title { width: 100%; background: url("../img/material_label_yellow.png") no-repeat center / 100% 100%; text-align: center; font-weight: 900; color: var(--theme-color-blue); pointer-events: none; }
.combo-service-card:hover .service-title { filter: brightness(0.98); }
.combo-service-card:focus-visible { outline: 4px solid rgba(11,78,162,0.35); outline-offset: 6px; border-radius: 16px; }

/* ── Phone (< 640px implied by base + sizing defaults) ─────────────────── */

.service-menu { padding: 48px 0; }
.service-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
.service-media::after { top: -36px; right: -18px; width: 120px; height: 120px; }
.service-title { font-size: 16px; padding: 12px 0; }
.service-service { padding: 48px 0; }
.service-service-card { padding: 56px 16px 32px; }
.service-service-head { gap: 18px; margin-bottom: 18px; }
.service-service-label { left: -32px; top: -40px; }
.service-service-label img { height: 44px; }
.service-service-title { font-size: 22px; }
.service-service-title--minor-renovation { font-size: 22px; }
.service-service-title--combo { font-size: 22px; margin-left: 0; }
.service-service-hero img { height: 220px; }
.service-service-body { margin-top: 20px; font-size: 15px; }
.service-service-foot { margin-top: 22px; font-size: 15px; }
.cta-row { flex-wrap: wrap; gap: 12px; margin: 32px 0 0; align-items: stretch; }
.cta-row .btn { flex: 1 1 220px; max-width: 420px; width: 100%; }
.btn { font-size: 16px; padding: 14px 18px; min-width: 220px; }
.service-hashtag { font-size: 16px; }
.service-extra { margin-top: 18px; }
.service-problem-grid { margin-top: 18px; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.service-problem-img { height: 140px; }
.problem-label { height: 68px; }
.problem-label-bg { width: 100%; }
.problem-label-title { font-size: 14px; padding: 10px 12px 0; }
.service-combo { padding: 48px 0; }
.service-combo-card { padding: 56px 16px 0px; }
.combo-heading { top: -40px; width: max-content; }
.combo-group { margin: 68px auto; }
.combo-panel { padding: 40px 16px 16px; }
.combo-row { flex-direction: column; gap: 12px; }
.combo-card { padding: 12px 12px 14px; }
.combo-x { font-size: 40px; transform: none; }
.combo-pill { font-size: 18px; padding: 12px 24px; }
.combo-service-title { font-size: 16px; padding: 12px 0; }

/* ── sm (>= 640px) – small tablet ──────────────────────────────────────── */
@media (width >= 640px) {
  .service-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .service-service-card { padding: 56px 24px 32px; }
  .combo-row { flex-direction: row; gap: 12px; }
}

/* ── md (>= 768px) – tablet ────────────────────────────────────────────── */
@media (width >= 768px) {
  .service-menu { max-width: calc(100% - 48px); margin: 0 auto; padding: 40px 0; }
  .service-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .service-media::after { top: -44px; right: -22px; width: 132px; height: 132px; }
  .service-title { font-size: 16px; padding: 12px 0; }
  .service-service { padding: 40px 24px; }
  .service-service-card { max-width: calc(100% - 48px); margin: 0 auto; padding: 64px 32px 48px; }
  .service-service-label { left: -56px; top: -52px; }
  .service-service-label img { height: 52px; }
  .service-service-title { font-size: 26px; }
  .service-service-title--minor-renovation { font-size: 24px; }
  .service-service-title--combo { font-size: 24px; gap: 10px; margin-left: 18px; }
  .service-service-hero img { height: 280px; }
  .service-service-body { font-size: 16px; }
  .service-service-foot { font-size: 16px; }
  .cta-row { flex-wrap: wrap; gap: 12px; }
  .cta-row .btn { flex: 1 1 260px; min-width: 260px; max-width: none; width: auto; }
  .service-problem-grid { grid-template-columns: repeat(2, 1fr); }
  .service-problem-img { height: 150px; }
  .problem-label-bg { width: 78%; }
  .problem-label-title { font-size: 15px; }
  .service-combo { padding: 40px 24px; }
  .service-combo-card { max-width: calc(100% - 48px); margin: 0 auto; padding: 64px 32px 48px; }
  .combo-heading { width: auto; }
  .combo-group { max-width: 100%; margin: 56px auto; }
  .combo-panel { padding: 44px 16px 16px; }
  .combo-row { gap: 12px; }
  .combo-x { font-size: 44px; transform: translateY(-4px); }
  .combo-pill { font-size: 20px; padding: 12px 28px; }
  .combo-service-title { font-size: 16px; padding: 12px 0; }
}

/* ── lg (>= 1024px) – desktop ──────────────────────────────────────────── */
@media (width >= 1024px) {
  .service-menu { max-width: 896px; margin: 0 auto; padding: 48px 0; }
  .service-grid { grid-template-columns: repeat(3, 1fr); gap: 22px; }
  .service-media::after { top: -54px; right: -32px; width: 160px; height: 160px; }
  .service-title { font-size: 18px; padding: 14px 0; }
  .service-service { padding: 48px 0; }
  .service-service-card { max-width: 896px; margin: 0 auto; padding: 80px 64px 64px; }
  .service-service-head { gap: 18px; margin-bottom: 18px; }
  .service-service-label { left: -90px; top: -60px; }
  .service-service-label img { height: 60px; }
  .service-service-title { font-size: 32px; }
  .service-service-title--minor-renovation { font-size: 28px; }
  .service-service-title--combo { font-size: 28px; gap: 12px; margin-left: 32px; }
  .service-service-hero img { height: 320px; }
  .service-service-body { font-size: 16px; }
  .service-service-foot { font-size: 16px; }
  .cta-row { gap: 16px; flex-wrap: nowrap; }
  .cta-row .btn { flex: 0 0 auto; min-width: 220px; max-width: none; width: auto; }
  .service-problem-grid { grid-template-columns: repeat(var(--cols, 2), 1fr); gap: 16px; }
  .service-problem-img { height: 160px; }
  .problem-label-bg { width: var(--label-bg-w, 60%); }
  .problem-label-title { font-size: 16px; }
  .service-combo { padding: 48px 0; }
  .service-combo-card { max-width: 896px; margin: 0 auto; padding: 80px 64px 0; }
  .combo-group { max-width: 920px; margin: 48px auto; }
  .combo-panel { padding: 48px 18px 18px; }
  .combo-row { gap: 0; }
  .combo-card { padding: 12px 12px 14px; }
  .combo-x { font-size: 54px; transform: translateY(-6px); }
  .combo-pill { font-size: 22px; padding: 14px 32px; }
  .combo-service-title { font-size: 18px; padding: 14px 0; }
}
