/* ========== NEWS PAGE STYLES ========== */

/* Banner Styling */
.news-banner,
.news-detail-banner {
  background-image: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.6)), url('../images/hero.jpg');
  background-size: cover;
  background-position: center;
}

/* News Filter */
.news-filter {
  margin-bottom: var(--space-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.filter-title {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
  color: var(--color-primary);
}

.filter-items {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-sm);
}

.filter-item {
  padding: 0.8rem 1.5rem;
  border-radius: 50px;
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--color-text);
  background-color: var(--color-light);
  transition: all 0.3s ease;
}

.filter-item:hover,
.filter-item.active {
  background-color: var(--color-primary);
  color: var(--color-white);
}

/* News Grid */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.news-card {
  background-color: var(--color-white);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform 0.5s cubic-bezier(.25,.75,.5,1.25), box-shadow 0.5s ease;
  height: 100%;
}

.news-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

.news-link {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.news-image {
  position: relative;
  height: 220px;
  overflow: hidden;
}

.news-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.news-card:hover .news-image img {
  transform: scale(1.1);
}

.news-date {
  position: absolute;
  bottom: 0;
  left: 0;
  background-color: var(--color-primary);
  color: var(--color-white);
  padding: var(--space-sm) var(--space-md);
  border-top-right-radius: var(--border-radius-sm);
  text-align: center;
}

.news-date .day {
  display: block;
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1;
}

.news-date .month-year {
  display: block;
  font-size: 1.2rem;
  font-weight: 500;
  margin-top: 0.2rem;
}

.news-content {
  padding: var(--space-md);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.news-category {
  display: inline-block;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.1rem;
  margin-bottom: var(--space-sm);
  background-color: rgba(0, 160, 233, 0.1);
  padding: 0.4rem 1rem;
  border-radius: 50px;
}

.news-content h3 {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--color-dark);
  margin-bottom: var(--space-sm);
  line-height: 1.4;
}

.news-content p {
  font-size: 1.4rem;
  color: var(--color-text-light);
  margin-bottom: var(--space-md);
  line-height: 1.6;
}

.read-more {
  display: inline-flex;
  align-items: center;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-top: auto;
}

.read-more i {
  margin-left: var(--space-xs);
  transition: transform 0.3s ease;
}

.news-card:hover .read-more {
  color: var(--color-accent);
}

.news-card:hover .read-more i {
  transform: translateX(5px);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

.page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--color-text);
  background-color: var(--color-light);
  transition: all 0.3s ease;
}

.page-link:hover,
.page-link.active {
  background-color: var(--color-primary);
  color: var(--color-white);
}

.page-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  font-size: 1.4rem;
  color: var(--color-text);
}

/* News Detail Styling */
.news-detail {
  background-color: var(--color-white);
  padding: var(--space-xl) 0;
}

.news-detail-header {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.news-meta {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  margin-bottom: var(--space-sm);
}

.news-meta .news-date {
  position: static;
  background-color: transparent;
  padding: 0;
  color: var(--color-text-light);
  font-size: 1.4rem;
  font-weight: 500;
}

.news-meta .news-category {
  margin-bottom: 0;
}

.news-title {
  font-size: 3.6rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--space-md);
}

.news-author {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
}

.author-image {
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  object-fit: cover;
}

.author-name {
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--color-text);
}

.news-detail-content {
  max-width: 800px;
  margin: 0 auto;
}

.news-featured-image {
  width: 100%;
  height: 400px;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  margin-bottom: var(--space-lg);
}

.news-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-text {
  font-size: 1.6rem;
  line-height: 1.8;
  color: var(--color-text);
  margin-bottom: var(--space-lg);
}

.news-text p {
  margin-bottom: var(--space-md);
}

.news-text h2 {
  font-size: 2.4rem;
  font-weight: 700;
  margin: var(--space-lg) 0 var(--space-sm);
  color: var(--color-dark);
}

.news-text ul {
  list-style-type: disc;
  margin-left: var(--space-lg);
  margin-bottom: var(--space-md);
}

.news-text ul li {
  margin-bottom: var(--space-xs);
}

.news-quote {
  background-color: var(--color-background);
  padding: var(--space-md);
  border-left: 4px solid var(--color-primary);
  margin: var(--space-lg) 0;
  font-style: italic;
}

.news-quote p {
  margin-bottom: var(--space-xs);
}

.news-quote cite {
  display: block;
  font-style: normal;
  font-weight: 600;
  text-align: right;
}

.news-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.news-gallery .gallery-item {
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  height: 200px;
}

.news-gallery .gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.news-gallery .gallery-item:hover img {
  transform: scale(1.1);
}

.social-share {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.share-title {
  font-size: 1.6rem;
  font-weight: 500;
}

.share-buttons {
  display: flex;
  gap: var(--space-sm);
}

.share-button {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  transition: transform 0.3s ease;
}

.share-button:hover {
  transform: translateY(-5px);
}

.share-button.twitter {
  background-color: #1DA1F2;
}

.share-button.facebook {
  background-color: #4267B2;
}

.share-button.line {
  background-color: #06C755;
}

/* Related News */
.related-news {
  margin-bottom: var(--space-lg);
}

.related-title {
  font-size: 2.4rem;
  font-weight: 700;
  margin-bottom: var(--space-md);
  text-align: center;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.news-card.small .news-image {
  height: 180px;
}

.news-card.small .news-content {
  padding: var(--space-sm);
}

.news-card.small .news-content h3 {
  font-size: 1.6rem;
}

.back-to-list {
  text-align: center;
  margin-top: var(--space-lg);
}

.back-to-list .btn i {
  margin-right: var(--space-xs);
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
  .news-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
}

@media (max-width: 992px) {
  .news-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
  
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .news-title {
    font-size: 3rem;
  }
  
  .news-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .news-grid {
    grid-template-columns: 1fr;
  }
  
  .filter-items {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: var(--space-sm);
    justify-content: flex-start;
    width: 100%;
  }
  
  .filter-item {
    white-space: nowrap;
  }
  
  .news-meta {
    flex-direction: column;
    gap: var(--space-xs);
  }
  
  .news-title {
    font-size: 2.4rem;
  }
  
  .news-text {
    font-size: 1.5rem;
  }
  
  .news-featured-image {
    height: 250px;
  }
  
  .related-grid {
    grid-template-columns: 1fr;
  }
  
  .news-gallery {
    grid-template-columns: 1fr;
  }
  
  .social-share {
    flex-direction: column;
    gap: var(--space-sm);
  }
}

@media (max-width: 576px) {
  .news-image {
    height: 200px;
  }
  
  .pagination {
    flex-wrap: wrap;
  }
}