/*
 * トソイチ施工事例一覧ページ Ver1.4.0
 * にこにこリフォームの標準アーカイブ（タグ一覧等）と同じサイト幅へ統一。
 * STORK19標準の最大コンテンツ幅1166pxを基準に、狭い固定ページ本文から中央へブレイクアウトする。
 * STORK19 / SWELL の見出し装飾・本文幅の影響をページ内だけリセットする。
 */

.twh-wrap,
.twh-detail-nav{
  --twh-primary:var(--tosoichi-primary,#08783f);
  --twh-primary-dark:var(--tosoichi-primary-dark,#075d34);
  --twh-secondary:var(--tosoichi-secondary,#c9b899);
  --twh-bg:var(--tosoichi-bg,#f7f3ed);
  --twh-card:var(--tosoichi-card,#fff);
  --twh-text:var(--tosoichi-text,#2d2d2d);
  --twh-muted:var(--tosoichi-muted,#777);
  --twh-border:var(--tosoichi-border,#e6e0d7);
  --twh-cta:var(--tosoichi-cta,#08783f);
  --twh-line:#06C755;
  --twh-accent:var(--tosoichi-primary,#08783f);
  color:var(--twh-text)!important;
  font-family:inherit!important;
  line-height:1.8!important;
}

.twh-wrap *,
.twh-wrap *::before,
.twh-wrap *::after,
.twh-detail-nav *{box-sizing:border-box}

.twh-wrap a,
.twh-detail-nav a{text-decoration:none!important}

/* =========================================================
   STORK19 / SWELL 干渉リセット
   ブログ一覧と同じく「中のデザインを独立」させる
========================================================= */
body.twh-hub-page .twh-wrap h1,
body.twh-hub-page .twh-wrap h2,
body.twh-hub-page .twh-wrap h3,
body.twh-hub-page .twh-wrap h4,
body.twh-hub-page .twh-wrap p,
body.twh-hub-page .twh-wrap span,
body.twh-hub-page .twh-wrap strong,
body.twh-hub-page .twh-wrap mark{
  background:transparent!important;
  background-color:transparent!important;
  background-image:none!important;
  box-shadow:none!important;
  text-shadow:none!important;
  border-left:0!important;
}

body.twh-hub-page .twh-wrap h1::before,
body.twh-hub-page .twh-wrap h1::after,
body.twh-hub-page .twh-wrap h2::before,
body.twh-hub-page .twh-wrap h2::after,
body.twh-hub-page .twh-wrap h3::before,
body.twh-hub-page .twh-wrap h3::after,
body.twh-hub-page .twh-wrap h4::before,
body.twh-hub-page .twh-wrap h4::after{
  content:none!important;
  display:none!important;
}

body.twh-hub-page .twh-wrap h1,
body.twh-hub-page .twh-wrap h2,
body.twh-hub-page .twh-wrap h3,
body.twh-hub-page .twh-wrap h4{
  position:static!important;
  width:auto!important;
  min-height:0!important;
  border:0!important;
  border-top:0!important;
  border-right:0!important;
  border-bottom:0!important;
  border-left:0!important;
  border-radius:0!important;
  background:none!important;
  background-color:transparent!important;
  background-image:none!important;
  box-shadow:none!important;
  text-shadow:none!important;
}

/* STORK19 が h3 等へ付ける左線・上下線・装飾・インデントを完全解除 */
body.twh-hub-page .twh-wrap h3,
body.twh-hub-page .twh-wrap .twh-card h3,
body.twh-hub-page .twh-wrap .twh-filter__title h3,
body.twh-hub-page .twh-wrap .twh-linkbox h3{
  border:0!important;
  border-left:0!important;
  padding-left:0!important;
  text-indent:0!important;
  background:transparent!important;
}

body.twh-hub-page.twh-hide-page-title .entry-header,
body.twh-hub-page.twh-hide-page-title .page-header,
body.twh-hub-page.twh-hide-page-title .post-header,
body.twh-hub-page.twh-hide-page-title .entry-title,
body.twh-hub-page.twh-hide-page-title .page-title,
body.twh-hub-page.twh-hide-page-title .post-title,
body.twh-hub-page.twh-hide-page-title .c-pageTitle,
body.twh-hub-page.twh-hide-page-title .c-pageTitle__inner,
body.twh-hub-page.twh-hide-page-title .p-articleHead{
  display:none!important;
  margin:0!important;
  padding:0!important;
  min-height:0!important;
}
body.twh-hub-page.twh-hide-page-title .twh-hero h1{display:block!important}

/* =========================================================
   STORK19 外側幅制限対策
   ブログ一覧と同じ 100vw ブレイクアウト方式
========================================================= */
.entry-content .twh-wrap,
.post_content .twh-wrap,
.entry-content-inner .twh-wrap,
.post-content .twh-wrap{
  width:100vw!important;
  max-width:none!important;
  margin-left:calc(50% - 50vw)!important;
  margin-right:calc(50% - 50vw)!important;
  left:auto!important;
  transform:none!important;
}
.entry-content > .twh-wrap,
.post_content > .twh-wrap,
.entry-content-inner > .twh-wrap,
.post-content > .twh-wrap{
  margin-top:0!important;
  margin-bottom:0!important;
}

body.twh-hub-page .entry-content > p:empty,
body.twh-hub-page .post_content > p:empty,
body.twh-hub-page .entry-content > .wp-block-spacer,
body.twh-hub-page .post_content > .wp-block-spacer{
  display:none!important;
}

/* =========================================================
   基本幅：ブログ一覧と同じ「外側100vw／内側1280px」
========================================================= */
.twh-wrap{
  width:100vw!important;
  max-width:none!important;
  margin:0!important;
  padding:0!important;
  overflow:hidden!important;
  background:#fff!important;
}

.twh-inner{
  width:min(1280px,calc(100% - 80px))!important;
  margin:0 auto!important;
  padding:0!important;
}

.twh-kicker{
  display:block!important;
  margin:0 0 12px!important;
  color:var(--twh-accent)!important;
  font-size:12px!important;
  font-weight:700!important;
  letter-spacing:.22em!important;
  line-height:1.4!important;
  text-transform:uppercase!important;
}

/* =========================================================
   HERO：ブログ一覧と同じフルワイド＋中央900px
========================================================= */
.twh-hero{
  width:100%!important;
  margin:0!important;
  padding:clamp(80px,9vw,135px) 20px clamp(70px,8vw,110px)!important;
  text-align:center!important;
  background:linear-gradient(180deg,#fff 0%,#fffdf9 100%)!important;
}

.twh-hero > .twh-inner{
  width:min(900px,calc(100% - 40px))!important;
  margin:0 auto!important;
}

.twh-hero h1{
  margin:0 0 24px!important;
  padding:0!important;
  border:0!important;
  color:#2d2d2d!important;
  font-size:clamp(38px,5vw,64px)!important;
  font-weight:700!important;
  line-height:1.35!important;
  letter-spacing:.07em!important;
}

.twh-hero__lead{
  margin:0 0 22px!important;
  color:var(--twh-primary)!important;
  font-size:clamp(18px,2vw,24px)!important;
  font-weight:700!important;
  line-height:1.75!important;
}

.twh-hero__text{
  max-width:760px!important;
  margin:0 auto!important;
  color:#666!important;
  font-size:15px!important;
  font-weight:400!important;
  line-height:2.1!important;
}

/* =========================================================
   用途別タブ：中央配置。ブログ一覧の静かなUIに合わせる
========================================================= */
.twh-tabs{
  width:100%!important;
  margin:0!important;
  padding:0 20px clamp(55px,6vw,78px)!important;
  background:#fff!important;
  border:0!important;
}

.twh-tabs__inner{
  width:min(980px,100%)!important;
  margin:0 auto!important;
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:12px!important;
}

.twh-tab{
  appearance:none!important;
  min-height:58px!important;
  padding:12px 16px!important;
  border:1px solid #ded8d0!important;
  border-radius:0!important;
  background:#fff!important;
  color:#444!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
  font:inherit!important;
  font-size:14px!important;
  font-weight:700!important;
  line-height:1.4!important;
  box-shadow:none!important;
  cursor:pointer!important;
  transition:.2s ease!important;
}

.twh-tab span{
  color:#999!important;
  font-size:10px!important;
  letter-spacing:.08em!important;
}

.twh-tab:hover{
  border-color:var(--twh-primary)!important;
  color:var(--twh-primary)!important;
  transform:translateY(-1px)!important;
}

.twh-tab.is-active{
  background:var(--twh-primary)!important;
  border-color:var(--twh-primary)!important;
  color:#fff!important;
}
.twh-tab.is-active span{color:#fff!important}
.twh-tabpanel[hidden]{display:none!important}

/* =========================================================
   セクション：外側100vw、内側1280px
========================================================= */
.twh-section,
.twh-search,
.twh-links-section{
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  border:0!important;
}

.twh-section{
  padding:clamp(75px,8vw,110px) 0!important;
  background:#fff!important;
}

.twh-search{
  padding:clamp(75px,8vw,105px) 0!important;
  background:#f7f2ea!important;
}

.twh-links-section{
  padding:clamp(65px,7vw,90px) 0!important;
  background:#fff!important;
  border-top:1px solid #eee8df!important;
}

.twh-section > .twh-inner,
.twh-search > .twh-inner,
.twh-links-section > .twh-inner{
  width:min(1280px,calc(100% - 80px))!important;
  margin:0 auto!important;
}

/* =========================================================
   見出し：ブログ一覧のタイトルフォーマット
========================================================= */
.twh-heading{
  margin:0 0 55px!important;
  padding:0!important;
  text-align:center!important;
}

.twh-heading h2{
  position:relative!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  background:none!important;
  color:#333!important;
  font-size:clamp(27px,3vw,36px)!important;
  font-weight:700!important;
  line-height:1.55!important;
}

.twh-heading h2::after{
  content:""!important;
  display:block!important;
  width:40px!important;
  height:2px!important;
  margin:20px auto 0!important;
  background:var(--twh-accent)!important;
}

.twh-heading > p:last-child{
  max-width:760px!important;
  margin:18px auto 0!important;
  color:#777!important;
  font-size:14px!important;
  line-height:2!important;
}

/* =========================================================
   施工事例カード：大きく、写真主体
========================================================= */
.twh-grid{
  display:grid!important;
  gap:26px!important;
}

.twh-grid--featured,
.twh-grid--list{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
}

.twh-card{
  margin:0!important;
  border:1px solid #e6e0d8!important;
  background:#fff!important;
  overflow:hidden!important;
  border-radius:0!important;
  box-shadow:none!important;
  transition:border-color .2s ease,transform .2s ease,box-shadow .2s ease!important;
}

.twh-card:hover{
  border-color:#d5c9bb!important;
  transform:translateY(-3px)!important;
  box-shadow:0 12px 28px rgba(40,34,28,.07)!important;
}

.twh-card__link{display:block!important;color:inherit!important}

.twh-card__image{
  width:100%!important;
  aspect-ratio:4/3!important;
  overflow:hidden!important;
  background:#eee!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
}

.twh-card__image img{
  display:block!important;
  width:100%!important;
  height:100%!important;
  margin:0!important;
  object-fit:cover!important;
  object-position:center!important;
  border-radius:0!important;
  transition:transform .3s ease!important;
}

.twh-card:hover .twh-card__image img{transform:scale(1.02)!important}

.twh-card__image.is-empty span{
  color:#aaa!important;
  font-size:13px!important;
  letter-spacing:.08em!important;
}

.twh-card__body{padding:20px 20px 22px!important}

.twh-card__meta{
  margin:0 0 8px!important;
  color:var(--twh-primary)!important;
  font-size:11px!important;
  font-weight:700!important;
  line-height:1.6!important;
}

.twh-card h3{
  margin:0 0 14px!important;
  padding:0!important;
  color:#333!important;
  font-size:16px!important;
  font-weight:700!important;
  line-height:1.75!important;
}

.twh-card__tags{
  display:flex!important;
  flex-wrap:wrap!important;
  gap:6px!important;
  margin:0 0 14px!important;
}

.twh-card__tags span{
  display:inline-flex!important;
  align-items:center!important;
  gap:6px!important;
  padding:4px 8px!important;
  border:1px solid #e5ded5!important;
  background:#fff!important;
  color:#777!important;
  font-size:10px!important;
  line-height:1.3!important;
}

.twh-card__tags i,
.twh-color-dot{
  display:inline-block!important;
  width:11px!important;
  height:11px!important;
  flex:0 0 11px!important;
  border:1px solid rgba(0,0,0,.12)!important;
  border-radius:50%!important;
}

.twh-card__more{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  padding-top:14px!important;
  border-top:1px solid #eee8df!important;
  color:var(--twh-primary)!important;
  font-size:11px!important;
  font-weight:700!important;
}

.twh-card__more b{font-size:16px!important;font-weight:400!important}

/* =========================================================
   探す：生成りのフルワイド帯
========================================================= */
.twh-filter{
  display:grid!important;
  grid-template-columns:220px 1fr!important;
  gap:30px!important;
  align-items:start!important;
  padding:26px 0!important;
  border-top:1px solid #e7ded3!important;
}

.twh-filter:last-child{border-bottom:1px solid #e7ded3!important}

.twh-filter__title{
  display:grid!important;
  grid-template-columns:42px 1fr!important;
  gap:14px!important;
  align-items:center!important;
}

.twh-filter__title > span{
  width:42px!important;
  height:42px!important;
  border:1px solid var(--twh-primary)!important;
  border-radius:50%!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  color:var(--twh-primary)!important;
  font-size:10px!important;
  font-weight:700!important;
}

.twh-filter__title h3{
  margin:0!important;
  padding:0!important;
  color:#333!important;
  font-size:15px!important;
  font-weight:700!important;
  line-height:1.5!important;
}

.twh-filter__items{
  display:flex!important;
  align-items:center!important;
  flex-wrap:wrap!important;
  gap:9px!important;
}

.twh-filter__items a{
  display:inline-flex!important;
  align-items:center!important;
  gap:7px!important;
  min-height:42px!important;
  padding:9px 15px!important;
  border:1px solid #ddd5cb!important;
  background:#fff!important;
  color:#555!important;
  font-size:12px!important;
  font-weight:600!important;
  transition:.2s ease!important;
}

.twh-filter__items a:hover{
  border-color:var(--twh-primary)!important;
  color:var(--twh-primary)!important;
  transform:translateY(-1px)!important;
}

/* =========================================================
   地域別・工事別リンク
========================================================= */
.twh-links-grid{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:28px!important;
}
.twh-links-grid--3{grid-template-columns:repeat(3,minmax(0,1fr))!important}

.twh-linkbox{
  padding:28px 30px!important;
  background:#fff!important;
  border-top:2px solid var(--twh-primary)!important;
  border-left:1px solid #eee8df!important;
  border-right:1px solid #eee8df!important;
  border-bottom:1px solid #eee8df!important;
}

.twh-linkbox h3{
  margin:0 0 18px!important;
  padding:0!important;
  color:#333!important;
  font-size:18px!important;
  font-weight:700!important;
}

.twh-linkbox ul{list-style:none!important;margin:0!important;padding:0!important}
.twh-linkbox li{list-style:none!important;margin:0!important;padding:0!important;border-top:1px solid #eee8df!important}
.twh-linkbox li:last-child{border-bottom:1px solid #eee8df!important}
.twh-linkbox li::before{display:none!important;content:none!important}

.twh-linkbox a{
  display:flex!important;
  justify-content:space-between!important;
  align-items:center!important;
  gap:14px!important;
  padding:13px 2px!important;
  color:#444!important;
  font-size:12px!important;
  font-weight:600!important;
}
.twh-linkbox a:hover{color:var(--twh-primary)!important}
.twh-linkbox b{color:var(--twh-primary)!important;font-weight:400!important}

/* 空表示 */
.twh-empty{
  margin:0!important;
  padding:36px 24px!important;
  background:#faf8f4!important;
  text-align:center!important;
  color:#777!important;
  font-size:13px!important;
}

/* 個別施工事例下部ナビ */
.twh-detail-nav{
  max-width:900px!important;
  margin:55px auto 40px!important;
  padding:38px 30px!important;
  text-align:center!important;
  background:#f7f2ea!important;
  border-top:2px solid var(--twh-primary)!important;
}
.twh-detail-nav h2{
  margin:0!important;
  padding:0!important;
  color:#333!important;
  font-size:23px!important;
  line-height:1.6!important;
}
.twh-detail-nav__chips{
  display:flex!important;
  justify-content:center!important;
  flex-wrap:wrap!important;
  gap:8px!important;
  margin:18px 0!important;
}
.twh-detail-nav__chips a{
  padding:7px 11px!important;
  background:#fff!important;
  border:1px solid #ded7ce!important;
  color:#555!important;
  font-size:11px!important;
}
.twh-btn{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:18px!important;
  min-height:54px!important;
  max-width:420px!important;
  margin:20px auto 0!important;
  padding:13px 20px!important;
  border:1px solid var(--twh-cta)!important;
  border-radius:0!important;
  background:var(--twh-cta)!important;
  color:#fff!important;
  font-size:12px!important;
  font-weight:700!important;
}

/* =========================================================
   Responsive
========================================================= */
@media(max-width:980px){
  .twh-inner,
  .twh-section > .twh-inner,
  .twh-search > .twh-inner,
  .twh-links-section > .twh-inner{
    width:min(100% - 48px,960px)!important;
  }
  .twh-grid--featured,
  .twh-grid--list{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .twh-filter{grid-template-columns:180px 1fr!important}
  .twh-links-grid--3{grid-template-columns:1fr 1fr!important}
}

@media(max-width:767px){
  .twh-inner,
  .twh-section > .twh-inner,
  .twh-search > .twh-inner,
  .twh-links-section > .twh-inner{width:calc(100% - 32px)!important}

  .twh-hero{padding:64px 18px 58px!important}
  .twh-hero > .twh-inner{width:min(100%,760px)!important}
  .twh-hero h1{font-size:38px!important}
  .twh-hero__lead{font-size:17px!important}
  .twh-hero__text{font-size:14px!important;line-height:1.95!important}

  .twh-tabs{padding:0 16px 48px!important}
  .twh-tabs__inner{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  .twh-tab{min-height:50px!important;font-size:12px!important;padding:10px!important}

  .twh-section{padding:62px 0!important}
  .twh-search{padding:62px 0!important}
  .twh-links-section{padding:54px 0!important}

  .twh-heading{margin-bottom:38px!important}
  .twh-heading h2{font-size:26px!important}

  .twh-grid--featured,
  .twh-grid--list{grid-template-columns:1fr!important;gap:18px!important}
  .twh-card__body{padding:17px 16px 19px!important}
  .twh-card h3{font-size:15px!important}

  .twh-filter{grid-template-columns:1fr!important;gap:14px!important;padding:20px 0!important}
  .twh-filter__items{gap:7px!important}
  .twh-filter__items a{min-height:40px!important;padding:8px 12px!important;font-size:11px!important}

  .twh-links-grid,
  .twh-links-grid--2,
  .twh-links-grid--3{grid-template-columns:1fr!important;gap:18px!important}
  .twh-linkbox{padding:22px 20px!important}

  .twh-detail-nav{margin:38px 0 28px!important;padding:28px 18px!important}
  .twh-btn{width:100%!important}
}



/* Ver1.4.0: ブログ一覧と同じフルワイド骨格 */
@media(max-width:767px){
  .entry-content .twh-wrap,
  .post_content .twh-wrap,
  .entry-content-inner .twh-wrap,
  .post-content .twh-wrap,
  .twh-wrap{
    width:100vw!important;
    max-width:none!important;
    margin-left:calc(50% - 50vw)!important;
    margin-right:calc(50% - 50vw)!important;
  }
  .twh-inner,
  .twh-section > .twh-inner,
  .twh-search > .twh-inner,
  .twh-links-section > .twh-inner{
    width:calc(100% - 32px)!important;
  }
}
