/* ================================
   Global base
   ================================ */
:root{
  --bg:#000;
  --txt:#fff;
  --bronze:#b08d57;
}

html, body,
.site, .site-main, #content,
.wp-site-blocks, .site-content,
.entry-content, .page, .page-content {
  background: var(--bg) !important;
}
[class*="elementor-kit"] body { background: var(--bg) !important; }

/* Elementorのベースは透明 */
.elementor,
.elementor-section-wrap,
.elementor-section,
.elementor-container,
.elementor-column,
.elementor-widget-container {
  background-color: transparent !important;
}

/* フッター直前セクションの白＆余白を無効化（保険） */
.site-main .elementor > .elementor-section:last-of-type {
  background: transparent !important;
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}
.elementor-location-footer { margin-top: 0 !important; }

/* PCレイアウトの上限（WORKS等の“巨大化”抑止） */
@media (min-width:1025px){
  .elementor-section,
  .elementor-widget-posts,
  .elementor-widget-posts .elementor-posts-container{
    max-width:1200px !important; width:100% !important; margin:0 auto !important;
  }
}

/* ================================
   NEWS（news58）
   ================================ */
.news58{
  --txt:#f5f5f5; --muted:#c7a37a; --line:#3a3a3a;
  font-family:"Noto Sans JP","Hiragino Kaku Gothic ProN","Yu Gothic",sans-serif;
  background:var(--bg);
  color:var(--txt);
  padding:12px 12px;
}
.news58 *{ box-sizing:border-box; }

.news58__head{ display:flex; align-items:center; gap:8px; margin:0 auto 6px; max-width:860px; }
.news58__eyebrow{ font-size:11px; letter-spacing:.12em; color:var(--muted); }
.news58__title{ font-family:"Noto Serif JP","Yu Mincho",serif; font-size:18px; margin:0; letter-spacing:.02em; }

/* 区切り線は残す */
.news58__list{ list-style:none; margin:0 auto; padding:3px 0 0; max-width:860px; border-top:1px solid var(--line); }
.news58__item{ border-bottom:1px solid var(--line); }

/* 下線は消すが枠線は殺さない */
.news58 .news58__link,
.news58 .news58__link:link,
.news58 .news58__link:visited,
.news58 .news58__link:hover,
.news58 .news58__link:active,
.news58 .news58__link *{
  text-decoration:none !important;
  background-image:none !important;
  box-shadow:none !important;
  color:inherit;
}

/* レイアウト：1行目＝ date | badge | 余白、2行目＝ title */
.news58__link{
  display:grid !important;
  grid-template-columns: auto auto 1fr;
  grid-template-rows: auto auto;
  grid-template-areas:
    "date badge ."
    "title title title";
  column-gap:6px; row-gap:4px;
  padding:10px 0;
  align-items:center; justify-items:start;
}
.news58__date{
  grid-area:date;
  white-space:nowrap; font-size:11px; letter-spacing:.03em; color:#ccc;
}
.news58__badge{
  grid-area:badge;
  justify-self:start; align-self:center;
  display:inline-flex; align-items:center;
  padding:3px 6px; line-height:1;
  white-space:nowrap;
  border:1px solid var(--muted) !important;
  color:var(--muted); border-radius:3px;
  background-color:var(--bg); /* 区切り線の透け防止 */
  position:relative; z-index:1; /* 線より前面 */
}
/* バッジは状態変化でも枠を維持 */
.news58 a:link    .news58__badge,
.news58 a:visited .news58__badge,
.news58 a:hover   .news58__badge,
.news58 a:active  .news58__badge{
  border:1px solid var(--muted) !important;
  color:var(--muted) !important;
  background-color:var(--bg) !important;
}

.news58__excerpt{
  grid-area:title;
  font-family:"Noto Serif JP","Yu Mincho",serif;
  font-size:13px; line-height:1.5; color:#f5f5f5;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
  min-height:1.5em;
}

/* SP最適化：縦 stacked + 抜粋2行 */
@media (max-width:600px){
  .news58{ padding:10px; }
  .news58__title{ font-size:17px; }
  .news58__link{
    grid-template-columns:1fr;
    grid-template-areas:
      "date"
      "badge"
      "title";
    column-gap:0; row-gap:4px;
    align-items:start; justify-items:start;
    padding:6px 0;
  }
  .news58__badge{ width:max-content; }
  .news58__excerpt{
    white-space:normal; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical;
  }
}

/* NEWS “VIEW ALL”：ブロンズのグラデ枠 */
.news58__viewall{
  margin-left:auto; display:inline-flex; align-items:center; gap:6px;
  padding:5px 9px; font-size:11px; color:var(--txt); text-decoration:none;
  position:relative; overflow:hidden; border:1px solid transparent; border-radius:3px;
  background-image:
    linear-gradient(var(--bg), var(--bg)),
    linear-gradient(90deg, var(--bronze), #d2b48c, var(--bronze));
  background-origin:border-box; background-clip:padding-box, border-box;
}
.news58__viewall::after{
  content:""; width:6px; height:6px;
  border-right:1.2px solid var(--bronze); border-top:1.2px solid var(--bronze);
  transform:rotate(45deg); margin-left:2px;
}
.news58__viewall::before{
  content:""; position:absolute; top:-60%; left:-60%;
  width:220%; height:220%;
  background:linear-gradient(120deg, transparent 0%, rgba(255,255,255,.4) 45%, transparent 100%);
  transform:rotate(25deg) translateX(-100%);
  animation:viewall-shine 3.2s linear infinite;
}
@keyframes viewall-shine{
  0%{ transform:rotate(25deg) translateX(-100%); }
  100%{ transform:rotate(25deg) translateX(100%); }
}

/* ================================
   全域 VIEW ALL（施工実例側も拾う汎用）
   ================================ */
a[class*="viewall"],
a[class*="view-all"],
a[class*="btn-viewall"],
button[class*="viewall"],
button[class*="view-all"],
button[class*="btn-viewall"]{
  position:relative;
  display:inline-flex; align-items:center; gap:8px;
  padding:8px 14px; font-size:12px; color:var(--txt);
  text-decoration:none;
  border:1px solid transparent !important; border-radius:6px;
  background-image:
    linear-gradient(var(--bg), var(--bg)) !important,
    linear-gradient(90deg, var(--bronze), #d2b48c, var(--bronze)) !important;
  background-origin:border-box !important;
  background-clip:padding-box, border-box !important;
}
a[class*="viewall"]::after,
a[class*="view-all"]::after,
a[class*="btn-viewall"]::after,
button[class*="viewall"]::after,
button[class*="view-all"]::after,
button[class*="btn-viewall"]::after{
  content:"";
  width:7px; height:7px;
  border-right:1.5px solid var(--bronze);
  border-top:1.5px solid var(--bronze);
  transform:rotate(45deg); margin-left:4px;
}
a[class*="viewall"]:hover,
a[class*="view-all"]:hover,
a[class*="btn-viewall"]:hover{
  filter:brightness(1.05);
  background-image:
    linear-gradient(var(--bg), var(--bg)) !important,
    linear-gradient(90deg, var(--bronze), #d2b48c, var(--bronze)) !important;
  background-clip:padding-box, border-box !important;
}

/* ================================
   WORKS（home-works）
   ================================ */
.home-works{
  --text:#fff; --muted:#cfcfcf; --line:rgba(255,255,255,.14);
  background:var(--bg); color:var(--text);
  font-family:"Noto Sans JP",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
}
.home-works .wp-block-heading{
  text-align:center; margin:10px 0 18px; line-height:1.28; letter-spacing:.05em;
  font-weight:700; font-size:22px; color:#fff;
}
.home-works .wp-block-heading::before{
  content:"WORKS"; display:block; margin:6px 0 8px;
  font-family:"DM Sans",sans-serif; font-size:11px; letter-spacing:.18em; color:var(--bronze);
}
.home-works .wp-block-heading::after{
  content:""; display:block; width:28px; height:2px; margin:10px auto 0; background:var(--bronze);
}

/* 横スクロールカード（崩れ抑止） */
.home-works .wp-block-latest-posts,
.home-works .wp-block-post-template{
  display:flex; gap:12px; padding:6px 16px 12px; margin:0;
  overflow-x:auto; scroll-snap-type:x mandatory; list-style:none; -webkit-overflow-scrolling:touch;
}
.home-works .wp-block-latest-posts::-webkit-scrollbar,
.home-works .wp-block-post-template::-webkit-scrollbar{ display:none; height:0; }

.home-works .wp-block-latest-posts>li,
.home-works .wp-block-post-template>li{
  flex:0 0 80%; max-width:80%; scroll-snap-align:start;
  display:grid; grid-template-columns:36% 64%; gap:12px;
  padding:12px 0; border-top:1px solid var(--line); border-bottom:1px solid var(--line);
  text-decoration:none; color:inherit;
}
.home-works .wp-block-post-featured-image,
.home-works .wp-block-latest-posts__featured-image{
  position:relative; width:100%; border:1px solid var(--line); background:#111; overflow:hidden;
  aspect-ratio:4/3;
}
.home-works .wp-block-post-featured-image img,
.home-works .wp-block-latest-posts__featured-image img{
  width:100%; height:100%; object-fit:cover; object-position:center; display:block;
}
.home-works .wp-block-post-title a,
.home-works .wp-block-latest-posts__post-title{
  display:flex; align-items:center; gap:8px;
  color:#fff; font-weight:700; font-size:14.5px; text-decoration:none; margin:0 0 6px;
}
.home-works .wp-block-post-title a::before,
.home-works .wp-block-latest-posts__post-title::before{
  content:""; width:6px; height:6px; background:var(--bronze); display:inline-block;
}
.home-works .wp-block-post-excerpt,
.home-works .wp-block-latest-posts__post-excerpt{ color:var(--muted); font-size:12.5px; line-height:1.55; margin:0; }
.home-works time{ color:#9a9a9a; font-size:11.5px; letter-spacing:.03em; display:block; margin-top:6px; }

@media (min-width:520px){
  .home-works .wp-block-latest-posts>li,
  .home-works .wp-block-post-template>li{ flex-basis:64%; max-width:64%; }
}

/* ================================
   cl-wrap：リンク下線だけ無効化（安全）
   ================================ */
.cl-wrap a,
.cl-wrap a:link,
.cl-wrap a:visited,
.cl-wrap a:hover,
.cl-wrap a:active{
  text-decoration:none !important;
}
.cl-wrap .cl-title{
  position:relative; display:inline-block; padding-bottom:4px;
}
.cl-wrap .cl-title::after{
  content:""; display:block; width:28px; height:2px; margin-top:6px;
  background:var(--bronze);
}

/* ================================
   Optional: テスト用（必要なら外す）
   ================================ */
/* .elementor-accordion .elementor-tab-title{ background:red !important; } */