.news-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.news-layout > main {
  flex: 1;
}

.news-page {
  position: relative;
  overflow: hidden;
  background: var(--bg);
  padding: 75px 0 72px;
}

.news-page__container {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 18px;
  row-gap: 28px;
}

.news-grid.is-loading {
  opacity: 0.65;
}

.news-grid.is-hidden,
.news-empty.is-hidden,
.news-pagination.is-hidden {
  display: none;
}

.news-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: var(--panel);
  text-decoration: none;
  color: inherit;
  transition: all 0.25s ease;
}

.news-card__visual {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--panel);
}

.news-card__visual--image {
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.news-card__visual--image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(var(--bg-rgb), .08), rgba(var(--bg-rgb), .28));
}

.news-card__content {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  padding: 18px 16px 16px;
  background: var(--panel);
}

.news-card__content h2 {
  margin-bottom: 8px;
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.25;
}

.news-card__content p {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
  flex-grow: 1;
}

.news-card__content time {
  color: var(--accent-2);
  font-size: 0.9rem;
  font-weight: 500;
}

.news-card:hover {
  color: inherit;
  transform: translateY(-7px);
}

.news-empty {
  padding: 64px 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  color: var(--muted);
  text-align: center;
}

.news-pagination.pagination {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  margin-top: 28px;
}

.news-pagination .pagination-btn {
  background: transparent;
  border: none;
  border-radius: 50%;
  color: var(--text);
  cursor: pointer;
  width: 30px;
  height: 30px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.news-pagination .pagination-btn:hover {
  background: var(--accent-weak);
}

.news-pagination .pagination-btn img {
  display: block;
  width: 13px;
  height: 13px;
}

.news-pagination .pagination-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: transparent !important;
}

.news-pagination .pagination-btn-number {
  background: transparent;
  border: none;
  color: var(--muted);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 14px;
}

.news-pagination .pagination-btn-number:hover {
  background: var(--accent-hover);
  color: var(--text);
}

.news-pagination .pagination-btn-number.active {
  background: var(--accent);
  color: var(--text);
}

.news-pagination .pagination-dots {
  color: var(--muted);
  padding: 4px 8px;
}

.news-detail-page {
  padding: 38px 0 72px;
  background: var(--bg);
}

.news-detail-page__container {
  width: min(1040px, calc(100% - 48px));
  margin: 0 auto;
}

.news-detail-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
}

.news-detail-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--dim);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
}

.news-detail-back__arrow {
  display: inline-block;
  line-height: 1;
}

.news-detail-back:hover {
  color: var(--accent-2);
}

.news-detail-card__header {
  margin-bottom: 18px;
}

.news-detail-card__header h1 {
  margin-bottom: 8px;
  font-size: 28px;
  line-height: 1.08;
}

.news-detail-card__header time {
  color: var(--accent-2);
  font-size: 0.95rem;
}

.news-detail-hero {
  position: relative;
  aspect-ratio: 16 / 9;
  margin-bottom: 16px;
  border-radius: 20px;
  overflow: hidden;
  background: var(--inset);
}

.news-detail-hero__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-detail-content {
  padding: 22px 18px;
}

.news-detail-content h1,
.news-detail-content h2,
.news-detail-content h3 {
  margin-bottom: 14px;
  line-height: 1.25;
}

.news-detail-content p {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
}

.news-detail-content a {
  color: var(--accent);
}

.news-detail-content ul,
.news-detail-content ol,
.news-detail-content blockquote {
  margin-bottom: 18px;
}

.news-detail-content blockquote {
  margin-left: 0;
  padding-left: 16px;
  border-left: 3px solid var(--accent-line);
  color: var(--muted);
}

.news-detail-content p:last-child {
  margin-bottom: 0;
}

.news-detail-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.news-detail-nav.is-hidden {
  display: none;
}

.news-detail-nav__item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  color: inherit;
  text-decoration: none;
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.news-detail-nav__item--previous {
  align-items: flex-start;
}

.news-detail-nav__item:hover {
  border-color: var(--accent-line);
  transform: translateY(-4px);
  background: var(--surface-hover);
}

.news-detail-nav__item--next {
  grid-column: 2;
  align-items: flex-end;
  text-align: right;
}

.news-detail-nav__eyebrow {
  color: var(--accent-2);
  font-size: 15px;
  letter-spacing: 0.06em;
}

.news-detail-nav__title {
  color: var(--text);
  font-size: 1rem;
  line-height: 1.4;
}

@media (max-width: 991px) {
  .news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .news-page {
    padding: 32px 0 56px;
  }

  .news-page__container {
    width: min(100% - 24px, 560px);
  }

  .news-grid {
    grid-template-columns: 1fr;
  }

  .news-card {
    min-height: 0;
  }

  .news-card__content h2 {
    font-size: 1.05rem;
  }

  .news-detail-page {
    padding: 24px 0 56px;
  }

  .news-detail-page__container {
    width: min(100% - 24px, 760px);
  }

  .news-detail-card {
    padding: 14px;
    border-radius: 20px;
  }

  .news-detail-card__header h1 {
    font-size: 22px;
    margin-bottom: 15px;
  }

  .news-detail-content {
    padding: 18px 0px;
  }

  .news-detail-content p {
    font-size: 0.95rem;
    line-height: 1.6;
  }

  .news-detail-card__header time {
    font-size: 14px;
  }

  .news-detail-nav {
    display: flex;
    justify-content: center;
    gap: 6px;
  }

  .news-detail-nav__item {
    width: 30px;
    height: 30px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
  }

  .news-detail-nav__title {
    display: none;
  }

  .news-detail-nav__eyebrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 0;
    letter-spacing: 0;
  }

  .news-detail-nav__item--previous .news-detail-nav__eyebrow::before {
    content: "";
    display: block;
    width: 13px;
    height: 13px;
    background: center / contain no-repeat url("../img/go.svg");
    transform: rotate(180deg);
  }

  .news-detail-nav__item--next .news-detail-nav__eyebrow::after {
    content: "";
    display: block;
    width: 13px;
    height: 13px;
    background: center / contain no-repeat url("../img/go.svg");
  }

  .news-detail-nav__item--previous,
  .news-detail-nav__item--next {
    grid-column: auto;
    align-items: center;
    text-align: center;
  }

  .news-detail-nav__item:hover {
    transform: none;
    background: var(--accent-weak);
  }

  .news-detail-back {
    font-size: 14px;
  }
}

.news-detail-content ul,
.news-detail-content ol {
  padding-left: 2rem;
}

.news-detail-content ul {
  list-style: disc;
}

.news-detail-content ol {
  list-style: decimal;
}
