/* トップページのスタイル */

/* === 重要なお知らせ (Start) ================================ */
.attNews {
  padding-top: 10px;
  padding-bottom: 30px;
  margin-bottom: 190px;
  background: #e9eff3;
}

.attNewsInner {
  display: flex;
  padding: 20px;
  background-color: #ffffff;
}

.attNewsTitle {
  display: flex;
  flex: 0 0 calc(100% / 12 * 2);
  align-items: center;
  justify-content: center;
  /* flex: 0 0 12.5rem; */
  padding: 0 16px;
  margin: 0 40px 0 0;
  font-size: 1rem;
  border-right: 1px solid #cccccc;
}

.attNews ul {
  flex: 1 0 0;
  padding: 0;
  margin: 0;
  list-style: none;
}

.attNews li {
  display: flex;
  gap: 0 16px;
  align-items: flex-start;
}

.attNews li:not(:first-of-type) {
  margin-top: 1rem;
}

.attNews li time {
  padding-top: 0.125rem;
  font-size: 0.875rem;
  color: #414549;
}

.attNews li .attNewsBody {
  flex: 1 0 0;
  font-weight: bold;
}

.attNews li a {
  color: var(--color-text);
  text-decoration: none;
}

.attNews li a:hover {
  color: var(--color-link);
}

.attNewsMore {
  padding-top: 30px;
  text-align: center;
}
/* === 重要なお知らせ (End) ================================== */

/* === ニュース (Start) ================================== */
.topNews {
  margin-bottom: 190px;
}

.topNewsTitle {
  margin-top: 0;
  margin-bottom: 50px;
  text-align: center;
}

/* ---------- ニュースカテゴリータブ ---------- */
.topNewsTab {
  max-width: 66.25rem;
  margin: 0 auto;
}

.topNewsTab ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  padding: 0;
  margin: 0;
  list-style: none;
}

.topNewsTab li {
  flex: 0 1 12.5rem;
}

.topNewsTab button {
  --color-active: var(--color-secondary);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 3.75em;
  color: #ffffff;
  text-align: center;
  text-decoration: none;
  background-color: var(--color-nav-background);
  border: 0;
  transition: background-color 200ms;
  cursor: pointer;
}

.topNewsTab #tabInfo,
.tnCat.catInfo {
  --color-active: #00873c;
}

.topNewsTab #tabTopic,
.tnCat.catTopic {
  --color-active: #004ea2;
}

.topNewsTab #tabEvent,
.tnCat.catEvent {
  --color-active: #c6006f;
}

.topNewsTab #tabAward,
.tnCat.catAward {
  --color-active: #947f28;
}

.topNewsTab button::after,
.tnCat::after {
  position: absolute;
  right: 0;
  bottom: 0;
  display: block;
  width: 0;
  height: 0;
  content: "";
  border-color: transparent transparent var(--color-active) transparent;
  border-style: solid;
  border-width: 0 0 15px 15px;
  transition: border-color 200ms;
}

.topNewsTab button:hover,
.topNewsTab button:focus,
.topNewsTab button[aria-selected="true"] {
  background-color: var(--color-active);
}

.topNewsTab button:hover::after,
.topNewsTab button:focus::after,
.topNewsTab button[aria-selected="true"]::after {
  --color-active: var(--color-nav-background);
}

/* ---------- ニュースリスト ---------- */
.topNewsList {
  max-width: 66.25rem;
  margin: 0 auto;
}

.topNewsList[aria-hidden="true"] {
  display: none;
}

.topNewsList ul {
  padding: 0;
  list-style: none;
}

.topNewsList ul li {
  display: grid;
  grid-template-columns: auto minmax(auto, 10rem) 1fr;
  grid-template-areas: "date category title";
  gap: 8px 30px;
  align-items: center;
  padding: 30px 0;
  border-bottom: 1px dotted #c1c6c9;
}

.newsDate {
  grid-area: date;
  font-size: 0.875rem;
}

.tnCat {
  grid-area: category;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.7em 0;
  font-size: 0.8125rem;
  border: 1px solid #cccccc;
  white-space: nowrap;
}

.tnTitle {
  grid-area: title;
}

.newsMore {
  margin: 50px 0;
}

.newsMore a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 12.5rem;
  height: 3.125rem;
  margin: 0 auto;
  font-size: 0.875rem;
  color: var(--color-text);
  text-align: center;
  text-decoration: none;
  background-color: #ffffff;
  border: 1px solid #cccccc;
  transition: background-color 0.5s;
}

.newsMore a::after {
  position: absolute;
  right: 20px;
  display: block;
  width: 0.8rem;
  height: 0.8rem;
  color: #ffffff;
  content: "";
  background: url(/nmij/commons/img/icon_nav_arrow_r.svg) no-repeat center;
  background-size: contain;
  opacity: 0;
  transition: right 0.5s;
}

.newsMore a:hover {
  color: #ffffff;
  background-color: var(--color-secondary);
}

.newsMore a:hover::after {
  right: 8px;
  opacity: 1;
}
/* === ニュース (End) ==================================== */

/* === ニュースレター (Start) ==================================== */
.topNewsletter {
  /* margin-bottom: 290px; */
  margin-bottom: 190px;
}

.topNewsletterTitle {
  margin-top: 0;
  margin-bottom: 50px;
  text-align: center;
}

.topNewsletterBoxOuter {
  display: flex;
}

.topNewsletterBox {
  flex: 1 0 0;
  padding: 0 30px;
  border-right: 1px solid #cccccc;
  border-left: 1px solid #cccccc;
}

.topNewsletterBox:first-of-type {
  border-right: 0;
}

.topNewsletterBoxInner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  justify-items: center;
  gap: 20px;
  padding: 30px;
  height: 100%;
  background-color: #e9eff3;
}

.topNewsletterImg {
  grid-column: 1 / 2;
  grid-row: 1 / 3;
  align-self: center;
}

.topNewsletterBody {
  grid-column: 2 / 3;
  grid-row: 1 / 2;
  justify-self: flex-start;
}

.newsletterMore {
  grid-column: 2 / 3;
  grid-row: 2 / 3;
  margin-top: auto;
}

.tnbDate {
  display: inline-block;
  padding: 20px;
  margin-bottom: 20px;
  font-size: 0.875rem;
  background: #ffffff;
}

.topNewsletterBody h3 {
  margin: 0;
  font-size: 1.125rem;
}

.topNewsletterBody ul {
  padding-left: 1rem;
  margin: 0;
}
/* === ニュースレター (End) ====================================== */

/* === トップスライダー・トピックススライダー共通 (Start) ======================================== */
.swiper {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--slider-width);
  height: 100%;
  padding: 0;
  margin: 0 auto;
  overflow: visible;
  user-select: none;
}

.swiper-button-prev,
.swiper-button-next {
  position: absolute;
  top: auto;
  bottom: 0;
  width: var(--button-width);
  height: var(--button-width);
  margin: 0;
  opacity: 0.75;
}

.swiper-button-prev:hover,
.swiper-button-next:hover {
  opacity: 1;
}

.swiper-button-prev {
  left: 0;
}

.swiper-button-next {
  right: 0;
}

.swiper-button-prev::after,
.swiper-button-next::after {
  width: var(--button-width);
  height: var(--button-width);
  content: "";
}

.swiper-pagination {
  position: static;
  font-size: 16px;
}

.swiper-pagination-bullet {
  --swiper-pagination-bullet-horizontal-gap: 10px;
  width: 30px;
  height: 4px;
  background: #000000;
  border-radius: 0;

  position: relative;
}

.swiper-pagination-bullet::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 14px;
  translate: -50% -50%;
}

@media screen and (max-width: 768px) {
  .swiperBtnContainer {
    display: none;
  }
}
/* === トップスライダー・トピックススライダー共通 (End) ========================================== */

/* === トップスライダー (Start) ======================================== */
.topSlider {
  --slider-width: 975px;
  --button-width: 80px;
  width: 100%;
  overflow: hidden;
}

.topSlider .swiperBtnContainer {
  position: relative;
  max-width: calc(var(--slider-width) + (var(--button-width) * 2));
  margin: 0 auto;
}

.topSlider .swiper-button-prev::after {
  background: url(/nmij/commons/img/icon_arrow_left.svg) no-repeat center;
}

.topSlider .swiper-button-next::after {
  background: url(/nmij/commons/img/icon_arrow_right.svg) no-repeat center;
}

.topSlider .swiper-pagination {
  background: #e9eff3;
}

.topSlider .swiper-slide img {
  width: 100%;
  height: auto;
}
/* === トップスライダー (End) ========================================== */

/* === トピックススライダー (Start) ========================================== */
.topTopics {
  position: relative;
  width: 100%;
  padding: 70px 0;
  margin-bottom: 190px;
  background: url(/nmij/img/topics_bg.svg) no-repeat right -140px bottom -160px,
    linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 50%);
}

.topTopicsTitle {
  padding: 0 16px;
  margin-top: 0;
  margin-bottom: 50px;
  text-align: center;
}

.topicsBox {
  position: relative;
  width: 360px;
  height: 520px;
  background: #ffffff;
}

.topicsBox h3 {
  padding: 0 16px;
  margin: 0;
  height: 3em;
  /* font-size: 1.375rem; */
  font-size: 22px;
  line-height: 1;
  text-align: center;
}

.topicsBox figure {
  margin: 0;
  text-align: center;
}

.topicsBox a {
  display: block;
  height: 100%;
  padding: 40px 0 20px 0;
  color: var(--color-text);
  text-decoration: none;
}

.topicsBoxInner {
  padding: 20px;
}

.topicsBoxInner p {
  margin-top: 0;
  font-size: 16px;
  line-height: 1.5;
}

.topicsMore {
  position: absolute;
  bottom: 20px;
  width: 100%;
  font-size: 16px;
  text-align: center;
}

.topicsBox a:hover {
  color: var(--color-link);
}

.topicsBox a:hover .btnMore {
  color: var(--color-link);
}

.topicsBox a:hover .btnMore::after {
  opacity: 0;
}

.topicsSlider {
  --slider-width: 360px;
  --button-width: 50px;
  width: 100%;
  overflow: hidden;
}

.topicsSlider .swiperBtnContainer {
  position: relative;
  max-width: calc((var(--slider-width) * 3) + (60px * 2));
  margin: 0 auto;
}

.topicsSlider .swiper-button-prev::after {
  background: url(/nmij/commons/img/icon_arrow_left_s.svg) no-repeat center;
}

.topicsSlider .swiper-button-next::after {
  background: url(/nmij/commons/img/icon_arrow_right_s.svg) no-repeat center;
}

@media screen and (max-width: 768px) {
  .topicsSlider .swiper {
    max-width: 90%;
  }

  .topicsSlider .swiper-wrapper {
    flex-direction: column;
    gap: 30px;
  }

  .topicsSlider .swiper-pagination {
    display: none;
  }

  .topicsBox {
    width: 100%;
    height: auto;
  }
}
/* === トピックススライダー (End) ============================================ */

/* === フッターバナー (Start) ====================================== */
.fbaBoxOuter {
  display: flex;
  flex-wrap: wrap;
  /* gap: 20px; */
}

.fbaBox {
  flex: 0 0 25%;
  padding: 5px;
  text-align: center;
}
/* === フッターバナー (End) ======================================== */

/* ============================================================
 タブレット（viewport width 768px）以下のサイズで適用
============================================================ */
@media screen and (max-width: 48em) {
  /* === 重要なお知らせ (Start) ================================ */
  .attNews {
    margin-bottom: 80px;
  }

  .attNewsInner {
    flex-direction: column;
  }

  .attNewsTitle {
    padding-bottom: 0.5rem;
    margin-right: 0;
    margin-bottom: 1.25rem;
    border-right: 0;
    border-bottom: 1px solid #cccccc;
  }

  .attNews li {
    flex-direction: column;
  }
  /* === 重要なお知らせ (End) ================================== */

  /* === ニュース (Start) ================================== */
  .topNews {
    margin-bottom: 80px;
  }

  .topNewsTitle {
    margin-bottom: 30px;
  }

  .topNewsTitle img {
    width: auto;
    height: 3.5rem;
  }

  .topNewsTab {
    font-size: 0.75rem;
  }

  .topNewsTab li {
    flex: 0 1 7rem;
  }

  .topNewsList ul li {
    grid-template-columns: minmax(auto, 6rem) 1fr;
    grid-template-rows: auto auto;
    grid-template-areas:
      "category date"
      "category title";
  }
  /* === ニュース (End) ==================================== */

  /* === トピックス (Start) ==================================== */
  .topTopics {
    margin-bottom: 80px;
  }

  .topTopicsTitle {
    margin-bottom: 30px;
  }

  .topTopicsTitle img {
    width: auto;
    height: 3.5rem;
  }

  .topicsBox h3 {
    margin-bottom: 40px;
    height: auto;
  }
  /* === トピックス (End) ====================================== */

  /* === ニュースレター (Start) ==================================== */
  .topNewsletter {
    margin-bottom: 80px;
  }

  .topNewsletterTitle {
    margin-bottom: 30px;
  }

  .topNewsletterTitle img {
    width: auto;
    height: 3.5rem;
  }

  .topNewsletterBoxOuter {
    flex-direction: column;
    gap: 20px;
  }

  .topNewsletterBox {
    padding: 0;
    border: 0;
  }
  /* === ニュースレター (End) ====================================== */

  /* === フッターバナー (Start) ====================================== */
  .fbaBox {
    flex: 0 0 50%;
  }
  /* === フッターバナー (End) ======================================== */
}

/* ============================================================
 スマホ（viewport width 425px）以下のサイズで適用
============================================================ */
@media screen and (max-width: 26.5625em) {
  /* === ニュース (Start) ================================== */
  .topNewsTitle img {
    height: 2.5rem;
  }

  .topNewsList ul li {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    grid-template-areas:
      "date"
      "category"
      "title";
  }
  /* === ニュース (End) ==================================== */

  /* === トピックス (Start) ==================================== */
  .topTopicsTitle img {
    height: 2.5rem;
  }
  /* === トピックス (End) ====================================== */

  /* === ニュースレター (Start) ==================================== */
  .topNewsletterTitle img {
    height: 2.5rem;
  }

  .topNewsletterImg {
    display: none;
  }

  .topNewsletterBody {
    grid-column: 1 / 3;
    justify-self: stretch;
  }

  .newsletterMore {
    grid-column: 1 / 3;
  }

  .tnbDate {
    width: 100%;
    text-align: center;
  }
  /* === ニュースレター (End) ====================================== */

  /* === フッターバナー (Start) ====================================== */
  .fbaBox {
    flex: 0 0 100%;
  }
  /* === フッターバナー (End) ======================================== */
}
