/* ===========================
   News Page - Mobile First CSS
=========================== */
#content{
  margin-bottom: 30px;
}
/* News page header */
body.blog .header {
  margin-top: 80px;
}
@media (min-width: 1200px) {
  body.blog .header {
    margin-top: 180px;
  }
}
/* News Page Container */
.news-page {
  padding: 20px;
  max-width: 100%;
  overflow-x: hidden;
}

.news-page > .container {
  width: 100%;
  max-width: 100%;
  padding: 0;
  box-sizing: border-box;
}

/* News Header */
.news-page .header {
  margin-bottom: 10px;
}

.news-page .header .ejh2 {
  text-align: center;
}

.news-page .header .ejh2 :is(h1:where(:not([data-ms-h])), :where([data-ms-h="1"])) {
  font-size: 28px;
  font-family: "Shippori Mincho", serif;
  font-weight: 500;
  margin-bottom: 5px;
  text-align: center;
}

.news-page .header .ejh2 .en {
  font-size: 16px;
  font-family: "Shippori Mincho", serif;
  color: var(--wood600);
}

/* ===========================
   News Tabs - Mobile First
=========================== */
.news-tabs-wrapper {
  width: calc(100% + 40px);
  margin: 0 -20px;
  padding: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  border-bottom: 1px solid var(--gray200);
}
.news-tabs-wrapper .container {
  width: 100%;
  max-width: 100%;
  padding: 0;
  box-sizing: border-box;
}

.news-tabs-wrapper::-webkit-scrollbar {
  display: none;
}

.news-tabs {
  display: flex;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0 20px;
  white-space: nowrap;
}

.news-tabs li {
  flex-shrink: 0;
  padding: 0 16px;
}

.news-tabs li a {
  display: block;
  padding: 12px 0;
  font-size: 14px;
  color: var(--gray700);
  text-decoration: none;
  border-bottom: 3px solid transparent;
  transition: all 0.2s ease;
}

.news-tabs li a:hover {
  color: var(--MS_blue);
}

.news-tabs li a.active {
  color: var(--MS_blue);
  font-weight: bold;
  border-bottom-color: var(--MS_blue);
}

/* ===========================
   News Section
=========================== */
.news-page .news-section.news-top {
  padding: 20px 0;
}

.news-page .news-section.news-top .container {
  width: 100%;
  max-width: 100%;
  padding: 0;
  flex-direction: column;
  align-items: center;
}

.news-page .news-section.news-top .news-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.news-page .news-section.news-top .news-list li {
  border-bottom: 1px solid var(--gray100);
}

/* Mobile: CSS Grid for precise control */
.news-page .news-section.news-top .news-list li a {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 12px;
  padding: 20px 0;
  text-decoration: none;
  color: inherit;
  align-items: start;
  position: relative;
  padding-bottom: 40px;
}

/* News Image */
.news-page .news-section.news-top .news-list .news-image {
  grid-column: 1;
  grid-row: 1;
  border: 1px solid var(--gray100);
  box-sizing: border-box;
  align-self: start;
  min-width: auto;
  height: auto;
  object-fit: cover;
}

.news-page .news-section.news-top .news-list .news-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* News Content */
.news-page .news-content {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  width: 100%;
  justify-self: stretch;
}

.news-page .news-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}

.news-page .news-date {
  font-size: 14px;
  font-weight: bold;
  color: #888888;
  flex: auto;
}

.news-page .news-label {
  display: inline-block;
  padding: 2px 8px;
  font-size: 10px;
  color: var(--white);
  background: #888888;
  border-radius: 3px;
  white-space: nowrap;
  width: auto;
}

/* Label variations */
.news-page .news-label.campaign {
  background: #888888;
  width: auto;
}

.news-page .news-label.ir {
  background: #888888;
}

.news-page .news-text {
  font-size: 13px;
  line-height: 1.5;
  color: var(--gray800);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

/* News Link (PDF/Arrow) */
.news-page .news-link {/*
  grid-column: 3;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  align-self: center;
  width: auto;*/
  gap: 2px;
  position: absolute;
  right: 0;
  bottom: 0;
  width: auto;
  height: auto;
}
.news-page .news-link.pdf {
    flex-direction: row-reverse;
    gap: 10px;
}

.news-page .news-link.pdf img {
  width: 24px;
  height: auto;
}

.news-page .news-link.pdf span {
  font-size: 8px;
  color: #999999;
  white-space: nowrap;
}

.news-page .news-link.arrow .arrow-icon {
  width: 24px;
  height: 24px;
  border: 1px solid var(--blue300);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.news-page .news-link.arrow .arrow-icon::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--blue400);
  border-bottom: 2px solid var(--blue400);
  transform: rotate(-45deg);
  margin-left: -2px;
}
/* News page pagination override */
.news-page .nav-links,
.news-page .custom-pagination .pagination-list {
  margin-top: 40px;
}

/* ===========================
   Tablet & Desktop Styles
=========================== */
@media (min-width: 834px) {
  .news-page {
    padding: 40px 20px;
  }

  .news-page > .container {
    max-width: 1200px;
    margin: 0 auto;
  }

  .news-page .header .ejh2 :is(h1:where(:not([data-ms-h])), :where([data-ms-h="1"])) {
    font-size: 42px;
  }

  .news-page .header .ejh2 .en {
    font-size: 24px;
  }


  /* News List Desktop - wider columns */
  .news-page .news-section.news-top .news-list li a {
    grid-template-columns: 200px 1fr 80px;
    gap: 25px;
    padding: 30px 0;
    align-items: center;
    justify-items: stretch;
  }
  
  .news-page .news-section.news-top .news-list .news-image{
    min-width: 200px;
    height: 120px;
    grid-column: 1;
  }
  
  .news-page .news-section.news-top .news-list .news-content {
    grid-column: 2;
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
  .news-page .news-section .news-list li .news-header {
    flex-direction: row;
    align-items: center;
    gap: 15px;
    justify-content: flex-start;
  }

  .news-page .news-date {
    font-size: 15px;
    flex: none;
  }

  .news-page .news-label {
    font-size: 12px;
    padding: 3px 10px;
  }

  .news-page .news-section.news-top .news-list .news-text {
    font-size: 15px;
    -webkit-line-clamp: 2;
  }
  .news-page .news-link{
    width: 100%;
    height: 100%;
    grid-column: 3;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    align-self: center;
  }

  .news-page .news-link.pdf img {
    width: 36px;
  }

  .news-page .news-link.pdf span {
    font-size: 11px;
  }

  .news-page .news-link.arrow .arrow-icon {
    width: 44px;
    height: 44px;
  }
  .news-page .news-link.pdf{
    flex-direction: column;
  }
  .news-page .news-link.arrow .arrow-icon::after {
    width: 10px;
    height: 10px;
  }
}

@media (min-width: 1024px) {
  /* Tabs Desktop */
  .news-tabs-wrapper {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: visible;
    justify-content: center;
    display: flex;
    border-bottom: none;
  }
  .news-tabs-wrapper .container {
    max-width: 1024px;
    border-bottom: 1px solid var(--gray200);
  }
  .news-tabs {
    justify-content: center;
    padding: 0;
  }
  .news-tabs li {
    padding: 0 20px;
    font-size: 15px;
  }
  .news-tabs li a {
    padding: 15px 0;
    font-size: 15px;
  }
  /* News page header */
  .news-page > .container {
    max-width: 1100px;
  }
  .news-tabs li {
    padding: 0 13px;
  }
  .news-tabs li a {
    padding: 15px 0;
  }
}

/* ===========================
   News Detail Page - Mobile First
=========================== */
.news-detail-page {
  padding: 20px;
}

.news-detail {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Header with lines */
.news-detail-header {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 14px;
  font-weight: 400;
  color: #333;
  margin-bottom: 30px;
  letter-spacing: 0.3em;
}

.news-detail-header::before,
.news-detail-header::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #ccc;
}

.news-detail-header::before {
  margin-right: 20px;
}

.news-detail-header::after {
  margin-left: 20px;
}

/* Title */
.news-detail-title {
  font-size: 22px;
  font-weight: bold;
  line-height: 1.5;
  margin-bottom: 10px;
  color: #333;
  font-family: "Shippori Mincho", serif;
}

/* Date */
.news-detail-date {
  font-size: 14px;
  color: #666;
  margin-bottom: 10px;
}

/* Category Label */
.news-detail-label {
  display: inline-block;
  padding: 4px 12px;
  font-size: 12px;
  color: #fff;
  background: #888888;
  border-radius: 3px;
  margin-bottom: 25px;
}

/* Featured Image */
.news-detail-image {
  width: 100%;
  background: #e5e5e5;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 30px;
  position: relative;
  min-height: 200px;
}

.news-detail-image img {
  width: 100%;
  height: auto;
  display: block;
}

.news-detail-image .placeholder-text {
  position: absolute;
  color: #888;
  font-size: 14px;
}

/* Hide placeholder text when image exists */
.news-detail-image img:not([src=""]):not([src*="placeholder"]) + .placeholder-text {
  display: none;
}

/* Content */
.news-detail-content {
  margin-bottom: 40px;
}

.news-detail-content p {
  font-size: 15px;
  line-height: 1.8;
  color: #333;
  margin-bottom: 1.5em;
}
.news-detail-content a{
  color: var(--MS_blue);
  text-decoration: underline;
}
.news-detail-content p:last-child {
  margin-bottom: 0;
}

/* Back Button */
.news-detail-back {
  text-align: center;
  margin: 40px 0 60px;
}

.btn-back-news {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 40px;
  background: #3179b5;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border-radius: 30px;
  transition: background 0.2s ease;
}

.btn-back-news:hover {
  background: #285f91;
}

.btn-back-news .arrow-left {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg);
}
.news-more .btn-back-blue.fill span{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
}
.news-more .btn-back-blue.fill span:before {
  content: "";
  display: block;
  width: 7px;
  height: 12px;
  background: url(../images/icon_arrow_left_white.svg) no-repeat left;
}
.news-more .btn-back-blue.fill:hover span:before {
  content: "";
  display: block;
  width: 7px;
  height: 12px;
  background: url(../images/icon_arrow_left_blue.svg) no-repeat left;
}
.news-more .btn-back-blue.fill:after {
  display: none;
}
.news-more .btn-back-blue.fill:hover:after {
  display: none;
}
@media (min-width: 834px) {
  .news-detail-page {
    padding: 40px 20px;
  }

  .news-detail {
    padding: 0 30px;
  }

  .news-detail-header {
    font-size: 16px;
    margin-bottom: 40px;
  }

  .news-detail-header::before {
    margin-right: 30px;
  }

  .news-detail-header::after {
    margin-left: 30px;
  }

  .news-detail-title {
    font-size: 28px;
    margin-bottom: 15px;
  }

  .news-detail-date {
    font-size: 15px;
    margin-bottom: 12px;
  }

  .news-detail-label {
    font-size: 13px;
    padding: 5px 14px;
    margin-bottom: 30px;
  }

  .news-detail-image {
    min-height: 350px;
    margin-bottom: 40px;
  }

  .news-detail-content p {
    font-size: 16px;
    line-height: 2;
  }

  .btn-back-news {
    padding: 18px 50px;
    font-size: 15px;
  }
}

@media (min-width: 1024px) {
  .news-detail {
    max-width: 900px;
  }

  .news-detail-title {
    font-size: 42px;
  }

  .news-detail-image {
    min-height: 400px;
  }
}

/* Archived legacy articles: scoped styles, 2026-09-11. */
.ms-legacy-article { font-size: 16px; line-height: 1.9; overflow-wrap: anywhere; }
.ms-legacy-article img { display: block; max-width: 100%; height: auto; margin: 1.5em auto; }
.ms-legacy-article :is(h2:where(:not([data-ms-h])), :where([data-ms-h="2"])), .ms-legacy-article :is(h3:where(:not([data-ms-h])), :where([data-ms-h="3"])), .ms-legacy-article :is(h4:where(:not([data-ms-h])), :where([data-ms-h="4"])) { margin: 1.5em 0 .75em; line-height: 1.5; }
.ms-legacy-article ul, .ms-legacy-article ol { padding-left: 1.5em; }
.ms-legacy-article li { margin-bottom: .75em; }
.ms-legacy-article table { display: block; max-width: 100%; overflow-x: auto; }
.ms-legacy-article td, .ms-legacy-article th { padding: .5em; }
.ms-legacy-article > p:first-child { padding: 1em; background: #f3f7fa; border-left: 3px solid #3179b5; font-size: 14px; }
