/* =========================================================
   Index News Component - Top 3 News Posts
   This stylesheet controls the news list displayed on the index page.
========================================================= */


/* =========================================================
   News List - Wrapper
   Controls the overall width and centering of the news block.
========================================================= */

.news-list {
  width: calc(100% - 44px);
  max-width: 836px;
  margin: 0 auto;
  padding: 0;
  background: transparent;
  box-sizing: border-box;
}


/* =========================================================
   News List - Item
   Controls each news item and its separator lines.
========================================================= */

.news-list-item {
  margin: 0;
  padding: 0;
  border-bottom: 1px solid #6f6a64;
  background: transparent;
}

.news-list-item:first-child {
  border-top: 1px solid #6f6a64;
}


/* =========================================================
   News List - Link Reset
   Removes default link styles and keeps the whole item clickable.
========================================================= */

.news-list-link,
.news-list-link:visited,
.news-list-link:hover,
.news-list-link:active,
.news-list-link * {
  text-decoration: none;
}

.news-list-link {
  display: block;
  color: #222;
  box-sizing: border-box;
  transition: opacity 0.25s ease;
}

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


/* =========================================================
   News List - Date
   Controls the published date text.
========================================================= */

.news-list-date {
  margin: 0;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  color: #111;
  letter-spacing: 0.02em;
}


/* =========================================================
   News List - Category
   Controls the category label text.
========================================================= */

.news-list-category {
  margin: 0;
  font-family: "Noto Serif JP", serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color: #111;
  letter-spacing: 0.04em;
  text-align: center;
}


/* =========================================================
   News List - Content
   Contains the news title and the View More button.
========================================================= */

.news-list-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.news-list-title {
  margin: 0 0 15px;
  font-family: "Noto Serif JP", serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  color: #111;
  letter-spacing: 0.04em;
}


/* =========================================================
   News List - View More Button
   Controls the custom View More button style.
========================================================= */

.news-list-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  width: 127px;
  height: 34px;

  padding: 6px 18px;
  box-sizing: border-box;

  background-color: #e1ceb1;
  color: var(--wb-color-text);

  font-family: "Poppins", sans-serif !important;
  font-size: 13px;
  font-weight: 500;
  line-height: 40px;
  white-space: nowrap;
}

/* Hide the old Font Awesome icon if it exists inside the button. */
.news-list-more i,
.news-list-more .fa {
  display: none;
}

/* Custom arrow icon for the View More button. */
.news-list-more::after {
  content: "";
  display: inline-block;
  width: 20px;
  height: 22px;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='15' height='16' viewBox='0 0 15 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13.6452 7.15711L5.62695 15.1572L6.47193 16.0003L14.4901 8.00018L13.6452 7.15711Z' fill='%236A5F55'/%3E%3Cpath d='M6.47291 0.000189751L5.62793 0.843262L13.6461 8.84338L14.4911 8.0003L6.47291 0.000189751Z' fill='%236A5F55'/%3E%3Cpath d='M13.5624 7.40381H0V8.59701H13.5624V7.40381Z' fill='%236A5F55'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
}


/* =========================================================
   News List - PC Layout
   Desktop layout keeps date, category, and content in 3 columns.
========================================================= */

@media (min-width: 769px) {
  .news-list-link {
    display: grid;
    grid-template-columns: 100px 110px minmax(0, 1fr);
    column-gap: 60px;
    align-items: center;
    min-height: 102px;
    padding: 20px 22px;
  }

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

  .news-list-category {
    font-size: 14px;
  }

  .news-list-title {
    font-size: 14px;
  }
}


/* =========================================================
   News List - Mobile Layout
   Mobile layout places the date and category on the same row.
   The title and View More button stay below them.
========================================================= */

@media (max-width: 768px) {
  .news-list {
    width: calc(100% - 32px);
  }

  .news-list-link {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 18px;
    row-gap: 12px;
    align-items: baseline;
    padding: 20px 0;
  }

  /* Date is placed on the first row, first column. */
  .news-list-date {
    grid-column: 1;
    grid-row: 1;
    margin: 0;
    font-size: 14px;
    white-space: nowrap;
  }

  /* Category is placed on the first row, second column, next to the date. */
  .news-list-category {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
    text-align: left;
    font-size: 13px;
  }

  /* Content starts from the second row and spans the full width. */
  .news-list-content {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .news-list-title {
    margin-bottom: 12px;
    font-size: 13px;
  }
}