/*
 * 施工事例ページ専用CSSです。
 * hse- という接頭辞で、Lightningや他プラグインのCSSとの衝突を防いでいます。
 */
:root {
  --hse-accent: #069aa8;
  --hse-accent-dark: #057682;
  --hse-ink: #182226;
  --hse-muted: #68757b;
  --hse-soft: #f3f7f7;
  --hse-line: #dce5e7;
  --hse-radius: 14px;
}

/* このプラグインが作成したプレビューページだけを全幅化します。 */
body.hse-generated-page .page-header,
body.hse-case-single-page .page-header { display: none; }
body.hse-generated-page .breadcrumb,
body.hse-case-single-page .breadcrumb { margin-top: 0; }
body.hse-generated-page .siteContent { padding-top: 0; }
body.hse-generated-page main > .entry-header { display: none; }
body.hse-generated-page .entry-content { margin-top: 0; }
body.hse-generated-page .container.siteContent-container,
body.hse-generated-page .siteContent-container,
body.hse-generated-page main.mainSection { width: 100%; max-width: none; padding-right: 0; padding-left: 0; }
body.hse-generated-page .mainSection-col-two { width: 100%; }
body.hse-generated-page .subSection { display: none; }

.hse-page.hse-works-page { width: min(1120px, calc(100% - 40px)); margin-inline: auto; color: var(--hse-ink); }
.hse-page,
.hse-page * { box-sizing: border-box; }
.hse-eyebrow { margin: 0 0 12px; color: var(--hse-accent-dark); font-size: 12px; font-weight: 800; letter-spacing: .18em; }
.hse-simple-hero { padding: clamp(65px, 9vw, 120px) 0 42px; text-align: center; }
.hse-simple-hero h1 { margin: 0 0 18px; color: var(--hse-ink); font-size: clamp(34px, 5vw, 60px); font-weight: 700; line-height: 1.35; }
.hse-button { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 13px 24px; border: 1px solid var(--hse-accent); border-radius: 999px; background: var(--hse-accent); color: #fff; font-size: 15px; font-weight: 700; line-height: 1.3; text-decoration: none; transition: background .2s ease, transform .2s ease; }
.hse-button:hover { background: var(--hse-accent-dark); color: #fff; transform: translateY(-1px); }
.hse-text-link { color: var(--hse-accent-dark); font-weight: 700; text-decoration: none; }

/* 検索フォーム：PCは4列、iPadは2列、スマホは1列です。 */
.hse-works { padding-bottom: 90px; }
.hse-works-filter { display: grid; grid-template-columns: 1.2fr repeat(3, 1fr); gap: 14px; padding: clamp(22px, 3vw, 34px); border: 1px solid var(--hse-line); border-radius: var(--hse-radius); background: var(--hse-soft); }
.hse-filter-field label { display: block; margin-bottom: 7px; color: var(--hse-ink); font-size: 13px; font-weight: 700; }
.hse-filter-field input,
.hse-filter-field select { width: 100%; min-height: 48px; padding: 10px 13px; border: 1px solid #c9d5d8; border-radius: 7px; background: #fff; color: var(--hse-ink); }
.hse-filter-actions { grid-column: 1 / -1; display: flex; align-items: center; justify-content: flex-end; gap: 20px; padding-top: 4px; }
.hse-filter-reset { color: var(--hse-muted); font-size: 14px; }
.hse-result-count { margin: 30px 0 18px; color: var(--hse-muted); }
.hse-result-count strong { color: var(--hse-ink); font-size: 24px; }

/* 施工事例カード */
.hse-case-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 2.5vw, 30px); }
.hse-case-card { overflow: hidden; border: 1px solid var(--hse-line); border-radius: 12px; background: #fff; box-shadow: 0 7px 24px rgba(25, 47, 52, .06); }
.hse-case-image { display: block; overflow: hidden; aspect-ratio: 4 / 3; background: #eaf0f1; }
.hse-case-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.hse-case-card:hover .hse-case-image img { transform: scale(1.035); }
.hse-image-placeholder { display: grid; height: 100%; place-items: center; color: #8a989d; }
.hse-case-card-body { padding: 20px; }
.hse-case-label { margin: 0 0 8px; color: var(--hse-accent-dark); font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.hse-case-card h3 { margin: 0 0 7px; font-size: 19px; line-height: 1.55; }
.hse-case-card h3 a { color: var(--hse-ink); text-decoration: none; }
.hse-case-vehicle { margin: 0 0 15px; color: var(--hse-muted); font-size: 14px; }
.hse-case-film { margin: -5px 0 15px; color: var(--hse-ink); font-size: 13px; line-height: 1.6; }
.hse-case-film span { display: inline-block; margin-right: 8px; color: var(--hse-muted); font-size: 11px; font-weight: 700; }
.hse-no-results { padding: 55px 24px; border: 1px solid var(--hse-line); border-radius: var(--hse-radius); text-align: center; }

/* ページ番号は現在地の前後だけを表示し、件数が増えてもスマホからはみ出させません。 */
.hse-pagination { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin-top: 40px; }
.hse-pagination a,
.hse-pagination .is-current { display: grid; min-width: 42px; height: 42px; padding: 0 11px; place-items: center; border: 1px solid var(--hse-line); border-radius: 999px; color: var(--hse-ink); text-decoration: none; }
.hse-pagination .is-current { border-color: var(--hse-accent); background: var(--hse-accent); color: #fff; }
.hse-pagination .hse-page-nav { min-width: 66px; }
.hse-page-gap { padding: 0 2px; color: var(--hse-muted); }

/* 施工事例の個別ページ */
.hse-case-single { color: var(--hse-ink); }
.hse-case-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 30px 0 50px; padding: 0; border-top: 1px solid var(--hse-line); }
.hse-case-facts > div { display: grid; grid-template-columns: 145px 1fr; gap: 15px; padding: 15px 0; border-bottom: 1px solid var(--hse-line); }
.hse-case-facts dt { color: var(--hse-muted); font-size: 13px; font-weight: 700; }
.hse-case-facts dd { margin: 0; }
.hse-case-note { margin: 50px 0; padding: 28px; border-left: 4px solid var(--hse-accent); background: var(--hse-soft); }

@media (max-width: 900px) {
  .hse-works-filter { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hse-case-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .hse-page.hse-works-page { width: min(100% - 28px, 1120px); }
  .hse-works-filter { grid-template-columns: 1fr; padding: 18px; }
  .hse-filter-actions { align-items: stretch; flex-direction: column; }
  .hse-filter-actions .hse-button { width: 100%; }
  .hse-case-grid { grid-template-columns: 1fr; }
  .hse-case-facts { grid-template-columns: 1fr; }
  .hse-case-facts > div { grid-template-columns: 110px 1fr; }
  .hse-pagination { gap: 6px; }
  .hse-pagination a,
  .hse-pagination .is-current { min-width: 40px; height: 40px; padding: 0 9px; }
}

@media (prefers-reduced-motion: reduce) {
  .hse-case-image img,
  .hse-button { transition: none !important; }
}
