@import url("../main.css");

.news-main {
  width: 100%;
  padding: 43px 16px 64px;
}

.news-category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  gap: 12px;
}

.news-category-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  height: 200px;
  padding: 20px 36px;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid #2e2e2e;
  border-radius: 16px;
  background-position: center;
  background-size: cover;
  color: #ffffff;
  text-decoration: none;
}

.news-category-card::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(
    56.19% 84.5% at 69.85% 39.25%,
    rgba(10, 10, 10, 0) 30.2%,
    rgba(10, 10, 10, 0.651889) 74.68%,
    #0a0a0a 100%
  );
  content: "";
}

.news-category-card--esport {
  background-image: url("../../assets/news/card1.jpg");
}

.news-category-card--boardgame {
  background-image: url("../../assets/news/card2.jpg");
}

.news-category-card span {
  font-family: "Be Vietnam Pro", sans-serif;
  font-size: 40px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.2;
}

.news-browser {
  display: flex;
  width: 100%;
  max-width: 1200px;
  margin: 80px auto 0;
  flex-direction: column;
  gap: 40px;
}

.news-search-row {
  display: flex;
  justify-content: flex-end;
  width: 100%;
}

.news-search {
  display: flex;
  align-items: center;
  width: 238px;
  height: 40px;
  padding: 0 12px;
  gap: 6px;
  border: 1px solid #404040;
  border-radius: 8px;
  background: #242424;
}

.news-search i {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 16px;
  min-width: 16px;
  height: 16px;
  min-height: 16px;
  color: #a3a3a3;
  font-size: 16px;
  line-height: 16px;
}

.news-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: #ffffff;
  font-family: "Be Vietnam Pro", sans-serif;
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 20px;
}

.news-search input::placeholder {
  color: #a3a3a3;
  opacity: 1;
}

.news-search input::-webkit-search-cancel-button {
  filter: grayscale(1) brightness(2);
}

.news-results-grid,
.news-results-more {
  width: 100%;
}

.news-results-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.news-result-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border-radius: 16px;
  background: #171717;
}

.news-result-image {
  display: block;
  width: 100%;
  height: 216px;
  flex: none;
  border-radius: 16px 16px 0 0;
  object-fit: cover;
}

.news-result-copy {
  display: flex;
  padding: 20px;
  flex-direction: column;
  gap: 20px;
}

.news-result-copy h3 {
  display: -webkit-box;
  flex: none;
  height: 84px;
  margin: 0;
  overflow: hidden;
  color: #ffffff;
  font-family: "Be Vietnam Pro", sans-serif;
  font-size: 18px;
  font-style: normal;
  font-weight: 700;
  line-height: 28px;
  text-overflow: ellipsis;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

.news-result-copy time {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 0;
  gap: 16px;
  color: #a3a3a3;
  font-family: "Be Vietnam Pro", sans-serif;
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: 20px;
}

.news-results-more .news-feed-more {
  margin-top: 0;
  text-decoration: none;
}

.primary-news {
  width: 100%;
  max-width: 1200px;
  margin: 92px auto 0;
}

.primary-news > h2 {
  color: #ffffff;
  font-family: "Be Vietnam Pro", sans-serif;
  font-size: 32px;
  font-style: normal;
  font-weight: 900;
  line-height: 48px;
}

.primary-news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 20px;
  gap: 12px;
}

.primary-news-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #2e2e2e;
  border-radius: 16px;
  background: #242424;
}

.primary-news-card-image {
  display: block;
  width: 100%;
  aspect-ratio: 1.5 / 1;
  flex: none;
  border-radius: 16px;
  object-fit: cover;
}

.primary-news-card-detail {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 20px;
  gap: 16px;
}

.primary-news-card-info {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
}

.primary-news-card h3 {
  display: -webkit-box;
  overflow: hidden;
  color: #ffffff;
  font-size: 18px;
  font-weight: 700;
  line-height: 28px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

.primary-news-card p {
  display: -webkit-box;
  margin-top: 12px;
  overflow: hidden;
  color: #e5e5e5;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

.primary-news-divider {
  width: 100%;
  height: 0;
  border-top: 1px solid #2e2e2e;
}

.primary-news-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  height: 34px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 400;
}

.primary-news-date {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 12px;
}

.primary-news-date i {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 16px;
  height: 16px;
  font-size: 16px;
}

.news-feed {
  width: 100%;
  max-width: 1200px;
  margin: 92px auto 0;
}

.news-feed-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.news-feed-card {
  display: flex;
  min-width: 0;
  height: 124px;
  overflow: hidden;
  border: 1px solid #2e2e2e;
  border-radius: 16px;
  background: #242424;
}

.news-feed-card > img {
  display: block;
  width: 285px;
  height: 100%;
  flex: 0 0 285px;
  border-radius: 16px;
  object-fit: cover;
}

.news-feed-card-detail {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  padding: 20px;
  gap: 16px;
}

.news-feed-card-info {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  overflow: hidden;
}

.news-feed-card h3 {
  display: -webkit-box;
  overflow: hidden;
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  line-height: 28px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.news-feed-more {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 48px;
  margin-top: 12px;
  padding: 0 20px;
  border: 1px solid #2e2e2e;
  border-radius: 8px;
  background: #171717;
  color: #ffffff;
  font-family: "Be Vietnam Pro", sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.news-feed-more:hover {
  background: #242424;
}

@media (max-width: 1279px) {
  .news-results-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
  }

  .news-result-card {
    width: 100%;
  }
}

@media (max-width: 960px) {
  .news-feed-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .news-category-grid {
    grid-template-columns: 1fr;
  }

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

  .news-feed-card > img {
    width: 40%;
    flex-basis: 40%;
  }

  .news-feed-card-detail {
    padding: 16px;
  }

  .news-category-card {
    padding-right: 20px;
    padding-left: 20px;
  }

  .news-category-card span {
    font-size: 32px;
  }
}
