/* News List Page Styles */

/* Active nav item */
.nav-menu a.active {
  color: var(--color-primary);
  position: relative;
}

.nav-menu a.active::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--color-primary);
}

.navbar-desktop.scrolled .nav-menu a.active {
  color: var(--color-primary);
}

.mobile-nav a.active {
  color: var(--color-primary) !important;
  border-left-color: var(--color-primary);
  background: rgba(22, 119, 255, 0.05);
}

/* News Hero Section */
.news-hero {
  position: relative;
  height: 45vh;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.news-hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.news-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-hero-bg::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.5) 100%);
}

.news-hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: #fff;
  padding: 0 20px;
}

.news-hero-content h1 {
  font-size: 56px;
  font-weight: 600;
  margin-bottom: 16px;
  letter-spacing: -1px;
}

.news-hero-content p {
  font-size: 20px;
  opacity: 0.95;
  letter-spacing: 2px;
}

/* News Filter Section */
.news-filter-section {
  padding: 40px 0;
  background: #fff;
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 64px;
  z-index: 100;
  transition: box-shadow 0.3s ease;
}

.news-filter-section.scrolled {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.news-filter {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.filter-btn {
  padding: 10px 28px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 24px;
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text-primary);
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.filter-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: rgba(22, 119, 255, 0.05);
}

.filter-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

/* News List Section */
.news-list-section {
  padding: 80px 0;
  background: var(--color-bg);
  min-height: 60vh;
}

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

.news-item {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
}

.news-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  border-color: var(--color-primary);
}

.news-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.news-image {
  position: relative;
  width: 100%;
  height: 240px;
  overflow: hidden;
}

.news-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.news-item:hover .news-image img {
  transform: scale(1.1);
}

.news-tag {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 6px 16px;
  background: rgba(22, 119, 255, 0.9);
  backdrop-filter: blur(10px);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  border-radius: 4px;
  z-index: 1;
}

.news-content {
  padding: 24px;
}

.news-content h3 {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 12px;
  color: var(--color-text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.3s ease;
}

.news-item:hover .news-content h3 {
  color: var(--color-primary);
}

.news-content p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--color-text-light);
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
}

.news-date {
  font-size: 13px;
  color: var(--color-text-light);
}

.news-views {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--color-text-light);
}

.news-views svg {
  width: 16px;
  height: 16px;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 60px;
}

.page-btn {
  min-width: 44px;
  height: 44px;
  padding: 0 16px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text-primary);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-btn:hover:not(:disabled) {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: rgba(22, 119, 255, 0.05);
}

.page-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.page-btn svg {
  width: 20px;
  height: 20px;
}

.page-dots {
  color: var(--color-text-light);
  padding: 0 8px;
}

/* Newsletter Section */
.newsletter-section {
  padding: 80px 0;
  background: linear-gradient(135deg, var(--color-primary) 0%, #0066ff 100%);
}

.newsletter-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
}

.newsletter-text {
  flex: 1;
  color: #fff;
}

.newsletter-text h2 {
  font-size: 36px;
  font-weight: 600;
  margin-bottom: 12px;
}

.newsletter-text p {
  font-size: 16px;
  opacity: 0.95;
}

.newsletter-form {
  flex: 1;
  display: flex;
  gap: 12px;
  max-width: 500px;
}

.newsletter-form input {
  flex: 1;
  padding: 16px 24px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  color: #fff;
  font-size: 15px;
  transition: all 0.3s ease;
}

.newsletter-form input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.newsletter-form input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.2);
}

.newsletter-form button {
  padding: 16px 32px;
  background: #fff;
  border: none;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-primary);
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.newsletter-form button:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* Responsive */
@media (max-width: 1024px) {
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .newsletter-content {
    flex-direction: column;
    gap: 40px;
    text-align: center;
  }

  .newsletter-form {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .news-hero {
    height: 40vh;
    min-height: 350px;
  }

  .news-hero-content h1 {
    font-size: 36px;
  }

  .news-hero-content p {
    font-size: 16px;
  }

  .news-filter-section {
    padding: 24px 0;
    position: relative;
    top: 0;
    display: none;
  }

  .news-filter {
    gap: 12px;
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding: 0 20px;
    margin: 0 -20px;
  }

  .filter-btn {
    padding: 8px 20px;
    font-size: 14px;
  }

  .news-list-section {
    padding: 60px 0;
  }

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

  .news-image {
    height: 200px;
  }

  .news-content {
    padding: 20px;
  }

  .news-content h3 {
    font-size: 16px;
  }

  .news-content p {
    font-size: 13px;
  }

  .pagination {
    gap: 6px;
    margin-top: 40px;
  }

  .page-btn {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    font-size: 14px;
  }

  .newsletter-section {
    padding: 60px 0;
  }

  .newsletter-text h2 {
    font-size: 28px;
  }

  .newsletter-text p {
    font-size: 15px;
  }

  .newsletter-form {
    flex-direction: column;
    width: 100%;
  }

  .newsletter-form button {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .news-hero-content h1 {
    font-size: 28px;
  }

  .news-hero-content p {
    font-size: 14px;
    letter-spacing: 1px;
  }

  .filter-btn {
    font-size: 13px;
    padding: 6px 16px;
  }

  .news-tag {
    font-size: 12px;
    padding: 4px 12px;
  }

  .newsletter-text h2 {
    font-size: 24px;
  }
}

/* News Filter Animation */
.news-item {
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
}

.news-item:nth-child(1) { animation-delay: 0.1s; }
.news-item:nth-child(2) { animation-delay: 0.2s; }
.news-item:nth-child(3) { animation-delay: 0.3s; }
.news-item:nth-child(4) { animation-delay: 0.4s; }
.news-item:nth-child(5) { animation-delay: 0.5s; }
.news-item:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hidden news items when filtering */
.news-item.hidden {
  display: none;
}
