/* Fixed: newsアーカイブ／タクソノミーの旧レイアウトをredesign準拠のスタイルへ変更（理由: Next.js版/newsとデザインを一致させるため） */
.news-redesign {
  --nw-bg: #fbf9f5;
  --nw-white: #fff;
  --nw-soft: #f4f0e8;
  --nw-ink: #2e2e2e;
  --nw-muted: #666;
  --nw-primary: #3a93ca;
  --nw-primary-dark: #2c74a0;
  --nw-primary-soft: #e7f2f9;
  --nw-line: #e5e0d6;
  --nw-red: #d9455a;
  --nw-font-sans: var(--font-sans, "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Helvetica Neue", Arial, sans-serif);
  --nw-font-heading: var(--font-heading, "Zen Maru Gothic", var(--nw-font-sans));
  background: var(--nw-bg);
  color: var(--nw-ink);
  font-family: var(--nw-font-sans);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

.news-redesign .container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.news-redesign .section {
  padding-block: clamp(3rem, 7vw, 5rem);
}

/* ===== ヒーロー ===== */
.news-redesign .pageHero.news-hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(2.5rem, 6vw, 4rem);
  border-bottom: 1px solid var(--nw-line);
  background:
    radial-gradient(120% 90% at 90% 0%, var(--nw-primary-soft) 0%, transparent 55%),
    var(--nw-soft);
}

.news-hero:before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../img/top/hero_rightlower.webp") center / cover;
  transform: scale(1.15);
  filter: blur(48px) saturate(1.15);
  opacity: .5;
  pointer-events: none;
}

.news-hero:after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -70deg,
    rgba(255, 255, 255, .33) 0,
    rgba(255, 255, 255, .33) 2px,
    transparent 2px,
    transparent 6px
  );
  pointer-events: none;
}

.news-hero > .container {
  position: relative;
  z-index: 3;
}

.news-hero__en,
.news-hero h1,
.news-hero p {
  display: table;
  background: #fff;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  padding: .06em .28em;
}

.news-hero__en {
  display: table;
  font-family: var(--nw-font-sans);
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--nw-primary);
  font-size: clamp(1.75rem, 4.5vw, 2.75rem);
  line-height: 1.1;
}

.news-hero h1 {
  margin: 0;
  font-family: var(--nw-font-heading);
  font-size: clamp(1.05rem, 2.5vw, 1.4rem);
  line-height: 1.4;
}

.news-hero p {
  max-width: 60ch;
  margin-top: 1rem;
  color: var(--nw-muted);
}

.news-hero nav {
  display: inline-flex;
  gap: .65rem;
  margin-top: 1.5rem;
  padding: .35rem .95rem;
  border: 1px solid var(--nw-line);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(58, 147, 202, .08);
  font-size: .82rem;
  color: var(--nw-muted);
}

.news-hero nav a {
  color: var(--nw-primary);
}

/* ===== フィルター ===== */
.news-filter {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 2rem;
}

.news-filter__btn {
  display: inline-flex;
  align-items: center;
  padding: .4rem 1.1rem;
  font-size: .8rem;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--nw-white);
  color: var(--nw-muted);
  text-decoration: none;
  transition: all .2s ease;
}

.news-filter__btn:hover {
  opacity: .8;
}

.news-filter__btn.cat-info { background: rgba(58, 147, 202, .10); color: var(--nw-primary-dark); border-color: rgba(58, 147, 202, .30); }
.news-filter__btn.cat-admission { background: rgba(44, 122, 79, .10); color: #2d7a4f; border-color: rgba(44, 122, 79, .30); }
.news-filter__btn.cat-seminar { background: rgba(200, 130, 0, .10); color: #a06000; border-color: rgba(200, 130, 0, .30); }
.news-filter__btn.cat-open { background: rgba(120, 80, 180, .10); color: #6b3fa0; border-color: rgba(120, 80, 180, .30); }
.news-filter__btn.cat-important { background: rgba(200, 50, 50, .10); color: #b02020; border-color: rgba(200, 50, 50, .30); }

.news-filter__btn.is-active {
  box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
  font-weight: 700;
  opacity: 1;
}

.news-filter__btn.is-active.cat-info { background: rgba(58, 147, 202, .18); border-color: rgba(58, 147, 202, .5); }
.news-filter__btn.is-active.cat-admission { background: rgba(44, 122, 79, .18); border-color: rgba(44, 122, 79, .5); }
.news-filter__btn.is-active.cat-seminar { background: rgba(200, 130, 0, .18); border-color: rgba(200, 130, 0, .5); }
.news-filter__btn.is-active.cat-open { background: rgba(120, 80, 180, .18); border-color: rgba(120, 80, 180, .5); }
.news-filter__btn.is-active.cat-important { background: rgba(200, 50, 50, .18); border-color: rgba(200, 50, 50, .5); }

.news-filter__btn.is-active:not(.cat-info):not(.cat-admission):not(.cat-seminar):not(.cat-open):not(.cat-important) {
  background: var(--nw-ink);
  color: #fff;
  border-color: var(--nw-ink);
}

/* ===== カードグリッド ===== */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.news-card {
  display: flex;
  flex-direction: column;
  background: var(--nw-white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
  color: var(--nw-ink);
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
}

.news-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .10);
}

.news-card__thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--nw-soft);
  overflow: hidden;
}

.news-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1rem 1.1rem 1.1rem;
  gap: .5rem;
}

.news-card__meta {
  display: flex;
  align-items: center;
  gap: .4rem;
  flex-wrap: wrap;
}

.news-cat {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .2rem .7rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  white-space: nowrap;
  text-align: center;
}

.news-cat.cat-info { background: rgba(58, 147, 202, .12); color: var(--nw-primary-dark); }
.news-cat.cat-admission { background: rgba(90, 170, 120, .14); color: #2d7a4f; }
.news-cat.cat-seminar { background: rgba(255, 165, 0, .12); color: #a06000; }
.news-cat.cat-open { background: rgba(150, 100, 200, .12); color: #6b3fa0; }
.news-cat.cat-important { background: rgba(220, 60, 60, .12); color: #b02020; }

.news-new {
  display: inline-flex;
  align-items: center;
  padding: .1rem .5rem;
  background: var(--nw-red);
  color: #fff;
  font-size: .68rem;
  font-weight: 700;
  border-radius: 999px;
  letter-spacing: .05em;
  flex-shrink: 0;
}

.news-card__title {
  font-size: .9rem;
  line-height: 1.6;
  flex: 1;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: .5rem;
  border-top: 1px solid var(--nw-line);
}

.news-date {
  font-size: .78rem;
  color: var(--nw-muted);
  white-space: nowrap;
  letter-spacing: .03em;
}

.news-card__link {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  font-size: .78rem;
  font-weight: 600;
  color: var(--nw-primary);
}

.news-empty {
  padding: 2rem 0;
  color: var(--nw-muted);
  font-size: .9rem;
}

.news-pagenavi {
  margin-top: 2.5rem;
  text-align: center;
}

.news-pagenavi .wp-pagenavi {
  display: inline-flex;
  flex-wrap: wrap;
  gap: .4rem;
  justify-content: center;
}

.news-pagenavi .wp-pagenavi a,
.news-pagenavi .wp-pagenavi span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 .5rem;
  border: 1px solid var(--nw-line);
  border-radius: 8px;
  color: var(--nw-ink);
  text-decoration: none;
  font-size: .85rem;
}

.news-pagenavi .wp-pagenavi .current {
  background: var(--nw-primary);
  border-color: var(--nw-primary);
  color: #fff;
  font-weight: 700;
}

/* ===== 記事詳細（/news/{id}） ===== */
/* Fixed: single-news.php が旧デザインの生マークアップのままで本文にスタイルが
   全く当たっていなかったため、Next.js版（NewsDetail.module.css）に合わせて追加
   （理由: 一覧・タクソノミーは既にredesign対応済みで、詳細ページだけ未対応だったため）。 */
.news-crumbs-bar {
  padding-top: 24px;
}

.news-crumbs-inner {
  max-width: 760px;
  margin-inline: auto;
}

.news-crumbs {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .15rem;
  font-size: .82rem;
  color: var(--nw-muted);
  padding: .35rem .95rem;
  background: var(--nw-white);
  border: 1px solid var(--nw-line);
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(58, 147, 202, .08);
}

.news-crumbs a {
  color: var(--nw-primary);
  text-decoration: none;
}

.news-crumb {
  display: inline-flex;
  align-items: center;
}

.news-crumb__sep {
  margin-inline: .5rem;
  opacity: .5;
}

.news-article-section {
  padding-top: clamp(1.75rem, 4vw, 3rem) !important;
}

.news-article {
  max-width: 760px;
  margin-inline: auto;
}

.news-article__header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--nw-line);
}

.news-article__meta {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .85rem;
  flex-wrap: wrap;
}

.news-article__date {
  font-size: .82rem;
  color: var(--nw-muted);
  letter-spacing: .03em;
}

.news-article__title {
  font-size: clamp(1.15rem, 2.5vw, 1.5rem);
  line-height: 1.5;
  color: var(--nw-ink);
  font-weight: 700;
}

.news-article__body {
  font-size: 1rem;
  line-height: 1.9;
  color: var(--nw-ink);
}

.news-article__body p {
  margin-bottom: 1.25rem;
}

.news-article__body h2,
.news-article__body h3,
.news-article__body h4 {
  font-weight: 700;
  line-height: 1.4;
  margin-top: 2rem;
  margin-bottom: .75rem;
  color: var(--nw-ink);
}

.news-article__body h2 { font-size: 1.25rem; }
.news-article__body h3 { font-size: 1.1rem; }
.news-article__body h4 { font-size: 1rem; }

.news-article__body ul,
.news-article__body ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.news-article__body li {
  font-size: .95rem;
  line-height: 1.75;
}

.news-article__body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin-block: 1rem;
}

.news-article__body table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
  display: block;
}

.news-article__body th,
.news-article__body td {
  padding: .6rem .85rem;
  border: 1px solid var(--nw-line);
  text-align: left;
  vertical-align: top;
  line-height: 1.65;
}

.news-article__body th {
  background: var(--nw-soft);
  font-weight: 700;
  white-space: nowrap;
}

.news-article__body a {
  color: var(--nw-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.news-article__body a:hover {
  opacity: .75;
}

.news-article__body p:empty {
  display: none;
}

.news-article__back {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--nw-line);
}

.news-redesign .btn--outline {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .65rem 1.5rem;
  border: 1.5px solid var(--nw-primary);
  border-radius: 999px;
  color: var(--nw-primary);
  font-weight: 700;
  font-size: .9rem;
  text-decoration: none;
  transition: background-color .2s, color .2s;
}

.news-redesign .btn--outline:hover {
  background: var(--nw-primary);
  color: #fff;
}

/* ===== レスポンシブ ===== */
@media (max-width: 1024px) {
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }
}

@media (max-width: 640px) {
  .news-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}
