/*
 * kokohore テーマ
 * 寸法は旧テーマ (TCD AGENT) の表示を測った値に合わせている。1rem = 16px
 */

/* ---------- 変数 ---------- */
:root {
  --color-primary: #f3a7dc;
  --color-hover: #2c73ab;
  --color-text: #333;
  --color-text-body: #505050;
  --color-muted: #999;
  --color-border: #ddd;
  --color-link: #337ab7;
  --font-sans: "游ゴシック", "Yu Gothic", YuGothic, "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  --font-serif: "游明朝", YuMincho, "Hiragino Mincho ProN", "HG明朝E", serif;
  --container: 67.5rem; /* 1080px (左右の余白を含む) */
  --gutter: 0.9375rem; /* 15px */
  --header-height: 113px; /* ロゴ 49px + 上下 32px。固定ヘッダーの分だけ本文を下げるのに使う */
}

/* ---------- 基本 ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  margin: 0;
  color: var(--color-text);
  background: #fff;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.43;
  -webkit-text-size-adjust: 100%;
}

img,
video {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--color-link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link:focus {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 1000;
  width: auto;
  height: auto;
  padding: 0.5rem 1rem;
  clip: auto;
  background: #fff;
}

.icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- ボタン ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75em;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  text-decoration: none;
}

.button--cta {
  padding: 0.875rem 1.25rem 0.75rem;
  background: var(--color-primary);
  color: #fff;
  font-weight: bold;
  transition: background-color 0.2s;
}

.button--cta:hover,
.button--cta:focus-visible {
  background: var(--color-hover);
  color: #fff;
}

.button--cta .icon {
  width: 1.25em;
  height: 1.25em;
}

.button--large {
  padding: 1.0625rem 1.875rem 0.9375rem;
  font-size: 1.375rem;
}

.button--gray {
  padding: 0.875rem 2rem 0.75rem;
  background: #aaa;
  color: #fff;
  transition: background-color 0.2s;
}

.button--gray:hover,
.button--gray:focus-visible {
  background: var(--color-primary);
  color: #fff;
}

/* 英字のボタン (READ MORE) */
.button--en {
  padding: 0.75rem 1.5rem 0.625rem;
  font-family: "Lucida Sans Unicode", "Lucida Grande", Arial, sans-serif;
}

/* ---------- 記事のカード ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.875rem;
}

.card {
  background: #f4f4f4;
}

.card__image {
  display: block;
  aspect-ratio: 33 / 20;
  overflow: hidden;
  background: #ddd;
}

.card__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.card__image:hover img {
  transform: scale(1.05);
}

.card__body {
  padding: 1.125rem 1.5625rem 1rem;
}

.card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0;
  font-size: 0.75rem;
  font-weight: bold;
  line-height: 1.2;
}

.card__meta time {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  padding-right: 0.5rem;
  font-size: 0.875rem;
}

.card__meta .icon {
  width: 1.15em;
  height: 1.15em;
}

.card__cats {
  padding-left: 0.5rem;
  border-left: 1px solid #333;
}

.card__cats a {
  color: #000;
}

.card__title {
  margin: 0.625rem 0 0;
  font-size: 1rem;
  line-height: 1.7;
}

.card__title a {
  color: #000;
}

@media (max-width: 767px) {
  .card-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
  }

  .card__body {
    padding: 1.25rem;
  }

  .card__meta time {
    font-size: 0.75rem;
  }
}

/* ---------- ヘッダー ---------- */
.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.9);
}

.site-header__inner {
  display: flex;
  align-items: center;
  max-width: var(--container);
  margin: 0 auto;
  padding: 2rem var(--gutter);
}

.site-logo {
  flex: none;
  margin: 0;
  line-height: 0;
}

.site-logo img {
  width: 180px;
  height: auto;
}

.site-nav {
  flex: 1;
}

.site-nav__menu {
  display: flex;
  margin: 0;
  padding: 0 0 0 0.9375rem; /* 旧テーマと同じく、ロゴのすぐ右から並べる */
  list-style: none;
}

.site-nav__menu > li {
  position: relative;
}

.site-nav__menu a {
  display: block;
  padding: 0.9375rem;
  color: #000;
  font-weight: bold;
  white-space: nowrap;
  text-decoration: none;
}

.site-nav__menu a:hover,
.site-nav__menu .current-menu-item > a {
  color: var(--color-primary);
}

/* ドロップダウン */
.site-nav__menu .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 10;
  min-width: 10rem;
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--color-primary);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.18);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}

.site-nav__menu li:hover > .sub-menu,
.site-nav__menu li:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
}

.site-nav__menu .sub-menu a {
  padding: 0.875rem 1.25rem;
  color: #fff;
  font-size: 0.875rem;
  font-weight: normal;
}

.site-nav__menu .sub-menu a:hover {
  background: var(--color-hover);
  color: #fff;
}

.site-header__cta {
  flex: none;
  width: 16.25rem;
  justify-content: space-between;
  white-space: nowrap;
}

.menu-toggle {
  display: none;
}

/* 本文を固定ヘッダーの下から始める */
.site-content {
  padding-top: var(--header-height);
}

/* ---------- タブレット・スマホのヘッダー (旧テーマと同じく 1200px 未満) ---------- */
@media (max-width: 1199px) {
  :root {
    --header-height: 60px;
  }

  .site-header {
    background: #fff;
  }

  .site-header__inner {
    height: var(--header-height);
    padding-top: 0;
    padding-bottom: 0;
  }

  .site-logo img {
    width: 132px;
  }

  .site-header__cta {
    display: none;
  }

  .menu-toggle {
    display: block;
    position: relative;
    width: 2.75rem;
    height: 2.75rem;
    margin-left: auto;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
  }

  .menu-toggle__bar,
  .menu-toggle__bar::before,
  .menu-toggle__bar::after {
    position: absolute;
    left: 50%;
    width: 22px;
    height: 2px;
    margin-left: -11px;
    background: #888;
    transition: transform 0.2s;
  }

  .menu-toggle__bar {
    top: 50%;
  }

  .menu-toggle__bar::before,
  .menu-toggle__bar::after {
    content: "";
    left: 0;
    margin-left: 0;
  }

  .menu-toggle__bar::before {
    top: -7px;
  }

  .menu-toggle__bar::after {
    top: 7px;
  }

  .menu-toggle[aria-expanded="true"] .menu-toggle__bar {
    background: transparent;
  }

  .menu-toggle[aria-expanded="true"] .menu-toggle__bar::before {
    transform: translateY(7px) rotate(45deg);
  }

  .menu-toggle[aria-expanded="true"] .menu-toggle__bar::after {
    transform: translateY(-7px) rotate(-45deg);
  }

  .site-nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    max-height: calc(100vh - var(--header-height));
    overflow-y: auto;
    background: var(--color-primary);
    display: none;
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav__menu {
    display: block;
    padding: 0.75rem 0;
  }

  .site-nav__menu a,
  .site-nav__menu .current-menu-item > a {
    padding: 0.75rem 1.75rem;
    color: #fff;
  }

  .site-nav__menu .sub-menu {
    position: static;
    min-width: 0;
    background: none;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
  }

  .site-nav__menu .sub-menu a {
    padding: 0.625rem 2.75rem;
  }
}

/* ---------- パンくず ---------- */
.breadcrumb {
  margin: 2.5rem 0 0; /* 旧テーマ (122px) より詰める (2026-11-25 指示) */
  padding: 0 0 1.25rem;
  font-size: 0.75rem;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--color-muted);
}

.breadcrumb li + li::before {
  content: "›";
  margin: 0 0.75em;
}

.breadcrumb a {
  color: var(--color-muted);
}

.breadcrumb .icon {
  width: 1.2em;
  height: 1.2em;
}

/* ---------- 本文とサイドバー ---------- */
.layout-with-sidebar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 19rem;
  gap: 3.5rem;
  padding-bottom: 5rem;
}

.entry-title {
  margin: 1.25rem 0 2.5rem;
  font-size: 2rem;
  line-height: 1.4;
}

.entry-content p {
  margin: 0 0 2rem;
  color: var(--color-text-body);
  letter-spacing: 1px;
  line-height: 1.875;
}

.entry-content h2,
.entry-content h3 {
  margin: 0 0 0.875rem;
  padding: 0.625rem 0 0.875rem;
  border-bottom: 1px dotted #808080;
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.6;
}

.entry-content h4 {
  margin: 0 0 0.875rem;
  font-size: 1.125rem;
}

.entry-content table {
  width: 100%;
  margin: 0 0 1.5rem;
  border-collapse: collapse;
}

.entry-content td,
.entry-content th {
  padding: 0.625rem 0.9375rem 0.4375rem;
  border: 1px solid #bbb;
  background: #fff;
  line-height: 2.2;
}

.entry-content th {
  background: #ddd;
  font-weight: normal;
}

.entry-content figure {
  margin: 0;
}

.entry-content figure img,
.entry-content > img {
  margin: 0.625rem 0;
}

.entry-content figcaption {
  margin: 0.5rem 0 1rem;
}

.entry-content .wp-block-table td,
.entry-content .wp-block-table th {
  border-color: #bbb;
}

.entry-content a {
  color: var(--color-primary);
}

.entry-content img {
  height: auto;
}

/* 投稿の詳細 */
.entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin: 1.25rem 0 0;
  font-size: 0.875rem;
  font-weight: bold;
}

.entry-meta time,
.entry-meta__cats {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
}

.entry-meta .icon {
  width: 1.15em;
  height: 1.15em;
}

.entry-meta a {
  color: var(--color-text);
}

.entry-title--single {
  margin: 0.75rem 0 1.5rem;
  font-size: 1.5rem;
}

.entry-title--404 {
  font-weight: normal;
}

.entry-thumbnail {
  margin: 0 0 1.5rem;
}

.entry-thumbnail img {
  display: block;
}

.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 3rem 0;
  text-align: center;
}

.post-nav .button {
  min-width: 7.5rem;
  font-size: 0.875rem;
}

.related {
  margin: 0 0 3rem;
}

.related__title {
  margin: 0 0 1.25rem;
  padding: 0.75rem 0.625rem;
  background: #f4f4f4;
  font-size: 0.875rem;
}

.related__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.related .card__body {
  padding: 0.75rem 1rem;
}

.related .card__cats {
  display: none;
}

.related .card__title {
  margin-top: 0.375rem;
  font-size: 0.875rem;
}

/* 一覧 */
.card-grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pagination {
  margin: 3.125rem 0 0;
}

.pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.pagination .page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 2.375rem;
  height: 2.375rem;
  padding: 0 0.5rem;
  background: #bbb;
  color: #fff;
  font-size: 0.875rem;
  text-decoration: none;
}

.pagination a.page-numbers:hover {
  background: var(--color-primary);
}

.pagination .current {
  background: #222;
}

.pagination .dots {
  background: none;
  color: var(--color-text);
}

.no-results {
  margin: 1.25rem 0;
}

.search-form {
  display: flex;
  gap: 0.5rem;
  max-width: 30rem;
}

.search-form label {
  flex: 1;
}

.search-form .search-field {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ccc;
  font: inherit;
}

.search-form .search-submit {
  padding: 0.5rem 1rem;
  border: 0;
  background: #aaa;
  color: #fff;
  font: inherit;
  cursor: pointer;
}

/* サイドバー (ウィジェット) */
.sidebar .widget {
  margin: 0 0 2.5rem;
}

.sidebar ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sidebar .wp-block-categories a {
  display: block;
  padding: 0.4375rem 0;
  color: #000;
}

.sidebar .wp-block-tag-cloud a {
  display: block;
  margin: 0 0 0.5rem;
  font-size: 1rem !important; /* タグクラウドの文字の大きさの差をなくす (旧テーマの追加 CSS と同じ) */
}

@media (max-width: 767px) {
  .breadcrumb {
    margin-top: 1.5rem;
    padding-bottom: 0.9375rem;
  }

  .layout-with-sidebar {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
  }

  .entry-title {
    margin: 0.75rem 0 2.5rem;
    font-size: 1.125rem;
  }

  .entry-title--single {
    margin-bottom: 1.25rem;
  }

  .card-grid--2,
  .related__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- フッターの問い合わせの帯 ---------- */
.footer-cta {
  display: flex;
  align-items: center;
  min-height: 24.125rem;
  background: #888 var(--footer-cta-bg) center / cover no-repeat;
  background-attachment: fixed; /* 旧テーマのパララックスに近い見え方 */
  color: #fff;
  text-align: center;
}

.footer-cta__inner {
  width: 100%;
  padding: 3rem var(--gutter);
}

.footer-cta__headline {
  margin: 0 0 1.5rem;
  font-family: var(--font-serif);
  font-size: 3rem;
  line-height: 1.8;
  letter-spacing: -0.02em;
}

/* ---------- フッター ---------- */
.site-footer__main {
  padding: 5rem var(--gutter) 6.25rem;
  text-align: center;
}

.site-footer__logo img {
  width: 180px;
  height: auto;
}

.footer-nav__menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 2.125rem 0 0;
  padding: 0;
  list-style: none;
}

.footer-nav__menu a {
  display: block;
  padding: 0.9375rem;
  color: #000;
  font-weight: bold;
}

.footer-nav__menu a:hover,
.footer-nav__menu .current-menu-item > a {
  color: var(--color-primary);
}

.page-top {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 55px;
  background: #444;
  color: #fff;
}

.page-top .icon {
  width: 2rem;
  height: 2rem;
}

.site-footer__bottom {
  position: relative;
  background: #000;
  color: #fff;
}

.copyright {
  margin: 0;
  line-height: 3.75rem;
  text-align: center;
}

.sns-links {
  position: absolute;
  top: 0;
  right: max(var(--gutter), calc((100% - var(--container)) / 2 + var(--gutter)));
  display: flex;
  gap: 1.25rem;
  height: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sns-links a {
  display: flex;
  align-items: center;
  height: 100%;
  color: #fff;
}

.sns-links .icon {
  width: 1.25rem;
  height: 1.25rem;
}

/* スマホの下部バー */
.footer-bar {
  display: none;
}

@media (max-width: 767px) {
  .footer-cta {
    min-height: 9.375rem;
    background-attachment: scroll; /* スマホは fixed が効かない・重いため */
  }

  .footer-cta__inner {
    padding: 1.5rem var(--gutter);
  }

  .footer-cta__headline {
    margin-bottom: 0.5rem;
    font-family: var(--font-sans);
    font-size: 1.125rem;
    font-weight: normal;
  }

  .footer-cta .button--large {
    font-size: 0.75rem;
  }

  .site-footer__main {
    padding: 1.875rem var(--gutter) 1.25rem;
  }

  .footer-nav__menu {
    margin-top: 0.75rem;
  }

  .page-top {
    position: fixed;
    right: 0;
    bottom: calc(56px + env(safe-area-inset-bottom));
    z-index: 90;
    width: 50px;
    height: 50px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
  }

  .is-scrolled .page-top {
    opacity: 1;
    visibility: visible;
  }

  .site-footer__bottom {
    display: flex;
    flex-direction: column-reverse;
    padding-bottom: calc(56px + env(safe-area-inset-bottom));
  }

  .copyright {
    font-size: 0.625rem;
    line-height: 3.125rem;
  }

  .sns-links {
    position: static;
    justify-content: center;
    padding-top: 1.25rem;
  }

  .footer-bar {
    display: block;
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 90;
    padding-bottom: env(safe-area-inset-bottom);
    border-top: 1px solid #d8d8d8;
    background: #fff;
  }

  .footer-bar ul {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .footer-bar li {
    flex: 1;
  }

  .footer-bar li + li {
    border-left: 1px solid #d8d8d8;
  }

  .footer-bar a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    height: 56px;
    color: #000;
    font-size: 0.6875rem;
    text-decoration: none;
  }

  .footer-bar .icon {
    width: 1.25rem;
    height: 1.25rem;
  }
}
