/**
 * WordPress テーマ専用の薄い接続層。
 * 元モックは div.breadcrumb / 単体HTML だが、WP は nav.breadcrumb と記事ラッパーを使うため
 * style.css との競合だけを解消する（hinode_kasou の CSS 本体は kasou-common.css のまま）。
 */

/* モックの .section--light（薄いグレー床）に合わせる。.section-light（白）とは別 */
.main-wrapper .section.section--light {
  background: var(--color-bg-light);
}

.main-wrapper nav.breadcrumb {
  display: block;
}

.main-wrapper .breadcrumb-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* style.css の .c-entry { padding: 2rem 0 } により、パンくず直下〜最初のセクションの間に白い余白が出るのを防ぐ */
main.p-page article.c-entry.c-entry--page {
  padding: 0;
  padding-block: 0;
}

.c-entry__content--legacy {
  font-family: var(--font-sans);
  color: var(--color-text);
  padding: 0;
  margin: 0;
}

/* 本文先頭要素の上余白（ブロックラッパー or 貼り込み section 直付けのどちらでも） */
main.p-page .c-entry__content--legacy > :first-child {
  margin-top: 0;
}

/* テーマ footer: main-wrapper 内で幅100%・3カラムグリッドを明示（モック news.html の .footer に合わせる） */
.site-footer-kasou {
  width: 100%;
  box-sizing: border-box;
}

.site-footer-kasou .footer-inner {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  box-sizing: border-box;
}

.site-footer-kasou .footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.site-footer-kasou .f-tel a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
}

@media (max-width: 900px) {
  .site-footer-kasou .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .site-footer-kasou {
    padding-left: 24px;
    padding-right: 24px;
  }
  .site-footer-kasou .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

/* page-tkc-*.css の max-width:980px で .sidebar が static になるのを抑止（左ドロワーを維持） */
@media (max-width: 1024px) {
  #mainSidebar.sidebar {
    position: fixed !important;
    left: 0;
    top: 0;
    width: 240px !important;
    height: 100vh !important;
    max-height: 100vh;
    z-index: 100;
  }
}

/* ----- 本文（レガシー HTML / ブロック）のはみ出し防止・小画面 ----- */
.c-entry__content--legacy img,
.c-entry__content--legacy video,
.c-entry__content--legacy svg:not(:root) {
  max-width: 100%;
  height: auto;
}
.c-entry__content--legacy pre,
.c-entry__content--legacy code {
  max-width: 100%;
}
.c-entry__content--legacy pre {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.c-entry__content--legacy iframe {
  max-width: 100%;
}

@media (max-width: 768px) {
  .c-entry__content--legacy {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

.c-entry__content:not(.c-entry__content--legacy) img,
.c-entry__content:not(.c-entry__content--legacy) video {
  max-width: 100%;
  height: auto;
}
