/* ========================
   HERO
======================== */
.wb-news-main {
  width: 100%;
  overflow-x: hidden;
  color: var(--wb-color-text);
  font-family: var(--wb-font-jp);
  background: var(--wb-color-bg-light);
}

.wb-news-hero {
  position: relative;
  width: 100%;
  height: clamp(300px, 46.875vw, 675px);
  overflow: hidden;
}

.wb-news-hero img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

/* ========================
   TITLE SECTION
======================== */
.wb-news-main .wb-news-title {
  position: relative;
  width: 100%;
  padding: 44px 0 36px;
  overflow: hidden;
  text-align: center;
  z-index: 1;
  background: transparent;
}

/* Heading wrapper so the deco image can sit behind only the title */
.wb-news-title .wb-news-title-en {
  position: relative;
  z-index: 2;
  display: inline-block;
  margin-bottom: 6px;
  color: var(--wb-color-accent);
  font-family: var(--wb-font-title);
  font-size: 40px;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0.08em;
}

.wb-news-title .wb-news-title-en::before {
  width: 160px;
  height: 96px;
}

/* Decorative glow image behind the title */
.wb-news-title .wb-news-title-deco {
  position: absolute;
  top: 30%;
  left: 50%;
  z-index: 1;
  width: 460px;
  height: auto;
  opacity: 1;
  transform: translate(-50%, -58%);
  pointer-events: none;
  user-select: none;
}

.wb-news-title .wb-news-title-jp {
  position: relative;
  z-index: 1;
  margin-bottom: 28px;
  color: var(--wb-color-text);
  font-family: var(--wb-font-jp);
  font-size: 14px;
  font-weight: 400;
  line-height: 2;
  letter-spacing: 0.05em;
}

/* ========================
   FILTER TABS
======================== */

/* 「すべて」 button + category unified grid */
.wb-news-title .wb-news-filter {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  width: calc(100% - 48px);
  max-width: 886px;
  margin: 50px auto;
}

.wb-news-title .wb-news-filter .webgene-blog {
  display: contents;
}

.wb-news-title .wb-news-filter .webgene-item {
  width: auto;
  margin: 0;
}

.wb-news-title .wb-news-filter .webgene-item .wb-news-filter-btn {
  width: 100%;
}

.wb-news-filter .wb-news-filter-btn {
  display: inline-flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  width: 274px;
  padding: 11px 8px;
  border: none !important;
  background-color: #a1a1a1;
  color: #ffffff !important;
  font-family: var(--wb-font-jp-sans);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  letter-spacing: 0.08em;
  transition: all 0.3s ease;
}

.wb-news-filter .wb-news-filter-btn > p {
  margin: 0;
}

.wb-news-filter .wb-news-filter-btn.is-active,
.wb-news-filter .wb-news-filter-btn:hover,
.wb-news-filter .wb-news-filter-btn:focus,
.wb-news-filter .wb-news-filter-btn:active {
  border: none !important;
  background-color: var(--wb-color-title);
  color: #ffffff !important;
}

/* ========================
   GRID SECTION
======================== */
.wb-news-main .wb-news-section {
  width: 100%;
  padding: 44px 0 64px;
  background-color: var(--wb-color-bg-light);
}

/* =====================================================
   NEWS LIST COMPONENT - allNews template
   Dynamic component: .webgene-blog + .news-list-* + .webgene-pagination
   Mobile first layout
===================================================== */

/* --- Wrapper / Grid --- */
.webgene-blog,
.news-list {
  display: grid;
  grid-template-columns: 1fr;
  width: calc(100% - 48px);
  max-width: 886px;
  margin: 0 auto;
  padding: 0;
  column-gap: 0;
  row-gap: 40px;
  background: transparent;
}

.webgene-header {
  display: none;
}

/* --- Each Card --- */
.news-list-item {
  margin: 0;
  padding: 0;
  border: none !important;
}

.news-list-item:last-of-type {
  margin-bottom: 0;
  border-bottom: none !important;
}

/* --- Link Wrapper --- */
a.news-list-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: var(--wb-color-text) !important;
  text-decoration: none !important;
}

/* --- Date --- */
.news-list-date {
  order: 1;
  margin: 0 0 2px;
  color: var(--wb-color-text);
  font-family: var(--wb-font-poppins, "Poppins", serif);
  font-size: 22px;
  font-weight: 300;
  line-height: 1.6;
  letter-spacing: 0.05em;
}

/* --- Category --- */
.news-list-category {
  order: 2;
  display: block;
  margin: 0 0 6px;
  padding: 0;
  border: none;
  color: var(--wb-color-black);
  font-family: var(--wb-font-jp, serif);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0.05em;
}

/* --- Title --- */
.news-list-title {
  order: 3;
  flex: 0 0 auto;
  margin: 0 0 16px;
  color: var(--wb-color-black);
  font-family: var(--wb-font-jp, serif);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0.05em;
  transition: opacity 0.3s;
}

/* --- Content Wrapper --- */
.news-list-content {
  order: 3;
  display: contents;
}

/* --- Thumbnail --- */
.news-list-img {
  order: 4;
  width: 100%;
  margin: auto 0 0;
  overflow: hidden;
  aspect-ratio: 427 / 300;
  background-color: var(--wb-color-bg-warm);
}

.news-list-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

a.news-list-link:hover .news-list-img img {
  transform: scale(1.04);
}

a.news-list-link:hover .news-list-title {
  opacity: 0.7;
}

/* --- View More --- */
.news-list-more {
  display: none !important;
}

/* =====================================================
   PAGINATION
===================================================== */
.webgene-pagination {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  margin-top: 16px !important;
}

.webgene-pagination ul {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none !important;
}

.webgene-pagination li {
  margin: 0;
  list-style: none !important;
}

/* Numbered page links */
.webgene-pagination li a,
.webgene-pagination li span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--wb-color-title);
  border-radius: 50%;
  background-color: transparent;
  color: var(--wb-color-black);
  font-family: var(--wb-font-poppins, serif);
  font-size: 13px;
  font-weight: 400;
  line-height: 1;
  text-decoration: none !important;
  transition: all 0.25s ease;
}

.webgene-pagination li.number a,
.webgene-pagination li.number span {
  width: 38px;
  height: 38px;
  font-size: 14px;
}

/* Active page */
.webgene-pagination li.selected a,
.webgene-pagination li.selected span,
.webgene-pagination li.number.selected a,
.webgene-pagination li.number.selected span,
.webgene-pagination li.current a,
.webgene-pagination li.current span,
.webgene-pagination li.active a,
.webgene-pagination li.active span,
.webgene-pagination li a:hover {
  background-color: var(--wb-color-title);
  border-color: var(--wb-color-title);
  color: var(--wb-color-black);
}

/* Ellipsis */
.webgene-pagination li.dots a,
.webgene-pagination li.dots span,
.webgene-pagination li.ellipsis span {
  width: auto;
  border: none;
  background: transparent;
  color: var(--wb-color-title) !important;
  letter-spacing: 2px;
}

/* Prev / Next */
.webgene-pagination li.next a,
.webgene-pagination li.prev a {
  width: auto;
  min-width: 30px;
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--wb-color-line);
  border-radius: 15px;
  color: var(--wb-color-black) !important;
  font-family: var(--wb-font-jp-sans);
  font-size: 18px;
  letter-spacing: 0.08em;
}

.webgene-pagination li.next a:hover,
.webgene-pagination li.prev a:hover {
  background-color: var(--wb-color-title);
  border-color: var(--wb-color-title);
  color: #ffffff !important;
}

/* =====================================================
   TABLET ≥ 600px
===================================================== */
@media (min-width: 600px) {
  .wb-news-title .wb-news-filter {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    width: calc(100% - 80px);
  }
}

/* =====================================================
   TABLET ≥ 769px
===================================================== */
@media (min-width: 769px) {
  .wb-news-main .wb-news-title {
    padding: 120px 20px 68px;
  }

  .wb-news-title .wb-news-title-en {
    margin-bottom: 8px;
    font-size: 48px;
  }

  .wb-news-title .wb-news-title-jp {
    margin-bottom: 40px;
  }

  .wb-news-title .wb-news-filter {
    gap: 32px;
  }

  .wb-news-filter .wb-news-filter-btn {
    flex: 1 1 0;
    padding: 18px 24px;
    font-size: 16px;
  }

  .wb-news-main .wb-news-section {
    padding: 60px 0 80px;
  }

  .webgene-blog,
  .news-list {
    grid-template-columns: repeat(2, 1fr);
    width: calc(100% - 80px);
    column-gap: 32px;
    row-gap: 68px;
  }

  .news-list-date {
    font-size: 24px;
  }

  .news-list-category {
    margin-bottom: 8px;
    font-size: 20px;
  }

  .news-list-title {
    margin-bottom: 20px;
    font-size: 24px;
  }

  .webgene-pagination {
    margin-top: 48px !important;
  }

  .webgene-pagination li a,
  .webgene-pagination li span {
    width: 30px;
    height: 30px;
    font-size: 13px;
  }

  .webgene-pagination li.number a,
  .webgene-pagination li.number span {
    width: 45px;
    height: 45px;
    font-size: 18px;
  }

  .webgene-pagination li.next a,
  .webgene-pagination li.prev a {
    height: 45px;
    padding: 0 12px;
  }
}

/* =====================================================
   MOBILE ≤ 768px
===================================================== */
@media (max-width: 768px) {
  .wb-news-title .wb-news-filter {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    width: calc(100% - 48px);
  }

  .wb-news-filter .wb-news-filter-btn {
    width: 100%;
    max-width: none;
    flex: 0 0 auto;
  }

  .wb-news-title .wb-news-title-deco {
    width: 360px;
    height: 220px;
    top: 20%;
  }
}