/* ニュース・トピックス（一覧・カテゴリー・記事）だけで読む CSS */

/* =========================================================
   一覧
   ========================================================= */
.post-archive__query {
  padding-bottom: 10px;
}
@media (min-width: 768px) {
  .post-archive__query {
    padding-top: 18px;
    padding-bottom: 22px;
  }
}

/* =========================================================
   カテゴリーの絞り込み
   ========================================================= */
.category-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: clamp(12px, 2.5vw, 24px) auto;
  padding: 0;
}

.category-filter__btn {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid var(--color--rule);
  color: var(--color--ink);
  font-size: 14px;
  line-height: 1.5;
  transition: background-color 0.2s ease;
}
@media (hover: hover) {
  .category-filter__btn:hover {
    background-color: var(--color--surface);
  }
}

.category-filter__btn.is-current {
  border-color: var(--color--accent);
  background-color: var(--color--accent);
  color: var(--color--white);
}

/* =========================================================
   ページ送り（一覧の番号・記事の前後）
   ========================================================= */
.pagination,
.post-detail__pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding-top: 20px;
}

.post-detail__pager {
  gap: 10px;
  padding-top: 55px;
}

.pagination .page-numbers,
.pagination .wp-block-query-pagination-previous,
.pagination .wp-block-query-pagination-next,
.post-detail__pager .page-numbers,
.post-detail__pager .post-navigation-link-previous a,
.post-detail__pager .post-navigation-link-next a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--color--rule);
  color: var(--color--ink);
  font-size: 14px;
  transition: background-color 0.2s ease;
}
@media (hover: hover) {
  .pagination .page-numbers:hover,
  .post-detail__pager .page-numbers:hover,
  .post-detail__pager .post-navigation-link-previous a:hover,
  .post-detail__pager .post-navigation-link-next a:hover {
    background-color: var(--color--surface);
  }
}

.post-detail__pager .post-navigation-link-previous,
.post-detail__pager .post-navigation-link-next {
  margin: 0;
}

.pagination .page-numbers.current,
.post-detail__pager .page-numbers.is-current {
  border-color: var(--color--accent);
  background-color: var(--color--accent);
  color: var(--color--white);
}

.pagination .page-numbers.dots {
  border: 0;
}

/* =========================================================
   記事ページの2列（本文とサイドバー）
   ========================================================= */
.post-layout {
  display: flex;
  flex-direction: column;
  gap: 70px;
  padding: 56px 5vw 0;
}
@media (min-width: 1024px) {
  .post-layout {
    flex-direction: row;
    justify-content: center;
    gap: 70px;
    margin-bottom: 120px;
    padding: 92px 3% 0;
  }
}

.post-layout > * {
  margin: 0;
}
@media (min-width: 1024px) {
  .post-layout__main {
    width: 100%;
    max-width: 1000px;
  }

  .post-layout__side {
    flex-shrink: 0;
    width: 300px;
  }
}

.post-layout__side {
  margin-bottom: 60px;
}
@media (min-width: 1024px) {
  .post-layout__side {
    margin-bottom: 0;
  }
}

/* =========================================================
   記事本体
   ========================================================= */
.post-detail > * {
  margin: 0;
}

.post-detail .post-detail__title {
  margin: 0 0 12px;
  color: var(--color--ink-dark);
  font-family: var(--font--serif);
  font-size: clamp(22px, 4.2vw, 28px);
  font-weight: 500;
  letter-spacing: 0.1em;
  line-height: 1.35;
}

.post-detail .post-detail__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 16px;
}

.post-detail .post-detail__terms {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
}

.post-detail .post-detail__date {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  color: var(--color--ink--light);
  font-size: 14px;
  line-height: 1.4;
}

.post-detail__date::before {
  display: inline-block;
  width: 1em;
  height: 1em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236a7184' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E") center / contain no-repeat;
  content: "";
}

.post-detail .post-detail__thumb {
  max-width: 1000px;
  margin: 12px auto 30px;
  overflow: hidden;
}

.post-detail__thumb img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.post-detail__body > * + * {
  margin-top: 24px;
}

.post-detail__body p {
  line-height: 1.9;
}

.post-detail__body figure {
  margin: 1.2em 0;
}

.post-detail__body ul,
.post-detail__body ol {
  margin: 1em 0 1.2em;
}

.post-detail__body h2 {
  margin: 2.8em 0 1em;
  padding: 0 0 0.5em;
  border-bottom: 1px solid var(--color--rule);
  color: var(--color--ink-dark);
  font-family: var(--font--serif);
  font-size: clamp(20px, 3.2vw, 26px);
  font-weight: 500;
}

.post-detail__body h3 {
  margin: 2.4em 0 0.8em;
  padding-bottom: 0.3em;
  border-bottom: 1px solid var(--color--border);
  color: var(--color--ink-dark);
  font-size: clamp(18px, 2.6vw, 22px);
  font-weight: 500;
}

/* =========================================================
   サイドバー
   ========================================================= */
.post-sidebar > * {
  margin: 0;
}

.post-sidebar .post-sidebar__company {
  margin: 0 0 90px;
  padding: 16px;
  background-color: var(--color--surface);
}
@media (min-width: 1024px) {
  .post-sidebar .post-sidebar__company {
    margin-bottom: 50px;
  }
}

.post-sidebar__company > * + * {
  margin-top: 12px;
}

.post-sidebar .post-sidebar__company-title {
  margin: 0 0 10px;
  color: var(--color--ink-dark);
  font-family: var(--font--serif);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-align: center;
}

/* 図の下の余白は WordPress 本体の既定（1em）を使わない */
.post-sidebar .post-sidebar__company-thumb {
  margin-bottom: 0;
}

.post-sidebar__company-thumb img {
  display: block;
  width: 70%;
  margin: 0 auto;
}
@media (min-width: 1024px) {
  .post-sidebar__company-thumb img {
    width: 100%;
  }
}

.post-sidebar .post-sidebar__company-text {
  color: var(--color--ink);
  line-height: 1.8;
}

.post-sidebar .post-sidebar__title {
  margin: 0 0 10px;
  color: var(--color--ink-dark);
  font-family: var(--font--serif);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-align: center;
}

.post-sidebar .post-sidebar__latest {
  padding: 8px 12px;
  border: 1px solid var(--color--border);
  background-color: var(--color--white);
}

.post-sidebar__latest .wp-block-post-template {
  margin: 0;
  padding: 0;
  list-style: none;
}

.post-sidebar .post-sidebar__item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: start;
  column-gap: 12px;
  margin: 0;
  padding: 23px 0;
  border-bottom: 1px solid var(--color--border);
  transition: background-color 0.2s ease;
}

.post-sidebar__latest .wp-block-post:last-child .post-sidebar__item {
  border-bottom: 0;
}
@media (hover: hover) {
  .post-sidebar .post-sidebar__item:hover {
    background-color: var(--color--surface);
  }
}

.post-sidebar__item > * {
  margin: 0;
}

.post-sidebar__item-thumb {
  width: 64px;
  height: 64px;
  overflow: hidden;
}

.post-sidebar__item-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-sidebar .post-sidebar__item-title {
  margin: 0;
  color: var(--color--ink);
  font-family: var(--font--sans);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
}

.post-sidebar .post-sidebar__item--text {
  grid-template-columns: minmax(0, 1fr);
  padding: 12px 0;
}
@media (prefers-reduced-motion: reduce) {
  .post-sidebar .post-sidebar__item {
    transition: none;
  }
}

/* =========================================================
   営業日のカレンダー（ニュース記事の中。HTML ブロックで組む）
   ========================================================= */
.calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  max-width: 640px;
  margin: 40px auto;
  padding: 4px;
  background-color: var(--color--tile-bg);
  font-family: var(--font--serif);
  text-align: center;
}

.calendar__weekday {
  padding: 6px 0;
  background-color: var(--color--accent);
  color: var(--color--white);
  font-size: 13px;
  font-weight: 500;
}

.calendar__day {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 70px;
  padding: 8px 2px;
  background-color: var(--color--white);
  line-height: 1.4;
}

.calendar__day--closed {
  background-color: var(--color--caution-bg);
  color: var(--color--caution);
}

.calendar__month {
  color: var(--color--ink--light);
  font-size: 11px;
}

.calendar__day--closed .calendar__month {
  color: inherit;
}

.calendar__date {
  font-size: 16px;
  font-weight: 500;
}

.calendar__status {
  font-size: 12px;
}

/* =========================================================
   記事の中のリンクと引用
   ========================================================= */
.post-detail__body a:not(.wp-block-button__link) {
  color: var(--color--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* 引用：左の太い線は使わず、淡い面で区切る */
.post-detail__body .wp-block-quote {
  margin-right: 0;
  margin-left: 0;
  padding: 20px clamp(16px, 3vw, 28px);
  border: 0;
  background-color: var(--color--surface);
}

.post-detail__body .wp-block-quote > * {
  margin: 0;
}

.post-detail__body .wp-block-quote > * + * {
  margin-top: 12px;
}
