/*
Theme Name: Simple BBS Theme
Description: SMパートナー募集掲示板 用カスタムテーマ
Version: 1.0
Author: You
*/

/* ==========================================================
  基本リセット
========================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Noto Sans JP", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.7;
  background: #f7f5f3; /* グレージュ系ライト背景 */
  color: #221c1c;
  font-size: 16px;
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

a {
  color: #8b1e3f; /* 深ワインレッド */
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover,
a:focus {
  color: #6c142f;
  text-decoration: underline;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: 1rem;
}

/* フォーカス可視化（WCAG） */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 3px solid #8b1e3f;
  outline-offset: 2px;
}

/* ==========================================================
  ヘッダー
========================================================== */
.site-header {
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  padding: 0.9rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.site-header__title {
  margin: 0;
}

.site-header__title a {
  font-size: 1.4rem;
  font-weight: 700;
  color: #8b1e3f;
}

/* サイト内検索（ヘッダー） */
.site-search {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.site-search input[type="search"] {
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  border: 1px solid #ccc;
  min-width: 220px;
  font-size: 0.95rem;
  background: #fff;
}
.site-search input[type="search"]:focus {
  border-color: #8b1e3f;
  box-shadow: 0 0 0 3px rgba(139, 30, 63, 0.25);
  outline: none;
}

.site-search button {
  background: #8b1e3f;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.4rem 0.8rem;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s ease;
}
.site-search button:hover,
.site-search button:focus {
  background: #6c142f;
}

/* スクリーンリーダー用テキスト */
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ==========================================================
  レイアウト：2カラム
========================================================== */

/* ヘッダー直下のメインラッパー
   ※ header.php の <main class="site-main"> に適用される想定 */


/* メイン＋サイドナビを並べるコンテナ
   front-page.php や taxonomy-bbs_board.php 側で
   <div class="content-wrap"> ... </div> としている想定 */
.content-wrap {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto 2.5rem;
  padding: 1.5rem 1.5rem 0;
}

.site-main {
  width: 100%;
  flex: 1;
}

/* メインカラム（約900px） */
.content-main {
  flex: 1 0;
}

/* サイドバー（約300px） */
.site-sidebar {
  flex: 0 0 370px;
  max-width: 370px;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 1.5rem;
}

/* サイドバー内ウィジェット */
.widget {
  margin-bottom: 2rem;
}

.widget-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #8b1e3f;
  border-left: 4px solid #8b1e3f;
  padding-left: 0.5rem;
  margin: 0 0 0.7rem;
}

/* サイドの掲示板一覧 */
.sidebar-board-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sidebar-board-list li {
  margin: 0.4rem 0;
}
.sidebar-board-list a {
  color: #221c1c;
}
.sidebar-board-list a:hover {
  color: #8b1e3f;
}

/* サイドバナー */
.ad-banner {
  width: 100%;
}
.ad-banner > iframe {
  width: 100%!important;
  height: auto;
}

/* セクション共通 */
section {
  margin-bottom: 2rem;
}

/* ==========================================================
  トップページ：掲示板検索
========================================================== */

.bbs-search {
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 2rem 1.5rem;
  text-align: center;
}

.bbs-search__title {
  width: 100%;
  font-size: 1.5rem;
  font-weight: 700;
  color: #8b1e3f;
  border-left: 4px solid #8b1e3f;
  display: block;
  text-align: left;
  padding-left: 0.5rem;
  margin: 0 0 0.6rem;
}

.bbs-search__desc {
  font-size: 0.95rem;
  color: #555;
  margin-bottom: 1.2rem;
}

.bbs-search__form {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
}

.bbs-search__form input[type="search"],
.bbs-search__form select {
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 0.5rem 0.7rem;
  font-size: 0.95rem;
  min-width: 180px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.bbs-search__form input[type="search"]:focus,
.bbs-search__form select:focus {
  border-color: #8b1e3f;
  box-shadow: 0 0 0 3px rgba(139, 30, 63, 0.25);
  outline: none;
}

.bbs-search__form button {
  background: #8b1e3f;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.55rem 1.2rem;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s ease;
}
.bbs-search__form button:hover,
.bbs-search__form button:focus {
  background: #6c142f;
}

/* ==========================================================
  トップページ：最新投稿
========================================================== */

.bbs-latest {
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 2rem 1.5rem;
}

.bbs-latest__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #8b1e3f;
  border-left: 4px solid #8b1e3f;
  padding-left: 0.5rem;
  margin: 0 0 0.5rem;
}

.bbs-latest__desc {
  font-size: 0.95rem;
  color: #555;
  margin-bottom: 1.5rem;
}

.bbs-latest-entry {
  border-top: 1px solid #e5e5e5;
  padding: 1.2rem 0;
}
.bbs-latest-entry:first-of-type {
  border-top: none;
}

.bbs-latest-entry__title a {
  color: #8b1e3f;
  font-weight: 600;
  font-size: 1.05rem;
}
.bbs-latest-entry__title a:hover {
  text-decoration: underline;
}

.bbs-latest-entry__meta {
  font-size: 0.85rem;
  color: #5a4f4f;
  margin: 0.3rem 0 0.5rem;
}

.bbs-latest-entry__body {
  font-size: 0.95rem;
  color: #222;
  background: #fbf8f7;
  padding: 0.8rem 1rem;
  border-left: 3px solid #8b1e3f;
  border-radius: 6px;
}

.bbs-latest-entry__footer {
  margin-top: 0.6rem;
}
.bbs-latest-entry__footer a {
  color: #8b1e3f;
  font-weight: 500;
  font-size: 0.9rem;
}
.bbs-latest-entry__footer a:hover {
  color: #6c142f;
}

/* ==========================================================
  トップページ：掲示板カテゴリ一覧
========================================================== */

.bbs-board-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.bbs-board-card {
  display: block;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 1rem 1.2rem;
  color: #111;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.bbs-board-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  text-decoration: none;
}

.bbs-board-card__title {
  font-size: 1.1rem;
  color: #8b1e3f;
  margin: 0 0 0.3rem;
}
.bbs-board-card:hover .bbs-board-card__title {
  text-decoration: underline;
}
.bbs-board-card__desc {
  font-size: 0.9rem;
  color: #555;
  margin: 0;
}
.bbs-board-card:hover .bbs-board-card__desc {
  text-decoration: none;
}

/* ==========================================================
  掲示板ページ共通（taxonomy-bbs_board.php）
========================================================== */

/* 見出し部 */
.bbs-list-header {
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.bbs-list-header h2 {
  margin: 0 0 0.4rem;
  font-size: 1.4rem;
  color: #8b1e3f;
}
.bbs-list-header p {
  margin: 0;
  font-size: 0.95rem;
  color: #555;
}

/* 掲示板エントリ（投稿） */
.bbs-entry {
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 1.3rem 1.4rem;
  margin-bottom: 1.3rem;
}

.bbs-entry__title {
  font-weight: 700;
  font-size: 1.1rem;
  margin: 0 0 0.3rem;
  color: #8b1e3f;
}

.bbs-entry__meta {
  font-size: 0.85rem;
  color: #555;
  margin-bottom: 0.5rem;
}

.bbs-entry__body {
  font-size: 0.95rem;
  color: #222;
  background: #fbf8f7;
  padding: 0.8rem 1rem;
  border-left: 3px solid #8b1e3f;
  border-radius: 6px;
}
.bbs-entry__body + .bbs-entry__footer {
  margin-top: 1rem;
}

/* 返信一覧 */
.bbs-replies {
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 1.3rem 1.4rem;
  margin-bottom: 1.5rem;
}

.bbs-replies__title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #8b1e3f;
  border-left: 4px solid #8b1e3f;
  padding-left: 0.5rem;
  margin: 0 0 1rem;
}

.bbs-reply {
  border-top: 1px solid #e0e0e0;
  padding-top: 0.8rem;
  margin-top: 0.8rem;
}
.bbs-reply:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.bbs-reply__meta {
  font-size: 0.85rem;
  color: #555;
}
.bbs-reply__body {
  font-size: 0.95rem;
  color: #222;
  background: #fbf8f7;
  padding: 0.6rem 0.8rem;
  border-radius: 6px;
  margin-top: 0.3rem;
}

/* 新規投稿リンク */
.bbs-new-link {
  display: inline-block;
  background: #8b1e3f;
  color: #fff;
  border-radius: 999px;
  padding: 0.4rem 1rem;
  font-size: 0.9rem;
  text-decoration: none;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
  transition: background 0.2s ease;
}
.bbs-new-link:hover {
  background: #6c142f;
  color: #fff;
  text-decoration: none;
}

/* ==========================================================
  フォーム共通（投稿・返信・削除・通報）
========================================================== */

.bbs-form {
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 1.6rem 1.4rem;
  margin-bottom: 2rem;
}

.bbs-form__title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #8b1e3f;
  border-left: 4px solid #8b1e3f;
  padding-left: 0.5rem;
  margin: 0 0 0.8rem;
}

.bbs-form__message {
  font-size: 0.95rem;
  margin: 0 0 0.8rem;
}
.bbs-form__message--error {
  color: #b30000;
}

.bbs-form__row {
  margin-bottom: 1rem;
}

.bbs-form__row label {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 0.3rem;
  color: #221c1c;
}

.bbs-form__row input,
.bbs-form__row textarea,
.bbs-form__row select {
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 0.5rem 0.7rem;
  font-size: 0.95rem;
  background: #fff;
}

.bbs-form__row input:focus,
.bbs-form__row textarea:focus,
.bbs-form__row select:focus {
  border-color: #8b1e3f;
  box-shadow: 0 0 0 3px rgba(139, 30, 63, 0.25);
  outline: none;
}

.bbs-form__row button {
  background: #8b1e3f;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.55rem 1.2rem;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background 0.2s ease;
}
.bbs-form__row button:hover {
  background: #6c142f;
}
.bbs-error {
  color: #8b1e3f;
}

/* ==========================================================
  ページネーション
========================================================== */

.bbs-pagination {
  text-align: center;
  margin-top: 1.5rem;
}

.bbs-pagination .page-numbers {
  display: inline-block;
  margin: 0 0.2rem;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  border: 1px solid #ddd;
  font-size: 0.9rem;
  background: #fff;
  color: #8b1e3f;
}

.bbs-pagination .current {
  background: #8b1e3f;
  color: #fff;
  border-color: #8b1e3f;
}

/* ==========================================================
  フッター
========================================================== */

.site-footer {
  background: #2b1b1b;
  color: #ffffff;
  padding: 2rem 1rem;
  text-align: center;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
  margin-top: 3rem;
  font-size: 0.9rem;
}

.site-footer a {
  color: #ffffff;
}
.site-footer a:hover {
  color: #f2b4c5;
}

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

@media (max-width: 900px) {
  .site-header__inner {
    flex-direction: column;
    align-items: stretch;
  }

  .site-header__title {
    text-align: center;
  }

  .site-search {
    justify-content: center;
  }

  .site-main {
    padding: 0;
  }

  .content-wrap {
    flex-direction: column;
  }

  .content-main,
  .site-sidebar {
    flex: 1 1 auto;
    width: 100%;
    max-width: inherit;
  }

  .bbs-search__form {
    flex-direction: column;
  }

  .bbs-search__form input[type="search"],
  .bbs-search__form select {
    width: 100%;
    max-width: 320px;
  }
}
