/* ===============================
   屋根修理比較.com トップ専用CSS（top.css）
   余計な副作用を避けるため .home で厳密スコープ
   =============================== */

/* 中央寄せラッパー */
.home .top-wrap{
  max-width:1200px;
  margin:0 auto;
  padding:0 16px;
}

/* ---------- ヒーロー ---------- */
.home .top-hero{
  background:#fffacd; /* 必要なら変更 */
  color:#000;
  margin:0 0 16px 0;
  border-radius:0;
  overflow:hidden;
}
.home .top-hero__media{ margin:0; }
.home .top-hero__media img{
  display:block;
  width:100%;
  height:auto;
}
.home .top-hero__text{ padding:16px; }
.home .top-hero__title{
  font-size:clamp(22px,2.6vw,34px);
  margin:8px 0;
  line-height:1.3;
}
.home .top-hero__lead{ opacity:.9; margin:0 0 12px; }

/* 管理バー対策（ログイン時） */
body.admin-bar .top-hero{ margin-top:32px; }

/* ボタン */
.home .btn{
  display:inline-block;
  padding:.75em 1.1em;
  border-radius:999px;
  text-decoration:none;
  border:1px solid currentColor;
  font-weight:600;
}
.home .btn--primary{ background:#22c55e; border-color:#22c55e; color:#fff; }
.home .btn--ghost{ background:transparent; color:#fff; border-color:#fff; }

/* ---------- 共通見出し装飾 ---------- */
.home .sec-title{
  position:relative;
  font-size:1.6rem;
  padding-left:.6em;
  border-left:4px solid #22c55e;
  margin:40px 0 16px;
  font-weight:700;
  line-height:1.4;
}
.home .subsec-title{ font-size:1rem; margin:16px 0 8px; }

/* ---------- クイックカード ---------- */
.home .card-grid{
  --cols:2;
  display:grid !important;
  gap:12px;
  grid-template-columns:repeat(var(--cols),1fr);
  list-style:none;
  padding:0;
  margin:0;
}
@media (min-width:640px){ .home .card-grid{ --cols:3; } }
@media (min-width:1024px){ .home .card-grid{ --cols:4; } }
.home .card{
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:12px;
  box-shadow:0 1px 2px rgba(0,0,0,.05);
}
.home .card__link{
  display:grid;
  gap:6px;
  padding:14px;
  text-decoration:none;
  color:inherit;
}
.home .card__icon{ font-size:22px; }
.home .card__ttl{ font-weight:700; }
.home .card__desc{ font-size:.9rem; color:#4b5563; }

/* ---------- エリア ---------- */
.home .area-grid{
  display:grid !important;
  grid-template-columns:repeat(3,1fr);
  gap:12px;
  list-style:none;
  padding:0;
  margin:0;
}
.home .area-card{
  background:#f8fafc;
  border:1px solid #e5e7eb;
  border-radius:12px;
}
.home .area-card__link{
  display:block;
  padding:14px;
  text-align:center;
  text-decoration:none;
  color:#0f172a;
}
.home .area-list{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  list-style:none;
  padding:0;
  margin:10px 0 0;
}
.home .area-list a{
  text-decoration:none;
  color:#0f172a;
  background:#f1f5f9;
  border:1px solid #e5e7eb;
  border-radius:999px;
  padding:.4em .8em;
}

/* ---------- 災害リンク（ピル） ---------- */
.home .pill-links{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  list-style:none;
  padding:0;
  margin:0;
}
.home .pill{
  display:inline-block;
  text-decoration:none;
  color:#0f172a;
  background:#e2e8f0;
  border:1px solid #cbd5e1;
  border-radius:999px;
  padding:.6em 1em;
}

/* ---------- 比較フロー ---------- */
.home .flow-steps{
  display:grid !important;
  grid-template-columns:repeat(2,1fr);
  gap:8px;
  list-style:decimal inside;
  margin:8px 0 12px;
  padding:0;
}
@media (min-width:640px){
  .home .flow-steps{ grid-template-columns:repeat(4,1fr); }
}
.home .flow-step{
  background:#f8fafc;
  border:1px solid #e5e7eb;
  border-radius:10px;
  padding:10px;
  text-align:center;
}
.home .flow-cta{ margin:8px 0 0; }

/* ---------- ニュース3件（崩れ防止の強制安定化） ---------- */
.home .top-news{ margin-top:16px; }
.home .top-news .news-list{
  list-style:none !important;
  margin:0 !important;
  padding:0 !important;
  display:grid !important;
  grid-template-columns:1fr !important;
  gap:12px !important;
}
@media (min-width:640px){
  .home .top-news .news-list{ grid-template-columns:repeat(3,1fr) !important; }
}
.home .top-news .news-list > li,
.home .top-news .news-item,
.home .top-news .news-link{
  float:none !important;
  display:block !important;
  clear:none !important;
}
.home .top-news .news-item{
  border:1px solid #e5e7eb !important;
  border-radius:12px !important;
  background:#fff !important;
  overflow:hidden !important;
  margin:0 !important;
}
.home .top-news .news-link{
  text-decoration:none !important;
  color:#0f172a !important;
  padding:12px 14px !important;
  display:grid !important;
  grid-template-columns:1fr auto !important;
  align-items:center !important;
  gap:12px !important;
}
.home .top-news .news-title{
  font-weight:600 !important;
  min-width:0 !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}
.home .top-news .news-date{
  color:#64748b !important;
  font-size:.9rem !important;
  flex:0 0 auto !important;
}

/* ---------- 地域子ページのピル ---------- */
.home .area-subnav .pill-links{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  list-style:none;
  margin:6px 0 0;
  padding:0;
}
.home .area-subnav .pill{
  display:inline-block;
  text-decoration:none;
  color:#0f172a;
  background:#e2e8f0;
  border:1px solid #cbd5e1;
  border-radius:999px;
  padding:.6em 1em;
}

/* --- area card styling --- */
.yh-grid3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.yh-card {
  display: block;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 1.2rem 1rem;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  transition: all .25s ease;
}

.yh-card:hover {
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
  transform: translateY(-2px);
  border-color: #238cdd;
}

.yh-card h3 {
  font-size: 1.1rem;
  color: #238cdd;
  margin-bottom: .3rem;
}

.yh-card p {
  font-size: .9rem;
  color: #555;
  line-height: 1.5;
  margin: 0;
}


/* area cards (global) */
.yh-grid3 { display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:1.5rem; }
.yh-card { display:block; background:#fff; border:1px solid #e0e0e0; border-radius:12px; padding:1.2rem 1rem;
  text-decoration:none; color:inherit; box-shadow:0 1px 3px rgba(0,0,0,.05); transition:all .25s ease; }
.yh-card:hover { box-shadow:0 4px 14px rgba(0,0,0,.12); transform:translateY(-2px); border-color:#238cdd; }
.yh-card h3 { font-size:1.1rem; color:#238cdd; margin:0 0 .3rem; }
.yh-card p { font-size:.9rem; color:#555; margin:0; line-height:1.5; }