/* assets/css/news.css */

/* Filter Section */
.news-filter-section {
  padding: 40px 0;
  background-color: #000;
}

.news-filter-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 40px;
}

.news-search-box {
  position: relative;
  width: 100%;
  max-width: 300px;
}

.news-search-input,
input[type="text"] {
  width: 100%;
  padding: 12px 20px;
  padding-right: 40px;
  background-color: #1a1a1a;
  border: 1px solid #333;
  border-radius: 30px;
  color: #fff;
  font-size: 16px;
  transition: all 0.3s ease;
}

.news-search-input:focus {
  outline: none;
  border-color: #f58220;
  background-color: #222;
}

.news-search-icon {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #888;
  pointer-events: none;
}

.news-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-btn {
  background: transparent;
  border: 1px solid #333;
  color: #aaa;
  padding: 8px 20px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
  background-color: #f58220;
  color: #fff;
  border-color: #f58220;
}

/* News Grid */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
}

.news-card-wrap {
  background-color: #0e0e0e;
  border: 1px solid #222;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.news-card-wrap:hover {
  transform: translateY(-5px);
  border-color: #f58220;
}

.news-card-img-container {
  position: relative;
  padding-top: 56.25%; /* 16:9 Aspect Ratio */
  overflow: hidden;
}

.news-card-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.news-card-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.news-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  font-size: 14px;
}

.news-card-category {
  color: #f58220;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.news-card-date {
  color: #888;
}

.news-card-title {
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 15px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-desc {
  color: #ccc;
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 25px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
}

.news-card-footer {
  border-top: 1px solid #222;
  padding-top: 20px;
  display: flex;
  justify-content: flex-end;
}

.read-more-link {
  display: inline-flex;
  align-items: center;
  color: #f58220;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.read-more-link i {
  margin-left: 8px;
  transition: transform 0.3s ease;
}

.read-more-link:hover {
  opacity: 0.8;
}

.read-more-link:hover i {
  transform: translateX(5px);
}

/* Pagination (Simple) */
.news-pagination {
  margin-top: 60px;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.page-btn {
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  background-color: #1a1a1a;
  color: #fff;
  border: 1px solid #333;
  cursor: pointer;
  transition: all 0.3s ease;
}

.page-btn:hover,
.page-btn.active {
  background-color: #f58220;
  border-color: #f58220;
}

@media (max-width: 768px) {
  .news-filter-container {
    flex-direction: column;
    align-items: stretch;
  }

  .news-search-box {
    max-width: 100%;
  }

  .news-filters {
    justify-content: center; /* Center filters on mobile for better aesthetics */
    overflow-x: auto;
    padding-bottom: 10px; /* Space for scrollbar if needed */
    flex-wrap: nowrap; /* Horizontal scroll on very small screens */
  }

  .filter-btn {
    white-space: nowrap;
  }
}
