@charset "UTF-8";

.news {
  padding: 10px 30px;
}

.news_title p {
  color: #0f65e8;
  font-size: 14px;
}

.news_title h2 {
  font-size: 18px;
}

.category {
  display:flex;
  gap:40px;
  border-bottom:1px solid #ddd;
}

.category button {
  padding: 18px 0;
  background: none;
  border: none;
  cursor: pointer;
  color: #999;
  font-size: 16px;
  letter-spacing: 0.2rem;
  position: relative;
}

.category button.active {
  color: #0f65e8;
}

.category button.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 3px;
  background: #0f65e8;
}

#news-list {
  display: flex;
  flex-direction: column;
}

.news-card {
  display: flex;
  gap: 30px;
  padding: 30px 0;
  border-bottom: 1px solid #eee;
  text-decoration: none;
  color: #222;
  transition: .3s;
}

.news-card:hover {
  transform: translateY(-5px);
}

.news-card img {
  width: 220px;
  aspect-ratio: 16/10;
  border-radius: 10px;
  object-fit: cover;
  transition: .3s;
}

.news-card:hover img {
  transform: scale(1.05);
}

.content {
  flex: 1;
}

.date {
  color: #888;
  margin-bottom: 10px;
}

.content h3 {
  line-height: 1.6;
  font-size: 16px;
  margin-bottom: 20px;
}

.more {
  color: #0f65e8;
  font-weight: bold;
}

#pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 60px;
}

#pagination button {
  width: 45px;
  height: 45px;
  border-radius: 10px;
  border: 1px solid #ddd;
  background: #fff;
  cursor: pointer;
}

#pagination button.active {
  background: #0f65e8;
  color: #fff;
  border-color: #0f65e8;
}

@media screen and (max-width:767px) {

  .category {
    overflow: auto;
    gap: 25px;
  }

  .category::-webkit-scrollbar {
    display: none;
  }

  .news-card {
    flex-direction: column;
    gap: 15px;
  }

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

}

@media screen and (min-width: 768px) {

  .news_title p {
    font-size: 16px;
    text-align: center;
  }

  .news_title h2 {
    font-size: 24px;
    text-align: center;
  }

  .category button {
    font-size: 18px;
  }

  .news-card img {
    width: 300px;
  }

  .date {
    font-size: 16px;
  }

  .content h3 {
    font-size: 22px;
  }

  .more {
    font-size: 16px;
  }
}

@media screen and (min-width: 1024px) {
  .news {
    margin-top: 30px;
    padding: 20px 50px;
  }

  .news_title p {
    font-size: 18px;
  }

  .news_title h2 {
    font-size: 28px;
  }
}