/*
 * 株式会社ニシムラ公式サイト 体裁調整
 * 既存テーマ/本文は残し、見た目だけを整えるための追加CSS。
 */

:root {
  --nishimura-blue: #4b74af;
  --nishimura-blue-dark: #1e2c90;
  --nishimura-text: #1f2933;
  --nishimura-muted: #66727d;
  --nishimura-line: #dfe5ea;
  --nishimura-soft: #f6f8fa;
}

body {
  color: var(--nishimura-text);
  line-height: 1.8;
  letter-spacing: .01em;
  background: #fff;
}

/* ヘッダー */
.headline {
  background: #fff;
  border-bottom: 1px solid var(--nishimura-line);
}
.headline .container {
  padding-top: 10px;
  padding-bottom: 10px;
}
.headline .subttl {
  color: var(--nishimura-muted);
  font-size: 12px;
  line-height: 1.5;
}
.headline .logo img {
  max-height: 52px;
  width: auto;
}
.headline .com {
  color: #46515b;
  line-height: 1.6;
}

/* グローバルメニュー */
.navbar {
  background: #fff;
  border-bottom: 1px solid var(--nishimura-line);
  box-shadow: 0 4px 12px rgba(0,0,0,.035);
}
.navbar-nav > .nav-item > a {
  padding: 14px 15px;
  color: #26323d;
  font-weight: 500;
  text-decoration: none;
}
.navbar-nav > .nav-item > a:hover,
.navbar .current-menu-item > a,
.navbar .current-menu-parent > a,
.navbar .current_page_item > a {
  color: var(--nishimura-blue-dark) !important;
}
.dropdown-menu {
  border: 1px solid var(--nishimura-line);
  box-shadow: 0 8px 20px rgba(0,0,0,.08);
}

/* 業務内容：PCでは3階層の横展開をやめ、3列のメガメニューにまとめる */
@media (min-width: 768px) {
  .navbar #menu-item-326 {
    position: static;
  }
  .navbar #menu-item-326 > .sub-menu {
    display: none !important;
    position: absolute;
    top: 100%;
    left: 50%;
    z-index: 1100;
    width: min(900px, calc(100vw - 32px));
    margin: 0;
    padding: 20px 22px 22px;
    transform: translateX(-50%);
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    border: 1px solid var(--nishimura-line);
    border-top: 2px solid var(--nishimura-blue);
    border-radius: 0 0 8px 8px;
    background: #fff;
    box-shadow: 0 14px 32px rgba(0,0,0,.12);
  }
  .navbar #menu-item-326.nishimura-mega-open > .sub-menu {
    display: grid !important;
  }
  .navbar #menu-item-326 > .sub-menu > li {
    min-width: 0;
    padding: 0 20px;
    border: 0;
    border-right: 1px solid #e5eaef;
    background: transparent !important;
  }
  .navbar #menu-item-326 > .sub-menu > li:first-child {
    padding-left: 4px;
  }
  .navbar #menu-item-326 > .sub-menu > li:last-child {
    padding-right: 4px;
    border-right: 0;
  }
  .navbar #menu-item-326 > .sub-menu > li > a {
    display: block;
    margin: 0 0 6px;
    padding: 0 0 10px;
    border: 0;
    border-bottom: 1px solid #e5eaef;
    background: transparent !important;
    color: #2f4558 !important;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.45;
    pointer-events: none;
    cursor: default;
  }
  .navbar #menu-item-326 > .sub-menu > li > a::after {
    display: none !important;
  }
  .navbar #menu-item-326 > .sub-menu > li > .sub-menu {
    display: block !important;
    position: static !important;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  .navbar #menu-item-326 > .sub-menu > li > .sub-menu > li {
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent !important;
  }
  .navbar #menu-item-326 > .sub-menu > li > .sub-menu > li > a {
    display: block;
    padding: 7px 8px;
    border: 0;
    border-radius: 4px;
    background: transparent !important;
    color: #536372 !important;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.45;
    text-decoration: none;
  }
  .navbar #menu-item-326 > .sub-menu > li > .sub-menu > li > a:hover,
  .navbar #menu-item-326 > .sub-menu > li > .sub-menu > li.current-menu-item > a {
    background: #f3f6f9 !important;
    color: var(--nishimura-blue-dark) !important;
  }
}

/* 業務内容：スマホでも親項目クリックで分類をまとめて開く */
@media (max-width: 767px) {
  .navbar #menu-item-326 > .sub-menu {
    display: none !important;
    margin: 0;
    padding: 8px 10px 12px;
    border: 1px solid var(--nishimura-line);
    border-radius: 0 0 6px 6px;
    background: #fff;
  }
  .navbar #menu-item-326.nishimura-mega-open > .sub-menu {
    display: block !important;
  }
  .navbar #menu-item-326 > .sub-menu > li {
    margin: 0;
    padding: 10px 4px 8px;
    border: 0;
    border-bottom: 1px solid #e7ebef;
  }
  .navbar #menu-item-326 > .sub-menu > li:last-child {
    border-bottom: 0;
  }
  .navbar #menu-item-326 > .sub-menu > li > a {
    display: block;
    padding: 0 6px 6px;
    border: 0;
    background: transparent !important;
    color: #2f4558 !important;
    font-size: 14px;
    font-weight: 600;
    pointer-events: none;
  }
  .navbar #menu-item-326 > .sub-menu > li > a::after {
    display: none !important;
  }
  .navbar #menu-item-326 > .sub-menu > li > .sub-menu {
    display: block !important;
    position: static !important;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }
  .navbar #menu-item-326 > .sub-menu > li > .sub-menu > li {
    margin: 0;
    padding: 0;
    border: 0;
  }
  .navbar #menu-item-326 > .sub-menu > li > .sub-menu > li > a {
    display: block;
    padding: 7px 9px;
    border-radius: 4px;
    color: #536372 !important;
    font-size: 14px;
    text-decoration: none;
  }
}

/* ページ全体 */
.detail {
  padding-top: 28px;
  padding-bottom: 56px;
}
.detail_text,
.post_body {
  font-size: 16px;
}
.ttl_h1 {
  margin-bottom: 18px;
  padding-bottom: 12px;
  color: #26323d;
  font-size: 28px;
  font-weight: 600;
  line-height: 1.35;
  border-bottom: 2px solid var(--nishimura-blue);
}
.breadcrumb {
  margin-bottom: 28px;
  padding: 9px 0;
  background: transparent;
  border-top: 0 !important;
  border-bottom: 1px solid var(--nishimura-line);
  font-size: 13px;
}

/* 既存の縞模様見出しを、落ち着いた共通見出しへ */
body .post_body h2,
body .detail_text h2 {
  margin: 2.2em 0 1em;
  padding: 0 0 .55em !important;
  color: #263b50 !important;
  background: none !important;
  border: 0 !important;
  border-bottom: 2px solid #d9e2ea !important;
  text-align: left !important;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.45;
}
body .post_body h3,
body .detail_text h3 {
  margin: 1.8em 0 .9em;
  padding: .25em 0 .25em .75em !important;
  color: #34495e !important;
  background: none !important;
  border: 0 !important;
  border-left: 4px solid var(--nishimura-blue) !important;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.45;
}

.post_body p,
.detail_text p {
  margin-bottom: 1.15rem;
}
.post_body a,
.detail_text a {
  text-underline-offset: 3px;
}

/* 画像 */
.post_body figure.wp-block-image,
.detail_text figure.wp-block-image {
  margin-top: 1.5rem;
  margin-bottom: 1.8rem;
}
.post_body figure.wp-block-image img,
.detail_text figure.wp-block-image img {
  height: auto;
  border-radius: 4px;
}

/* 表 */
.post_body table,
.detail_text table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}
.post_body table th,
.post_body table td,
.detail_text table th,
.detail_text table td {
  padding: 11px 13px;
  border: 1px solid var(--nishimura-line);
  vertical-align: top;
}
.post_body table tr > :first-child,
.detail_text table tr > :first-child {
  background: var(--nishimura-soft);
  font-weight: 600;
}

/* TOP */
body.home .whatsnew {
  display: none !important;
}
body.home .post_body > figure.wp-block-image:first-child,
body.home .detail_text > figure.wp-block-image:first-child {
  margin-top: 0;
  margin-bottom: 34px;
}
body.home .post_body > figure.wp-block-image:first-child img,
body.home .detail_text > figure.wp-block-image:first-child img {
  width: 100%;
  max-width: 100%;
  border-radius: 6px;
}
body.home .post_body > h3.wp-block-heading,
body.home .detail_text > h3.wp-block-heading {
  margin: 0 0 22px !important;
  padding: 0 0 10px !important;
  border: 0 !important;
  border-bottom: 2px solid var(--nishimura-blue) !important;
  color: #263b50 !important;
  text-align: left;
  font-size: 25px;
}

/* TOP 施工事例：ランダム8件だけを固定表示。スライドしない */
body.home .nishimura-top-cases {
  margin-bottom: 10px;
}
body.home .nishimura-top-cases-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}
body.home .nishimura-top-case-card {
  display: block;
  overflow: hidden;
  border-radius: 6px;
  background: var(--nishimura-soft);
  text-decoration: none !important;
}
body.home .nishimura-top-case-image {
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}
body.home .nishimura-top-case-img {
  display: block;
  width: 100%;
  height: 100% !important;
  object-fit: cover;
  border-radius: 6px;
  transition: transform .2s ease;
}
body.home .nishimura-top-case-card:hover .nishimura-top-case-img {
  transform: scale(1.015);
}
body.home .nishimura-top-cases-more {
  margin-top: 24px;
  text-align: center;
}
body.home .nishimura-top-cases-more a {
  display: inline-block;
  min-width: 150px;
  padding: 9px 24px;
  border: 1px solid #cbd6e0;
  border-radius: 4px;
  background: #fff;
  color: #245f9f !important;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none !important;
}
body.home .nishimura-top-cases-more a:hover {
  border-color: #9db3c8;
  background: #eef4f9;
}
@media (max-width: 767px) {
  body.home .nishimura-top-cases-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  body.home .nishimura-top-cases-more {
    margin-top: 20px;
  }
}

/* TOP下部のお問い合わせ。背景写真を使わず、可読性を優先した案内パネルにする */
body.home .post_body > .wp-block-cover,
body.home .detail_text > .wp-block-cover {
  min-height: 0 !important;
  margin-top: 46px;
  margin-bottom: 14px;
  padding: 30px 28px !important;
  overflow: hidden;
  border: 1px solid var(--nishimura-line);
  border-radius: 8px;
  background: var(--nishimura-soft) !important;
  box-shadow: none;
}
body.home .post_body > .wp-block-cover::before,
body.home .detail_text > .wp-block-cover::before,
body.home .post_body > .wp-block-cover > .wp-block-cover__background,
body.home .detail_text > .wp-block-cover > .wp-block-cover__background,
body.home .post_body > .wp-block-cover > .wp-block-cover__image-background,
body.home .detail_text > .wp-block-cover > .wp-block-cover__image-background {
  display: none !important;
}
body.home .post_body > .wp-block-cover .wp-block-cover__inner-container,
body.home .detail_text > .wp-block-cover .wp-block-cover__inner-container {
  width: 100%;
  color: var(--nishimura-text) !important;
}
body.home .post_body > .wp-block-cover h2,
body.home .detail_text > .wp-block-cover h2 {
  margin: 0 0 8px !important;
  padding: 0 !important;
  border: 0 !important;
  color: #263b50 !important;
  font-size: 25px !important;
  text-align: center !important;
}
body.home .post_body > .wp-block-cover .vk_heading_subtext,
body.home .detail_text > .wp-block-cover .vk_heading_subtext {
  margin: 0 auto 22px !important;
  color: #566575 !important;
  font-size: 15px !important;
  line-height: 1.8;
  text-align: center !important;
}
body.home .post_body > .wp-block-cover .wp-block-columns,
body.home .detail_text > .wp-block-cover .wp-block-columns {
  gap: 16px;
  margin-top: 0;
  margin-bottom: 0;
}
body.home .post_body > .wp-block-cover .vk_button,
body.home .detail_text > .wp-block-cover .vk_button {
  margin: 0;
}
body.home .post_body > .wp-block-cover .vk_button_link,
body.home .detail_text > .wp-block-cover .vk_button_link {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 18px !important;
  border: 1px solid #cbd6e0 !important;
  border-radius: 5px !important;
  background: #fff !important;
  color: #245f9f !important;
  box-shadow: none !important;
  font-size: 17px;
  font-weight: 600;
  text-decoration: none !important;
}
body.home .post_body > .wp-block-cover .vk_button_link i,
body.home .post_body > .wp-block-cover .vk_button_link span,
body.home .detail_text > .wp-block-cover .vk_button_link i,
body.home .detail_text > .wp-block-cover .vk_button_link span {
  color: #245f9f !important;
}
body.home .post_body > .wp-block-cover .vk_button_link:hover,
body.home .detail_text > .wp-block-cover .vk_button_link:hover {
  border-color: #9db3c8 !important;
  background: #eef4f9 !important;
}

/* 会社案内・採用情報だけ、TOPと同じ本文開始レイアウトへ寄せる */
body.page-id-8 .detail .ttl_h1,
body.page-id-10 .detail .ttl_h1,
body.page-id-8 .detail .breadcrumb,
body.page-id-10 .detail .breadcrumb,
body.page-id-8 .detail .sidebar,
body.page-id-10 .detail .sidebar {
  display: none !important;
}
body.page-id-8 .detail .mainarea,
body.page-id-10 .detail .mainarea {
  flex: 0 0 100%;
  max-width: 100%;
}
body.page-id-8 .post_meta,
body.page-id-10 .post_meta {
  display: none !important;
}
body.page-id-8 .post_body > figure.wp-block-image:first-child,
body.page-id-8 .detail_text > figure.wp-block-image:first-child {
  margin-top: 0;
  margin-bottom: 34px;
}
body.page-id-8 .post_body > figure.wp-block-image:first-child img,
body.page-id-8 .detail_text > figure.wp-block-image:first-child img {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}
body.page-id-10 .post_body > .n2-section-smartslider:first-child,
body.page-id-10 .detail_text > .n2-section-smartslider:first-child {
  margin-top: 0;
  margin-bottom: 34px;
  overflow: hidden;
  border-radius: 6px;
}

/* 採用ページのアコーディオン */
.wp-block-coblocks-accordion-item {
  margin-bottom: 12px;
}
.wp-block-coblocks-accordion-item details {
  overflow: hidden;
  border: 1px solid var(--nishimura-line);
  border-radius: 5px;
  background: #fff;
}
.wp-block-coblocks-accordion-item summary {
  padding: 13px 16px;
  background: var(--nishimura-soft);
  font-weight: 600;
}
.wp-block-coblocks-accordion-item__content {
  padding: 14px 16px;
}

/* 問い合わせページ。装飾画像を外し、フォームを主役にする */
body.page_contact .mainarea {
  flex: 0 0 100%;
  max-width: 100%;
}
body.page_contact .sidebar,
body.page_contact .post_meta,
body.page_contact .post_body > .wp-block-columns > .wp-block-column:nth-child(2) {
  display: none !important;
}
body.page_contact .post_body > .wp-block-columns {
  display: block;
}
body.page_contact .post_body > .wp-block-columns > .wp-block-column:first-child {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  flex-basis: auto !important;
}
body.page_contact .wpcf7 {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 26px;
  border: 1px solid var(--nishimura-line);
  border-radius: 7px;
  background: #fff;
}
body.page_contact .wpcf7 label {
  display: block;
  color: #344250;
  font-weight: 600;
}
body.page_contact .wpcf7 input[type="text"],
body.page_contact .wpcf7 input[type="email"],
body.page_contact .wpcf7 textarea {
  width: 100%;
  max-width: 100%;
  margin-top: 4px;
  padding: 10px 11px;
  border: 1px solid #c8d2dc;
  border-radius: 4px;
  background: #fff;
  color: var(--nishimura-text);
  font-size: 16px;
}
body.page_contact .wpcf7 input[type="text"]:focus,
body.page_contact .wpcf7 input[type="email"]:focus,
body.page_contact .wpcf7 textarea:focus {
  outline: 2px solid rgba(75,116,175,.16);
  border-color: var(--nishimura-blue);
}
body.page_contact .wpcf7 textarea {
  min-height: 190px;
}
body.page_contact .wpcf7-submit {
  min-width: 150px;
  padding: 10px 28px;
  border: 1px solid var(--nishimura-blue);
  border-radius: 4px;
  background: var(--nishimura-blue);
  color: #fff;
  font-weight: 600;
}
body.page_contact .wpcf7-submit:hover {
  background: var(--nishimura-blue-dark);
  border-color: var(--nishimura-blue-dark);
}

/* 業務内容の個別8ページ。本文は変えず、重複見出しと事例一覧の見た目だけを統一 */
body.page-id-329 .detail .sidebar,
body.page-id-330 .detail .sidebar,
body.page-id-331 .detail .sidebar,
body.page-id-338 .detail .sidebar,
body.page-id-339 .detail .sidebar,
body.page-id-340 .detail .sidebar,
body.page-id-341 .detail .sidebar,
body.page-id-342 .detail .sidebar {
  display: none !important;
}
body.page-id-329 .detail .mainarea,
body.page-id-330 .detail .mainarea,
body.page-id-331 .detail .mainarea,
body.page-id-338 .detail .mainarea,
body.page-id-339 .detail .mainarea,
body.page-id-340 .detail .mainarea,
body.page-id-341 .detail .mainarea,
body.page-id-342 .detail .mainarea {
  flex: 0 0 100%;
  max-width: 100%;
}
body.page-id-329 .post_body > h3.wp-block-heading:first-child,
body.page-id-330 .post_body > h3.wp-block-heading:first-child,
body.page-id-331 .post_body > h3.wp-block-heading:first-child,
body.page-id-338 .post_body > h3.wp-block-heading:first-child,
body.page-id-339 .post_body > h3.wp-block-heading:first-child,
body.page-id-340 .post_body > h3.wp-block-heading:first-child,
body.page-id-341 .post_body > h3.wp-block-heading:first-child,
body.page-id-342 .post_body > h3.wp-block-heading:first-child {
  display: none !important;
}
body.page-id-329 .sp-pcp-section .sp-pcp-post,
body.page-id-330 .sp-pcp-section .sp-pcp-post,
body.page-id-331 .sp-pcp-section .sp-pcp-post,
body.page-id-338 .sp-pcp-section .sp-pcp-post,
body.page-id-339 .sp-pcp-section .sp-pcp-post,
body.page-id-340 .sp-pcp-section .sp-pcp-post,
body.page-id-341 .sp-pcp-section .sp-pcp-post,
body.page-id-342 .sp-pcp-section .sp-pcp-post {
  overflow: hidden;
  border-radius: 6px !important;
  background: #fff !important;
}
body.page-id-329 .sp-pcp-section .sp-pcp-post-thumb-area img,
body.page-id-330 .sp-pcp-section .sp-pcp-post-thumb-area img,
body.page-id-331 .sp-pcp-section .sp-pcp-post-thumb-area img,
body.page-id-338 .sp-pcp-section .sp-pcp-post-thumb-area img,
body.page-id-339 .sp-pcp-section .sp-pcp-post-thumb-area img,
body.page-id-340 .sp-pcp-section .sp-pcp-post-thumb-area img,
body.page-id-341 .sp-pcp-section .sp-pcp-post-thumb-area img,
body.page-id-342 .sp-pcp-section .sp-pcp-post-thumb-area img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
}
body.page-id-329 .sp-pcp-section .sp-pcp-post-details,
body.page-id-330 .sp-pcp-section .sp-pcp-post-details,
body.page-id-331 .sp-pcp-section .sp-pcp-post-details,
body.page-id-338 .sp-pcp-section .sp-pcp-post-details,
body.page-id-339 .sp-pcp-section .sp-pcp-post-details,
body.page-id-340 .sp-pcp-section .sp-pcp-post-details,
body.page-id-341 .sp-pcp-section .sp-pcp-post-details,
body.page-id-342 .sp-pcp-section .sp-pcp-post-details {
  padding-top: 5px;
}
body.page-id-329 .sp-pcp-section .pcp-readmore-link,
body.page-id-330 .sp-pcp-section .pcp-readmore-link,
body.page-id-331 .sp-pcp-section .pcp-readmore-link,
body.page-id-338 .sp-pcp-section .pcp-readmore-link,
body.page-id-339 .sp-pcp-section .pcp-readmore-link,
body.page-id-340 .sp-pcp-section .pcp-readmore-link,
body.page-id-341 .sp-pcp-section .pcp-readmore-link,
body.page-id-342 .sp-pcp-section .pcp-readmore-link {
  padding: 5px 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--nishimura-muted) !important;
  font-size: 13px !important;
  text-decoration: none;
}
body.page-id-329 .sp-pcp-section .pcp-readmore-link:hover,
body.page-id-330 .sp-pcp-section .pcp-readmore-link:hover,
body.page-id-331 .sp-pcp-section .pcp-readmore-link:hover,
body.page-id-338 .sp-pcp-section .pcp-readmore-link:hover,
body.page-id-339 .sp-pcp-section .pcp-readmore-link:hover,
body.page-id-340 .sp-pcp-section .pcp-readmore-link:hover,
body.page-id-341 .sp-pcp-section .pcp-readmore-link:hover,
body.page-id-342 .sp-pcp-section .pcp-readmore-link:hover {
  color: var(--nishimura-blue-dark) !important;
}

/* ニュースリリース一覧。写真を補助にし、日付と記事名を主役にする */
body.archive.category-8 .detail.archive .ttl {
  display: none !important;
}
body.archive.category-8 .detail.archive #main {
  margin-top: 26px;
}
body.archive.category-8 .detail.archive #main > article.list {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--nishimura-line);
}
body.archive.category-8 .detail.archive .post_links {
  display: block;
  padding: 20px 0;
  color: inherit;
  text-decoration: none;
}
body.archive.category-8 .detail.archive .list-block {
  display: grid !important;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
}
body.archive.category-8 .detail.archive .post_thumb {
  width: 180px;
  aspect-ratio: 16 / 10;
  border-radius: 6px;
  background-size: cover !important;
  background-position: center !important;
}
body.archive.category-8 .detail.archive .list-text {
  min-width: 0;
}
body.archive.category-8 .detail.archive .post_time {
  display: block;
  margin-bottom: 5px;
  color: var(--nishimura-muted) !important;
  font-size: 13px;
}
body.archive.category-8 .detail.archive .post_cat {
  display: none !important;
}
body.archive.category-8 .detail.archive .list-title {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: none !important;
  color: #34495e !important;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.55;
}
body.archive.category-8 .detail.archive .post_links:hover .list-title {
  color: var(--nishimura-blue-dark) !important;
}

/* ニュース本文。空サイドバーを外し、長文が読みやすい中央幅にする */
body.single-post.category_8 .detail .sidebar,
body.single-post.category_8 .detail .share:empty,
body.single-post.category_8 .detail .detail_comments,
body.single-post.category_8 .detail .detail_comments + nav {
  display: none !important;
}
body.single-post.category_8 .detail .mainarea {
  flex: 0 0 100%;
  width: 100%;
  max-width: 920px;
  margin-right: auto;
  margin-left: auto;
}
body.single-post.category_8 .detail .post_meta {
  margin-bottom: 24px;
  color: var(--nishimura-muted) !important;
  font-size: 13px;
}
body.single-post.category_8 .detail .post_cat {
  display: none !important;
}
body.single-post.category_8 .post_body > figure.wp-block-image img,
body.single-post.category_8 .post_body .wp-block-gallery img {
  border-radius: 6px;
}
body.single-post.category_8 .post_body .wp-block-gallery {
  gap: 10px;
}

@media (max-width: 767px) {
  body.archive.category-8 .detail.archive #main {
    margin-top: 18px;
  }
  body.archive.category-8 .detail.archive .post_links {
    padding: 15px 0;
  }
  body.archive.category-8 .detail.archive .list-block {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 14px;
  }
  body.archive.category-8 .detail.archive .post_thumb {
    width: 96px;
  }
  body.archive.category-8 .detail.archive .list-title {
    font-size: 16px;
  }
}

/* 施工事例アーカイブ。TOPと同じ4列サイズで、カテゴリ単位の写真ギャラリーにする */
body.archive.category-31 .detail.archive .ttl {
  display: none !important;
}
body.archive.category-31 .nishimura-case-category-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 28px;
}
body.archive.category-31 .nishimura-case-category-nav a {
  display: inline-block;
  padding: 7px 14px;
  border: 1px solid #d4dde5;
  border-radius: 4px;
  background: #fff;
  color: #34495e !important;
  font-size: 14px;
  text-decoration: none !important;
}
body.archive.category-31 .nishimura-case-category-nav a:hover {
  border-color: #9db3c8;
  background: #f5f8fb;
  color: var(--nishimura-blue-dark) !important;
}
body.archive.category-31 .detail.archive #main {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
}
body.archive.category-31 .detail.archive .nishimura-case-group-title,
body.archive.category-31 .detail.archive .nishimura-case-subgroup-title {
  grid-column: 1 / -1;
  border: 0 !important;
  background: none !important;
  text-align: left !important;
}
body.archive.category-31 .detail.archive .nishimura-case-group-title {
  margin: 34px 0 0 !important;
  padding: 0 0 10px !important;
  border-bottom: 2px solid #dce5ec !important;
  color: #2f4558 !important;
  font-size: 24px !important;
  font-weight: 600;
  line-height: 1.4;
  scroll-margin-top: 20px;
}
body.archive.category-31 .detail.archive .nishimura-case-group-title:first-child {
  margin-top: 0 !important;
}
body.archive.category-31 .detail.archive .nishimura-case-subgroup-title {
  margin: 10px 0 -4px !important;
  padding: 0 !important;
  color: #667788 !important;
  font-size: 16px !important;
  font-weight: 600;
  line-height: 1.5;
}
body.archive.category-31 .detail.archive #main > article.list {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  flex: none;
}
body.archive.category-31 .detail.archive .post_links {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: 6px;
  background: var(--nishimura-soft);
  color: inherit;
  text-decoration: none;
}
body.archive.category-31 .detail.archive .list-block {
  display: block !important;
  height: 100%;
}
body.archive.category-31 .detail.archive .post_thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  background-size: cover !important;
  background-position: center !important;
  transition: transform .2s ease;
}
body.archive.category-31 .detail.archive .post_links:hover .post_thumb {
  transform: scale(1.015);
}
body.archive.category-31 .detail.archive .list-text {
  display: none !important;
}
body.archive.category-31 .detail.archive article.nishimura-case-major-other .list-text {
  display: block !important;
  padding: 9px 10px 10px;
  background: #fff;
}
body.archive.category-31 .detail.archive .post_time,
body.archive.category-31 .detail.archive .post_cat {
  display: none !important;
}
body.archive.category-31 .detail.archive article.nishimura-case-major-other .list-title {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: none !important;
  color: #667788 !important;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
}
body.archive.category-31 .detail.archive .navigation {
  display: none !important;
}
@media (max-width: 767px) {
  body.archive.category-31 .nishimura-case-category-nav {
    flex-wrap: nowrap;
    gap: 7px;
    margin-bottom: 22px;
    overflow-x: auto;
    padding-bottom: 4px;
  }
  body.archive.category-31 .nishimura-case-category-nav a {
    flex: 0 0 auto;
    padding: 6px 11px;
    font-size: 13px;
  }
  body.archive.category-31 .detail.archive #main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  body.archive.category-31 .detail.archive .nishimura-case-group-title {
    margin-top: 26px !important;
    font-size: 21px !important;
  }
  body.archive.category-31 .detail.archive .nishimura-case-subgroup-title {
    margin-top: 8px !important;
    font-size: 15px !important;
  }
}

/* 施工事例一覧：画像ポップアップ */
body.archive.category-31 #main article.list .post_links {
  cursor: zoom-in;
}
body.page-id-329 .sp-pcp-section a.sp-pcp-thumb,
body.page-id-330 .sp-pcp-section a.sp-pcp-thumb,
body.page-id-331 .sp-pcp-section a.sp-pcp-thumb,
body.page-id-338 .sp-pcp-section a.sp-pcp-thumb,
body.page-id-339 .sp-pcp-section a.sp-pcp-thumb,
body.page-id-340 .sp-pcp-section a.sp-pcp-thumb,
body.page-id-341 .sp-pcp-section a.sp-pcp-thumb,
body.page-id-342 .sp-pcp-section a.sp-pcp-thumb {
  cursor: zoom-in;
}
.nishimura-case-lightbox[hidden] {
  display: none !important;
}
.nishimura-case-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 34px 92px;
  background: rgba(10, 16, 22, .9);
}
.nishimura-case-lightbox-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(1120px, calc(100vw - 184px));
  max-height: calc(100vh - 68px);
  overflow: hidden;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 18px 54px rgba(0, 0, 0, .28);
}
.nishimura-case-lightbox-image-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  max-height: calc(100vh - 150px);
  background: #111820;
  touch-action: pan-y;
}
.nishimura-case-lightbox-image {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 150px);
  width: auto;
  height: auto;
  object-fit: contain;
}
.nishimura-case-lightbox-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 66px;
  padding: 12px 18px;
  background: #fff;
}
.nishimura-case-lightbox-info {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
}
.nishimura-case-lightbox-category {
  color: #34495e;
  font-size: 15px;
  font-weight: 600;
}
.nishimura-case-lightbox-counter {
  color: #7b8792;
  font-size: 12px;
  white-space: nowrap;
}
.nishimura-case-lightbox-detail {
  display: inline-block;
  flex: 0 0 auto;
  padding: 8px 18px;
  border: 1px solid #cbd6e0;
  border-radius: 4px;
  background: #fff;
  color: #245f9f !important;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none !important;
}
.nishimura-case-lightbox-detail:hover {
  border-color: #9db3c8;
  background: #eef4f9;
}
.nishimura-case-lightbox-close,
.nishimura-case-lightbox-prev,
.nishimura-case-lightbox-next {
  position: absolute;
  z-index: 2;
  border: 0;
  color: #fff;
  background: rgba(0, 0, 0, .34);
  cursor: pointer;
  line-height: 1;
}
.nishimura-case-lightbox-close {
  top: 16px;
  right: 18px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 30px;
}
.nishimura-case-lightbox-prev,
.nishimura-case-lightbox-next {
  top: 50%;
  width: 48px;
  height: 64px;
  margin-top: -32px;
  border-radius: 5px;
  font-size: 42px;
}
.nishimura-case-lightbox-prev {
  left: 24px;
}
.nishimura-case-lightbox-next {
  right: 24px;
}
.nishimura-case-lightbox-close:hover,
.nishimura-case-lightbox-prev:hover,
.nishimura-case-lightbox-next:hover {
  background: rgba(0, 0, 0, .58);
}
.nishimura-case-lightbox button:focus-visible,
.nishimura-case-lightbox a:focus-visible {
  outline: 3px solid #8fc4ef;
  outline-offset: 2px;
}
@media (max-width: 767px) {
  .nishimura-case-lightbox {
    align-items: center;
    padding: 56px 12px 14px;
  }
  .nishimura-case-lightbox-panel {
    width: 100%;
    max-height: calc(100vh - 70px);
  }
  .nishimura-case-lightbox-image-wrap {
    min-height: 180px;
    max-height: calc(100vh - 158px);
  }
  .nishimura-case-lightbox-image {
    max-height: calc(100vh - 158px);
  }
  .nishimura-case-lightbox-footer {
    min-height: 72px;
    padding: 10px 12px;
  }
  .nishimura-case-lightbox-info {
    display: block;
  }
  .nishimura-case-lightbox-category,
  .nishimura-case-lightbox-counter {
    display: block;
  }
  .nishimura-case-lightbox-close {
    top: 8px;
    right: 10px;
    width: 40px;
    height: 40px;
    font-size: 27px;
  }
  .nishimura-case-lightbox-prev,
  .nishimura-case-lightbox-next {
    width: 42px;
    height: 58px;
    margin-top: -29px;
    background: rgba(0, 0, 0, .45);
    font-size: 36px;
  }
  .nishimura-case-lightbox-prev {
    left: 16px;
  }
  .nishimura-case-lightbox-next {
    right: 16px;
  }
  .nishimura-case-lightbox-detail {
    padding: 8px 13px;
    font-size: 13px;
  }
}

/* 施工事例の個別投稿。ニュース等には広げず、category_31 の single-post だけ写真中心にする */
body.single-post.category_31 .detail .sidebar,
body.single-post.category_31 .detail .post_meta,
body.single-post.category_31 .detail ul.tag,
body.single-post.category_31 .detail .detail_comments,
body.single-post.category_31 .detail .recommend {
  display: none !important;
}
body.single-post.category_31 .detail .mainarea {
  flex: 0 0 100%;
  max-width: 100%;
}
body.single-post.category_31 .detail .detail_comments + nav {
  display: none !important;
}
body.single-post.category_31 .post_body > figure.wp-block-image,
body.single-post.category_31 .detail_text .post_body > figure.wp-block-image {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto 12px;
}
body.single-post.category_31 .post_body > figure.wp-block-image img,
body.single-post.category_31 .detail_text .post_body > figure.wp-block-image img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}

/* テーマ標準の .pagetop を使うため、Post Carousel側の重複ボタンは表示しない */
#sp-smart-post-back-to-top-btn {
  display: none !important;
}

/* フッター */
footer {
  margin-top: 20px;
  background: #f5f7f9;
  border-top: 1px solid var(--nishimura-line);
}
footer .foot {
  padding-top: 28px;
  padding-bottom: 24px;
}
footer .com {
  line-height: 1.8;
}
footer .copy {
  padding-top: 12px;
  padding-bottom: 12px;
  border-top: 1px solid #e2e7eb;
  font-size: 12px;
}

@media (max-width: 767px) {
  .headline .subttl {
    font-size: 11px;
  }
  .headline .com {
    margin-top: 8px;
    text-align: left;
  }
  .navbar-nav > .nav-item > a {
    padding: 10px 12px;
  }
  .detail {
    padding-top: 20px;
    padding-bottom: 40px;
  }
  .ttl_h1 {
    font-size: 24px;
  }
  body .post_body h2,
  body .detail_text h2 {
    font-size: 21px;
  }
  body .post_body h3,
  body .detail_text h3 {
    font-size: 18px;
  }
  .post_body table,
  .detail_text table {
    font-size: 14px;
  }
  .post_body table th,
  .post_body table td,
  .detail_text table th,
  .detail_text table td {
    padding: 9px 8px;
  }
  body.home .post_body > .wp-block-cover,
  body.home .detail_text > .wp-block-cover {
    margin-top: 34px;
    padding: 24px 16px !important;
  }
  body.home .post_body > .wp-block-cover h2,
  body.home .detail_text > .wp-block-cover h2 {
    font-size: 22px !important;
  }
  body.home .post_body > .wp-block-cover .vk_heading_subtext,
  body.home .detail_text > .wp-block-cover .vk_heading_subtext {
    font-size: 14px !important;
  }
  body.home .post_body > .wp-block-cover .vk_button_link,
  body.home .detail_text > .wp-block-cover .vk_button_link {
    min-height: 52px;
    padding: 10px 12px !important;
    font-size: 16px;
  }
  body.page_contact .wpcf7 {
    padding: 18px 14px;
  }
}

/* 会社案内・採用情報の共通お問い合わせ。TOP下部の問い合わせパネルと同じ見た目に揃える */
.nishimura-shared-contact {
  margin-top: 46px;
  margin-bottom: 14px;
  padding: 30px 28px;
  border: 1px solid var(--nishimura-line);
  border-radius: 8px;
  background: var(--nishimura-soft);
  box-shadow: none;
}
.nishimura-shared-contact h2 {
  margin: 0 0 8px !important;
  padding: 0 !important;
  border: 0 !important;
  background: none !important;
  color: #263b50 !important;
  font-size: 25px !important;
  text-align: center !important;
}
.nishimura-shared-contact-lead {
  margin: 0 auto 22px !important;
  color: #566575 !important;
  font-size: 15px !important;
  line-height: 1.8;
  text-align: center !important;
}
.nishimura-shared-contact-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.nishimura-shared-contact-button {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 18px !important;
  border: 1px solid #cbd6e0 !important;
  border-radius: 5px !important;
  background: #fff !important;
  color: #245f9f !important;
  box-shadow: none !important;
  font-size: 17px;
  font-weight: 600;
  text-decoration: none !important;
}
.nishimura-shared-contact-button i,
.nishimura-shared-contact-button span {
  color: #245f9f !important;
}
.nishimura-shared-contact-button:hover {
  border-color: #9db3c8 !important;
  background: #eef4f9 !important;
  color: #245f9f !important;
}
/* 会社案内・採用情報では、共通お問い合わせとフッターの間隔を詰める */
body.page-id-8 .detail,
body.page-id-10 .detail {
  padding-bottom: 18px;
}
body.page-id-8 footer,
body.page-id-10 footer {
  margin-top: 0;
}
body.page-id-8 .nishimura-shared-contact,
body.page-id-10 .nishimura-shared-contact {
  margin-bottom: 0;
}

/* 自動電話リンク化した番号は、既存の見た目を変えない */
a.nishimura-phone-link {
  color: inherit !important;
  text-decoration: inherit !important;
}

@media (max-width: 767px) {
  .nishimura-shared-contact {
    margin-top: 34px;
    padding: 24px 16px;
  }
  .nishimura-shared-contact h2 {
    font-size: 22px !important;
  }
  .nishimura-shared-contact-lead {
    font-size: 14px !important;
  }
  .nishimura-shared-contact-actions {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .nishimura-shared-contact-button {
    min-height: 52px;
    padding: 10px 12px !important;
    font-size: 16px;
  }
}
