html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
}

/* ============================================================
   WordPress Block Layout System — クラシックテーマ補完 CSS
   (is-layout-flex 等は global-styles-inline-css でも生成されるが
    念のため明示的に定義しておく)
   ============================================================ */

/* --- Flex レイアウト --- */
.is-layout-flex {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.is-layout-flex.is-vertical,
.is-vertical.is-layout-flex {
  flex-direction: column;
  align-items: flex-start;
}

.is-nowrap { flex-wrap: nowrap; }

.is-content-justification-center        { justify-content: center; }
.is-content-justification-right         { justify-content: flex-end; }
.is-content-justification-left          { justify-content: flex-start; }
.is-content-justification-space-between { justify-content: space-between; }
.items-justified-left                   { justify-content: flex-start; }

.are-vertically-aligned-center { align-items: center; }
.is-vertically-aligned-center  { align-self: center; }

/* --- Constrained レイアウト (子要素を中央寄せ・最大幅制限) --- */
.is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
  max-width: var(--wp--style--global--content-size, 1020px);
  margin-left: auto !important;
  margin-right: auto !important;
}

.is-layout-constrained > .alignwide {
  max-width: var(--wp--style--global--wide-size, 1200px);
}

/* --- has-global-padding: ルートパディングを水平方向に適用 --- */
.has-global-padding {
  padding-right: var(--wp--style--root--padding-right, var(--wp--preset--spacing--24, 1.5rem));
  padding-left: var(--wp--style--root--padding-left, var(--wp--preset--spacing--24, 1.5rem));
}

/* --- alignfull: 全幅 (ボディパディングを突破) --- */
.alignfull {
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  width: 100vw !important;
  max-width: 100vw !important;
}

/* --- wp-block-columns --- */
.wp-block-columns {
  display: flex;
  flex-wrap: wrap;
  align-items: normal;
  box-sizing: border-box;
}

.wp-block-column {
  flex-grow: 1;
  min-width: 0;
  box-sizing: border-box;
  overflow-wrap: break-word;
  word-break: break-word;
}

@media (max-width: 781px) {
  .wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column {
    flex-basis: 100% !important;
  }
}

/* --- wp-block-buttons --- */
.wp-block-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
}

/* --- wp-block-button / wp-element-button --- */
.wp-block-button__link,
.wp-element-button {
  display: inline-block;
  cursor: pointer;
  text-decoration: none;
  word-break: break-word;
  padding: var(--wp--preset--spacing--12, 0.75rem) var(--wp--preset--spacing--60, 2.5rem);
  border-radius: 8px;
  border: 2px solid var(--wp--preset--color--custom-blue-light, #2593c2);
  background-color: var(--wp--preset--color--custom-blue-light, #2593c2);
  color: var(--wp--preset--color--custom-white, #fff);
  font-size: 16px;
  font-style: normal;
  font-weight: 700;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

.wp-block-button__link:hover,
.wp-element-button:hover {
  background-color: var(--wp--preset--color--custom-blue, #225889);
  border-color: var(--wp--preset--color--custom-blue, #225889);
  color: var(--wp--preset--color--custom-white, #fff);
}

.wp-block-button.is-style-outline .wp-block-button__link,
.wp-block-button.is-style-outline .wp-element-button {
  background-color: transparent;
  color: var(--wp--preset--color--custom-blue, #225889);
  border-color: var(--wp--preset--color--custom-gray-light, #e3e3e3);
}

.wp-block-button.is-style-outline .wp-block-button__link:hover,
.wp-block-button.is-style-outline .wp-element-button:hover {
  background-color: var(--wp--preset--color--custom-gray-light, #e3e3e3);
}

/* --- wp-block-group --- */
.wp-block-group {
  box-sizing: border-box;
}

/* --- wp-block-image --- */
.wp-block-image {
  margin: 0;
}

.wp-block-image img {
  max-width: 100%;
  height: auto;
}

.wp-block-image.aligncenter {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

/* --- ナビゲーション: デスクトップ表示 --- */
/* wp-block-library がデフォルトでコンテナを hide することがあるため上書き */
@media (min-width: 901px) {
  header .wp-block-navigation__responsive-container {
    display: block !important;
    position: static !important;
    background: transparent !important;
    overflow: visible !important;
  }

  header .wp-block-navigation__responsive-close,
  header .wp-block-navigation__responsive-dialog {
    display: contents;
  }

  header .wp-block-navigation__responsive-container-close {
    display: none !important;
  }

  header .wp-block-navigation__responsive-container-open {
    display: none !important;
  }

  header .wp-block-navigation__container {
    display: flex !important;
    flex-direction: row;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: var(--wp--preset--spacing--24, 1.5rem);
    flex-wrap: nowrap;
    align-items: center;
  }
}

/* --- ナビゲーション: モバイルオーバーレイ --- */
.wp-block-navigation__responsive-container.is-menu-open {
  display: flex !important;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  background: #fff;
  overflow-y: auto;
  padding: var(--wp--preset--spacing--30, 1.5rem);
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
  display: flex !important;
  flex-direction: column;
  list-style: none;
  margin: var(--wp--preset--spacing--30, 1.5rem) 0 0;
  padding: 0;
  gap: var(--wp--preset--spacing--16, 1rem);
  align-items: flex-start;
}

/* --- ナビゲーション: リンク共通 --- */
.wp-block-navigation-item {
  display: flex;
  align-items: center;
  position: relative;
  list-style: none;
}

.wp-block-navigation-item__content {
  display: block;
  padding: 0.25em 0.5em;
  text-decoration: none;
  color: inherit;
  white-space: nowrap;
}

.wp-block-navigation-item__label {
  word-break: normal;
}

/* --- サブメニュー --- */
.wp-block-navigation__submenu-container {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  z-index: 200;
  list-style: none;
  margin: 0;
  padding: 0.5em 0;
  flex-direction: column;
}

.wp-block-navigation-submenu.is-open > .wp-block-navigation__submenu-container,
.wp-block-navigation-item.open-on-hover-click:hover > .wp-block-navigation__submenu-container {
  display: flex;
}

.wp-block-navigation__submenu-container .wp-block-navigation-item__content {
  white-space: nowrap;
  padding: 0.5em 1em;
}

.wp-block-navigation__submenu-icon {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: inline-flex;
  align-items: center;
  color: inherit;
}

.wp-block-navigation__submenu-icon svg {
  stroke: currentColor;
  fill: none;
}

/* --- wp-block-site-logo --- */
.wp-block-site-logo img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ============================================================ */

/* ユーティリティースタイル */
.hidden-pc {
  display: none;
}

.hidden-sp {
  display: block;
}

@media (max-width: 800px) {
  .hidden-pc {
    display: block;
  }

  .hidden-sp {
    display: none;
  }
}

.custom-reverse {
  flex-direction: row-reverse;
}
/* ハイバーリンクプラグインのスタイル調整 */
.wp-block-tiptip-hyperlink-group-block {
  text-decoration: none;
}
:root :where(a:where(:not(.wp-element-button)):hover) {
    color: var(--wp--preset--color--custom-gray) !important;
}

header a  {
  text-decoration: none;
}

/* ヘッダー上部固定 */
.header-fixed {
	position: fixed;
	z-index: 100;
	top: 0;
	left: 0;
	width: 100%;
	box-sizing: border-box; /* alignfull で width:100vw + 左右パディングが加算されるのを防ぐ */
	background-color: #fff;
}

/* ヘッダー右側が縮めるようにする */
.header-fixed > .is-vertical {
  min-width: 0;
  flex-shrink: 1;
}

/* ヘッダー電話番号エリアが縮めるようにする */
.header-contact-parts > .is-vertical {
  min-width: 0;
  flex-shrink: 1;
}

/* 注意書きテキスト: はみ出しを防ぐ */
.header-contact-parts .has-extra-extra-small-font-size {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 28vw;
}

/* headerのレスポンシブ時の表示切替 */
@media (max-width: 900px) {
  header .wp-block-navigation__responsive-container {
    display: none;
  }

  .header-contact-parts {
    display: none !important;
  }

  header .wp-block-navigation__responsive-container-open {
    display: block !important;
  }

  /* header .wp-block-navigation__responsive-container-open {
    display: block;
  } */

  header .wp-block-navigation__container {
    display: none;
  }
}

/* ボタンのスタイル */
.wp-block-button {
  min-width: 320px;
  text-align: center; /* inline-block の button__link を中央揃えにする */
}

.wp-block-button .wp-element-button {
  transition: all 0.3s;
}

.wp-block-button.is-style-outline .wp-element-button:hover {
  background-color: var(--wp--preset--color--custom-gray-light);
}

/* Google Mapの全幅 */
.custom-map {
  display: block;
  width: 100%;
  max-width: 100vw;
}

/* contactセクションリンクのアンダーラインを削除 */
section a {
  text-decoration: none;
}

/* フッターナビリンク */
.footer .wp-block-navigation-item__content {
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.2s;
}

.footer .wp-block-navigation-item__content:hover {
  opacity: 0.6;
}

/* footerのレスポンシブ時の中央揃え */
@media screen and (max-width: 781px) {
  .footer {
    text-align: center;
  }

  .footer .is-layout-flex {
    justify-content: center;
    align-items: center;
  }

  .footer .wp-block-navigation__container {
    align-items: center;
  }

}

/* トップページのこだわりセクションのスタイル調整 */
.pride .wp-block-columns .wp-block-column {
  position: relative;

  /* &::before {
    position: absolute;
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    content: "";
    background-color: var(--wp--preset--color--custom-blue-light);
    border-radius: 50%;
    top: -20px;
    right: 10px;
    z-index: 1;
    color: var(--wp--preset--color--custom-white);
    font-size: var(--wp--preset--font-size--semi-large);
    font-weight: 700;
    font-family: var(--wp--preset--font-family--roboto);
    line-height: 1;
  } */
}

.pride .wp-block-columns .wp-block-column::before {
  position: absolute;
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  content: "";
  background-color: var(--wp--preset--color--custom-blue-light);
  border-radius: 50%;
  top: -20px;
  right: 10px;
  z-index: 1;
  color: var(--wp--preset--color--custom-white);
  font-size: var(--wp--preset--font-size--semi-large);
  font-weight: 700;
  font-family: var(--wp--preset--font-family--roboto);
  line-height: 1;
}

.pride .wp-block-columns .wp-block-column:nth-of-type(1)::before {
  content: "1";
}
.pride .wp-block-columns .wp-block-column:nth-of-type(2)::before {
  content: "2";
}
.pride .wp-block-columns .wp-block-column:nth-of-type(3)::before {
  content: "3";
}

/* トップページのスタッフブログセクションのスタイル調整 */
.home .blog .wp-block-columns:where(.wp-block-columns) {
  margin-bottom: 0;
}

.home .blog .wp-block-post {
  border-top: 1px solid var(--wp--preset--color--custom-gray);

  &:last-child {
    border-bottom: 1px solid var(--wp--preset--color--custom-gray);
  }
}

/* 会社概要ページcompanyセクションのボーダー */
section.custom-company .wp-block-columns {
  border-top: 1px solid var(--wp--preset--color--custom-gray);

  &:last-child {
    border-bottom: 1px solid var(--wp--preset--color--custom-gray);
  }
}

/* 工事の流れページのスタイル調整 */
section.custom-flow .wp-block-columns {
  border-top: 1px solid var(--wp--preset--color--custom-gray);
}
section.custom-flow .wp-block-columns:first-child {
  border-top: none;
}

/* are-vertically-aligned-center / is-vertically-aligned-center の確実な適用 */
.wp-block-columns.are-vertically-aligned-center {
  align-items: center;
}
.wp-block-column.is-vertically-aligned-center {
  align-self: center;
}

@media screen and (max-width: 781px) {
  .custom-flow-heading {
    text-align: center;
  }

  .custom-flow-tel-link {
    text-align: center;
  }
}

/* 施工メニュー下層ページのスタイル調整 */
@media screen and (max-width: 781px) {
  .page-menu-card.wp-block-columns {
    flex-direction: column-reverse;
  }

  .page-menu-card-heading {
    text-align: center;
  }
}

/* ページネーションのスタイル調整 */
.wp-block-query-pagination-numbers {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
}

.page-numbers {
  display: grid;
  place-items: center;
  min-width: 40px;
  height: 40px;
  background-color: var(--wp--preset--color--custom-gray-light);
  text-decoration: none;

  &.current {
    background-color: var(--wp--preset--color--custom-blue-light);
    color: #fff;
    font-weight: 700;
  }
}

/* トップページ FV の h1: ブラウザデフォルト余白をリセット */
.fv-heading {
  margin: 0;
}

/* ヘッダー 業種タグライン */
.header-site-tagline {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--wp--preset--color--custom-blue-light, #2593c2);
}

@media (max-width: 800px) {
  header .wp-block-site-logo img {
    width: 24px !important;
    height: auto !important;
  }
}

/* お問い合わせページ LINE箇条書き */
.contact-line-features {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
  font-size: var(--wp--preset--font-size--small);
}

.contact-line-features li {
  padding: 4px 0;
}

.contact-line-features li::before {
  content: "✓ ";
  color: var(--wp--preset--color--custom-blue-light);
  font-weight: 700;
}

/* お問い合わせページのボタンリンクのスタイル調整 */
.custom-contact-btn-number {
  font-size: var(--wp--preset--font-size--large);
}

/* お問い合わせページのフォーム調整 */
.wpcf7-form {
  max-width: 600px;
  margin-inline: auto;
  margin-top: var(--wp--preset--spacing--60);

  & p {
    margin: 10px 0 0;
    line-height: 1;
  }

  & .custom-form-head {
    font-weight: 700;
    margin-right: 16px;
    color: var(--wp--preset--color--custom-gray);
  }

  & .custom-form-head-required {
    color: #f00;
  }

  & .wpcf7-form-control-wrap {
    display: block;
    margin-top: 10px;
  }

  & input[type="text"],
  & input[type="tel"],
  & input[type="email"],
  & textarea,
  & select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--wp--preset--color--custom-gray-light);
    border-radius: 4px;
    box-sizing: border-box;
    background-color: #fff;
    font-size: 1rem;
  }

  & input[type="radio"] {
    margin: 0 8px 0 0;
  }

  & .wpcf7-list-item {
   margin: 10px 0 10px 20px;
  }

  & input[type="submit"] {
    width: 100%;
    padding: 10px;
    background-color: var(--wp--preset--color--custom-blue);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: var(--wp--preset--spacing--40);

    &:hover {
      background-color: var(--wp--preset--color--custom-blue-light);
    }
  }
}

.wpcf7-form-control.wpcf7-radio {
  display: block;
  margin-bottom: 20px;
}

.wpcf7-list-item-label {
  display: inline-block;
}

.wpcf7-spinner {
  display: none !important;
}

/* FAQ アコーディオン */
.faq-category-title {
  font-size: var(--wp--preset--font-size--semi-large);
  font-weight: 700;
  color: var(--wp--preset--color--custom-blue-light);
  border-left: 4px solid var(--wp--preset--color--custom-blue-light);
  padding-left: var(--wp--preset--spacing--16);
  margin: 0 0 var(--wp--preset--spacing--24);
}

.faq-item {
  border-bottom: 1px solid var(--wp--preset--color--custom-gray-light);
}

.faq-item:first-child {
  border-top: 1px solid var(--wp--preset--color--custom-gray-light);
}

.faq-question {
  padding: var(--wp--preset--spacing--20) 0;
  cursor: pointer;
  font-weight: 700;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--wp--preset--color--custom-blue-light);
  flex-shrink: 0;
  line-height: 1;
}

details[open] > .faq-question::after {
  content: '−';
}

.faq-answer {
  padding: 0 0 var(--wp--preset--spacing--20);
  line-height: 1.8;
  color: var(--wp--preset--color--custom-gray);
}

.faq-answer p {
  margin: 0;
}

/* 防水工事ページ「おすすめ塗料」非表示設定 */
.recommendedPaint {
	display: none;
}

/* ============================================================
   記事本文 (.entry-content)
   ============================================================ */

.entry-content {
  font-size: 15px;
  line-height: 1.85;
  color: var(--wp--preset--color--custom-gray, #333);
  word-break: break-word;
  overflow-wrap: break-word;
}

/* h2 ― 左ボーダー＋薄青背景 */
.entry-content h2 {
  font-size: clamp(17px, 3vw, 22px);
  font-weight: 700;
  line-height: 1.4;
  margin: 2.5em 0 0.8em;
  padding: 0.55em 1em;
  background: #f0f7fd;
  border-left: 4px solid #2593c2;
  border-radius: 0 6px 6px 0;
  color: #225889;
}

/* h3 ― 下ボーダー */
.entry-content h3 {
  font-size: clamp(15px, 2.5vw, 18px);
  font-weight: 700;
  line-height: 1.4;
  margin: 2em 0 0.6em;
  padding-bottom: 0.4em;
  border-bottom: 2px solid #2593c2;
  color: #333;
}

/* p */
.entry-content p {
  margin: 0 0 1.2em;
}

/* ul / ol */
.entry-content ul,
.entry-content ol {
  margin: 0 0 1.2em;
  padding-left: 1.8em;
}

.entry-content li {
  margin-bottom: 0.45em;
  line-height: 1.7;
}

/* table */
.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: 14px;
}

.entry-content thead tr {
  background: #225889;
  color: #fff;
}

.entry-content th {
  padding: 10px 14px;
  text-align: left;
  font-weight: 700;
  border: 1px solid #1a4570;
}

.entry-content td {
  padding: 10px 14px;
  border: 1px solid #e3e3e3;
}

.entry-content tr:nth-child(even) td {
  background: #f7fbfe;
}

/* hr */
.entry-content hr {
  border: none;
  border-top: 2px solid #e3e3e3;
  margin: 2.5em 0;
}

/* figure / img */
.entry-content figure {
  margin: 1.8em 0;
}

.entry-content img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  display: block;
}

.entry-content figcaption {
  text-align: center;
  font-size: 13px;
  color: #888;
  margin-top: 6px;
}

/* a */
.entry-content a {
  color: #2593c2;
  text-decoration: underline;
}

.entry-content a:hover {
  color: #225889;
}

/* strong */
.entry-content strong {
  font-weight: 700;
}

/* blockquote */
.entry-content blockquote {
  border-left: 4px solid #e3e3e3;
  margin: 1.5em 0;
  padding: 0.8em 1.2em;
  background: #f9f9f9;
  color: #555;
  font-style: italic;
}

/* div の box-sizing 統一 */
.entry-content div {
  box-sizing: border-box;
}

@media (max-width: 600px) {
  .entry-content table {
    font-size: 13px;
  }
  .entry-content th,
  .entry-content td {
    padding: 8px 8px;
  }
}

/* ============================================================
   カテゴリーバッジ
   ============================================================ */
.category-badge {
  display: inline-block;
  background: #2593c2;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 20px;
  letter-spacing: .05em;
  text-decoration: none;
}

.category-badge--sm {
  font-size: 11px;
  padding: 2px 10px;
}

.category-badge--work {
  background: #225889;
}

/* ============================================================
   記事バナー (ブログ・コラム 個別ページ)
   ============================================================ */
.article-banner {
  background: linear-gradient(135deg, #225889 0%, #2593c2 100%);
  color: #fff;
  padding: var(--wp--preset--spacing--60) 0;
}

.article-banner .breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  margin: 0 0 var(--wp--preset--spacing--20);
  opacity: .75;
  list-style: none;
  padding: 0;
}

.article-banner .breadcrumb a {
  color: #fff;
  text-decoration: none;
}

.article-banner .breadcrumb a:hover {
  text-decoration: underline;
}

.article-banner .breadcrumb__sep {
  opacity: .6;
}

.article-banner__title {
  font-size: clamp(20px, 4vw, 30px);
  font-weight: 700;
  line-height: 1.4;
  color: #fff;
  margin: var(--wp--preset--spacing--16) 0 var(--wp--preset--spacing--12);
}

.article-banner__meta {
  font-size: 13px;
  opacity: .8;
  display: flex;
  align-items: center;
  gap: 12px;
}

.article-eyecatch {
  margin: 0 0 var(--wp--preset--spacing--40);
}

.article-eyecatch img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
}

/* ============================================================
   施工実績 個別ページ — ワークヒーロー
   ============================================================ */
.work-hero {
  position: relative;
  overflow: hidden;
}

.work-hero__img {
  width: 100%;
  height: 460px;
  object-fit: cover;
  display: block;
}

.work-hero__placeholder {
  width: 100%;
  height: 320px;
  background: #d0d8e0;
}

.work-hero__overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,.72) 0%, transparent 100%);
  padding: var(--wp--preset--spacing--60) 0 var(--wp--preset--spacing--30);
}

.work-hero__title {
  font-size: clamp(20px, 4vw, 30px);
  font-weight: 700;
  color: #fff;
  margin: 8px 0 6px;
  line-height: 1.4;
  text-shadow: 0 1px 4px rgba(0,0,0,.3);
}

.work-hero__date {
  color: rgba(255,255,255,.8);
  font-size: 13px;
  margin: 0;
}

@media (max-width: 600px) {
  .work-hero__img {
    height: 260px;
  }
}

/* ============================================================
   タグ
   ============================================================ */
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: var(--wp--preset--spacing--40);
}

.post-tag {
  display: inline-block;
  background: #e3e3e3;
  color: #555;
  font-size: 13px;
  padding: 4px 14px;
  border-radius: 20px;
  text-decoration: none;
  transition: background .2s, color .2s;
}

.post-tag:hover {
  background: #2593c2;
  color: #fff;
}

/* ============================================================
   前後記事ナビ
   ============================================================ */
.post-nav {
  display: flex;
  gap: var(--wp--preset--spacing--16);
  margin-top: var(--wp--preset--spacing--60);
  border-top: 2px solid #e3e3e3;
  padding-top: var(--wp--preset--spacing--30);
}

.post-nav__item {
  flex: 1;
  min-width: 0;
}

.post-nav__item--next {
  text-align: right;
}

.post-nav__link {
  display: block;
  text-decoration: none;
  padding: var(--wp--preset--spacing--16);
  background: #f9f9f9;
  border-radius: 6px;
  border: 1px solid #e3e3e3;
  transition: background .2s, border-color .2s;
}

.post-nav__link:hover {
  background: #e8f4f9;
  border-color: #2593c2;
}

.post-nav__dir {
  display: block;
  font-size: 12px;
  color: #2593c2;
  font-weight: 700;
  margin-bottom: 4px;
}

.post-nav__ttl {
  display: block;
  font-size: 13px;
  color: #333;
  font-weight: 700;
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

@media (max-width: 600px) {
  .post-nav {
    flex-direction: column;
  }
  .post-nav__item--next {
    text-align: left;
  }
}

/* ============================================================
   カテゴリーページ バナー
   ============================================================ */
.page-banner {
  background: #e3e3e3;
  padding: var(--wp--preset--spacing--60) 0;
}

.page-banner__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--wp--preset--spacing--12);
  text-align: center;
}

.page-banner__sub {
  color: #2593c2;
  font-size: var(--wp--preset--font-size--semi-large, 18px);
  font-weight: 700;
  margin: 0;
}

.page-banner__title {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  margin: 0;
  letter-spacing: .04em;
}

/* ============================================================
   施工実績 一覧グリッド
   ============================================================ */
.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--wp--preset--spacing--30);
}

.works-card__link {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  background: #fff;
  transition: transform .25s, box-shadow .25s;
}

.works-card__link:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,.14);
}

.works-card__img-wrap {
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #d0d8e0;
}

.works-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s;
}

.works-card__link:hover .works-card__img {
  transform: scale(1.05);
}

.works-card__img-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #d0d8e0, #eef1f4);
}

.works-card__body {
  padding: var(--wp--preset--spacing--16) var(--wp--preset--spacing--20);
  border-top: 3px solid #2593c2;
}

.works-card__title {
  font-weight: 700;
  font-size: 14px;
  margin: 0 0 6px;
  color: #333;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.works-card__date {
  font-size: 12px;
  color: #888;
}

@media (max-width: 781px) {
  .works-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--wp--preset--spacing--20);
  }
}

@media (max-width: 480px) {
  .works-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   ブログ・コラム 一覧グリッド
   ============================================================ */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--wp--preset--spacing--24);
}

.blog-card {
  display: flex;
}

.blog-card__link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.07);
  background: #fff;
  border: 1px solid #e3e3e3;
  transition: transform .25s, box-shadow .25s;
  width: 100%;
}

.blog-card__link:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  border-color: #2593c2;
}

.blog-card__img-wrap {
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #d0d8e0;
  flex-shrink: 0;
}

.blog-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s;
}

.blog-card__link:hover .blog-card__img {
  transform: scale(1.04);
}

.blog-card__img-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #d0d8e0, #eef1f4);
}

.blog-card__body {
  padding: var(--wp--preset--spacing--20);
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.blog-card__title {
  font-weight: 700;
  font-size: 15px;
  margin: 0;
  color: #333;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card__excerpt {
  font-size: 13px;
  color: #666;
  line-height: 1.6;
  margin: 0;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card__date {
  font-size: 12px;
  color: #999;
  display: block;
}

@media (max-width: 781px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--wp--preset--spacing--20);
  }
}

@media (max-width: 480px) {
  .blog-grid {
    grid-template-columns: 1fr;
    gap: var(--wp--preset--spacing--16);
  }
}

/* ============================================================
   ページネーション (カテゴリーページ)
   ============================================================ */
.pagination-wrap {
  margin-top: var(--wp--preset--spacing--60);
}

.pagination-wrap .nav-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ===========================================
   レスポンシブ対応
   =========================================== */

/* --- ヘッダー (≤900px): ハンバーガーメニュー切替 --- */
@media (max-width: 900px) {
  /* ヘッダーの左右パディング縮小 */
  .header-fixed {
    padding-left: var(--wp--preset--spacing--20, 1.25rem) !important;
    padding-right: var(--wp--preset--spacing--20, 1.25rem) !important;
  }

  /* ロゴとサイト名のレイアウト調整 */
  .wp-block-site-title.has-extra-extra-large-font-size {
    font-size: var(--wp--preset--font-size--semi-large, 1.125rem) !important;
  }
}

/* --- タブレット (≤781px): カラムを縦積みに --- */
@media (max-width: 781px) {

  /* FV: 上下パディング縮小 */
  .fv-content {
    padding-top: 100px !important;
    padding-bottom: 60px !important;
  }

  /* PRIDEセクション: 3列→縦積み (inline flex-wrap:nowrap を上書き) */
  .pride .wp-block-columns {
    flex-wrap: wrap !important;
    flex-direction: column;
    gap: var(--wp--preset--spacing--60, 3rem) !important;
  }
  .pride .wp-block-columns > .wp-block-column {
    flex-basis: 100% !important;
  }
  /* PRIDEの番号バッジ: モバイルでは右上に固定 */
  .pride .wp-block-columns .wp-block-column::before {
    top: -20px;
    right: 10px;
  }

  /* MENUセクション: 3列→縦積み */
  #top-menu .wp-block-columns {
    flex-wrap: wrap !important;
    flex-direction: column;
    gap: var(--wp--preset--spacing--20, 1.25rem) !important;
  }
  #top-menu .wp-block-columns > .wp-block-column {
    flex-basis: 100% !important;
  }

  /* CONTACTセクション: 2列→縦積み */
  .contact .wp-block-columns {
    flex-wrap: wrap !important;
    flex-direction: column;
    gap: var(--wp--preset--spacing--20, 1.25rem) !important;
  }
  .contact .wp-block-columns > .wp-block-column {
    flex-basis: 100% !important;
  }

  /* Google Map: 高さをモバイル向けに縮小 */
  .custom-map {
    height: 280px;
  }

  /* ボタン: 中央揃え・幅いっぱい */
  .wp-block-buttons.is-content-justification-center,
  .wp-block-buttons.is-content-justification-left {
    justify-content: center;
  }
  .wp-block-button {
    min-width: 0;
    width: 100%;
    max-width: 400px;
    margin-inline: auto;
  }
  .wp-block-button__link,
  .wp-element-button {
    width: 100%;
    text-align: center;
    box-sizing: border-box;
  }

  /* 会社紹介セクション: 長文テキストの折り返し調整 */
  .wp-block-group .wp-block-group p {
    word-break: normal;
    overflow-wrap: break-word;
  }

  /* フッター: テキスト中央揃えは既存ルールで対応済み */
}

/* --- スマートフォン縦 (≤480px): フォント・余白の追加調整 --- */
@media (max-width: 480px) {
  /* FV: さらに上部余白を縮小 */
  .fv-content {
    padding-top: 60px !important;
    padding-bottom: 40px !important;
  }

  /* CONTACTの電話番号: フォントサイズ縮小 */
  .contact .has-extra-extra-large-font-size {
    font-size: var(--wp--preset--font-size--large, 1.5rem) !important;
  }

  /* ヘッダースペーサー高さをヘッダー実高さに合わせる */
  /* (header.phpのinline style height:80pxの補完は .header-spacer クラスで対応) */
}

/* ============================================================
   ビフォー・アフター写真グリッド
   ============================================================ */
.before-after {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 0 0 40px;
}

.before-after__item {
  position: relative;
}

.before-after__label {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .05em;
  padding: 4px 14px;
  border-radius: 4px;
  color: #fff;
  pointer-events: none;
}

.before-after__label--before {
  background: rgba(80, 80, 80, .85);
}

.before-after__label--after {
  background: rgba(37, 147, 194, .9);
}

.before-after__img-wrap {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 8px;
  background: #f0f0f0;
}

.before-after__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}

.before-after__item:hover .before-after__img {
  transform: scale(1.03);
}

.before-after__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #bbb;
  font-size: 13px;
  border: 2px dashed #ddd;
  border-radius: 8px;
  background: #fafafa;
}

/* 矢印区切り装飾（中央） */
.before-after::after {
  display: none; /* JS拡張時の余地 */
}

@media (max-width: 600px) {
  .before-after {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* ── 日記 一覧（フォトグリッド）────────────────────────────────── */
.diary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.diary-card__link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.diary-card__img-wrap {
  overflow: hidden;
  border-radius: 6px;
  aspect-ratio: 1 / 1;
  background: #f0f0f0;
}

.diary-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.diary-card__link:hover .diary-card__img {
  transform: scale(1.04);
}

.diary-card__img-placeholder {
  width: 100%;
  height: 100%;
  background: #e8e8e8;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #bbb;
  font-size: 13px;
}

.diary-card__meta {
  padding: 10px 2px 0;
}

.diary-card__date {
  font-family: var(--wp--preset--font-family--roboto, monospace);
  font-size: 11px;
  color: var(--wp--preset--color--custom-blue-light, #2593c2);
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 4px;
}

.diary-card__title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  margin: 0;
  color: #333;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 781px) {
  .diary-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
}

@media (max-width: 480px) {
  .diary-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .diary-card__title {
    font-size: 12px;
  }
}

/* ── 日記 詳細ページ ────────────────────────────────────────────── */
.diary-wrap {
  padding-top: var(--wp--preset--spacing--60);
  padding-bottom: var(--wp--preset--spacing--80);
}

.diary-breadcrumb {
  font-size: 12px;
  color: #888;
  margin-bottom: var(--wp--preset--spacing--40);
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.diary-breadcrumb a {
  color: #888;
  text-decoration: none;
}

.diary-breadcrumb a:hover {
  color: var(--wp--preset--color--custom-blue-light, #2593c2);
}

.diary-single {
  max-width: 680px;
  margin: 0 auto;
}

.diary-single__date {
  display: block;
  font-family: var(--wp--preset--font-family--roboto, monospace);
  font-size: 13px;
  color: var(--wp--preset--color--custom-blue-light, #2593c2);
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}

.diary-single__title {
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  font-weight: 700;
  line-height: 1.5;
  margin: 0 0 var(--wp--preset--spacing--40);
  color: #222;
}

.diary-single__hero-wrap {
  margin: 0 0 var(--wp--preset--spacing--40);
  border-radius: 8px;
  overflow: hidden;
}

.diary-single__hero {
  width: 100%;
  height: auto;
  display: block;
  max-height: 520px;
  object-fit: cover;
}

.diary-single__body {
  font-size: 1rem;
  line-height: 2;
  color: #444;
}

/* 日記本文内の画像を角丸に */
.diary-single__body img {
  border-radius: 6px;
  max-width: 100%;
  height: auto;
}

/* 日記ナビ（前後） */
.diary-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: var(--wp--preset--spacing--60);
  padding-top: var(--wp--preset--spacing--40);
  border-top: 1px solid var(--wp--preset--color--custom-gray, #e0e0e0);
}

.diary-nav__item {
  flex: 1;
}

.diary-nav__item--next {
  text-align: right;
}

.diary-nav__link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.diary-nav__link:hover .diary-nav__ttl {
  color: var(--wp--preset--color--custom-blue-light, #2593c2);
}

.diary-nav__dir {
  font-size: 11px;
  color: #999;
  letter-spacing: 0.05em;
}

.diary-nav__ttl {
  font-size: 13px;
  font-weight: 700;
  color: #333;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 600px) {
  .diary-nav {
    flex-direction: column;
  }
  .diary-nav__item--next {
    text-align: left;
  }
}
