/*
 * home.php専用CSSファイル
 */

body {
  background-color: var(--color-gray-bg);
}

.news-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.news-card {
  padding: 1.5rem;
  background-color: var(--color-white);
  border-radius: 10px;
  transition:
    box-shadow,
    0.3s ease;

  @media (width <= 767px) {
    border-radius: 4px;
  }

  &:hover {
    color: var(--color-black);
    box-shadow: var(--shadow);
  }
}

.news-card-link {
  display: block;
}

.news-date {
  margin-bottom: 4px;
  font-size: 12px;
  color: var(--color-gray);
}

.news-title {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  font-size: 1rem;
  line-height: 1.5;
  -webkit-box-orient: vertical;
}

/* NEWS SORTING UI */
.news-sort-ui {
  display: flex;
  gap: 20px;
  justify-content: flex-end;
  margin-bottom: 2rem;
  font-size: 14px;
  font-weight: 700;
}

.news-sort-ui a {
  color: var(--color-accent);
  letter-spacing: 0.05em;
  text-decoration: none;
  cursor: pointer;
  opacity: 0.7;
  transition:
    color 0.3s ease,
    opacity 0.3s ease;
}

.news-sort-ui a:hover,
.news-sort-ui a.active {
  color: var(--color-accent);
  opacity: 1;
}

.news-pagination-wrapper {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  margin-top: 4rem;
  margin-bottom: 2rem;
}

.news-pagination-wrapper .page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: var(--color-black);
  text-decoration: none;
  background-color: var(--color-white);
  border: 1px solid transparent;
  border-radius: 10px;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

.news-pagination-wrapper .page-numbers.dots {
  width: fit-content;
  background-color: inherit;
}

.news-pagination-wrapper a.page-numbers:hover {
  background-color: var(--color-gray-bg);
}

/* active */
.news-pagination-wrapper .page-numbers.current {
  color: var(--color-white);
  pointer-events: none; /* Disable clicking the current page */
  background-color: var(--color-accent);
}

.news-pagination-wrapper .page-numbers.disabled {
  color: var(--color-gray);
  pointer-events: none;
  cursor: default;
  background-color: transparent;
}
