:root {
  --primary: #1a73e8;
  --primary-dark: #1557b0;
  --secondary: #34a853;
  --text: #333;
  --bg: #f8f9fa;
  --card: #ffffff;
  --border: #e0e0e0;
  --gray: #666;
  --light-gray: #f1f3f5;
  --success: #28a745;
  --warning: #ffc107;
  --danger: #dc3545;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.tagline {
  font-size: 1.2rem;
  opacity: 0.9;
  font-weight: 300;
}

.hero {
  background: linear-gradient(rgba(26, 115, 232, 0.9), rgba(21, 87, 176, 0.9)),
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><rect fill="%23f0f4f8" width="1200" height="600"/><path fill="%23e3e9f0" d="M0,300 Q300,100 600,300 T1200,300 L1200,600 L0,600 Z"/></svg>');
  background-size: cover;
  color: white;
  text-align: center;
  padding: 5rem 0;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.3rem;
  max-width: 700px;
  margin: 0 auto;
  opacity: 0.95;
}

.news-section {
  padding: 4rem 0;
}

.section-title {
  font-size: 2.2rem;
  margin-bottom: 2rem;
  color: var(--primary);
  text-align: center;
  position: relative;
  display: inline-block;
  left: 50%;
  transform: translateX(-50%);
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--secondary);
  border-radius: 2px;
}

.filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 3rem;
  padding: 1rem 0;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.filter-btn {
  padding: 0.6rem 1.4rem;
  border: 2px solid var(--border);
  background: white;
  color: var(--text);
  border-radius: 30px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.95rem;
}

.filter-btn.active,
.filter-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.news-card {
  background: var(--card);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.news-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.news-image {
  height: 200px;
  background: var(--light-gray);
  background-size: cover;
  background-position: center;
  position: relative;
}

.news-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--secondary);
  color: white;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.news-content {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.news-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--gray);
}

.news-date {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.news-author {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.news-title {
  font-size: 1.3rem;
  margin-bottom: 0.8rem;
  color: var(--primary);
  font-weight: 600;
  line-height: 1.4;
}

.news-excerpt {
  color: var(--gray);
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.read-more {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: gap 0.3s ease;
}

.read-more:hover {
  gap: 0.8rem;
}

.featured-news {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  margin-bottom: 3rem;
}

.featured-image {
  height: 100%;
  min-height: 350px;
  background: var(--light-gray);
  background-size: cover;
  background-position: center;
}

.featured-content {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-badge {
  background: var(--warning);
  color: #000;
  align-self: flex-start;
  margin-bottom: 1rem;
}

.featured-title {
  font-size: 2rem;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin: 3rem 0;
}

.page-btn {
  width: 40px;
  height: 40px;
  border: 2px solid var(--border);
  background: white;
  color: var(--text);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.page-btn.active,
.page-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

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

.newsletter {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  padding: 3rem 0;
  text-align: center;
  border-radius: 16px;
  margin: 3rem 0;
}

.newsletter h3 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.newsletter p {
  max-width: 600px;
  margin: 0 auto 2rem;
  opacity: 0.9;
}

.newsletter-form {
  display: flex;
  max-width: 500px;
  margin: 0 auto;
  gap: 0;
}

.newsletter-input {
  flex: 1;
  padding: 1rem 1.5rem;
  border: none;
  border-radius: 30px 0 0 30px;
  font-size: 1rem;
  outline: none;
}

.newsletter-btn {
  padding: 1rem 2rem;
  background: var(--secondary);
  color: white;
  border: none;
  border-radius: 0 30px 30px 0;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
}

.newsletter-btn:hover {
  background: #2d8f45;
}

footer {
  background: #1a1a1a;
  color: white;
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2rem;
}

.footer-logo {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: white;
}

.footer-links h4 {
  color: var(--secondary);
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.footer-links ul {
  list-style: none;
}

.footer-links ul li {
  margin-bottom: 0.7rem;
}

.footer-links ul li a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links ul li a:hover {
  color: var(--primary);
}

.copyright {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid #333;
  color: #999;
  font-size: 0.9rem;
}

@media (max-width: 992px) {
  .featured-news {
    grid-template-columns: 1fr;
  }
  .featured-image {
    min-height: 250px;
  }
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.3rem;
  }

  .newsletter-form {
    flex-direction: column;
  }
  .newsletter-input,
  .newsletter-btn {
    border-radius: 30px;
  }
  .newsletter-btn {
    margin-top: 1rem;
  }
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .news-grid {
    grid-template-columns: 1fr;
  }
  .filters {
    justify-content: flex-start;
    overflow-x: auto;
    padding: 1rem;
  }
}
#loading-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem 0;
}

#loading-spinner::after {
  content: "";
  width: 40px;
  height: 40px;
  border: 5px solid #ccc;
  border-top-color: #4f46e5; /* Indigo 600 */
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.fade-in {
  animation: fadeIn 0.6s ease-in-out;
}

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