* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

/* Keep your existing mobile styles */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 36px;
  }

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

  .section-title h2 {
    font-size: 30px;
  }

  .header-content {
    flex-direction: row; /* Keep horizontal on mobile */
    text-align: right;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .newsletter-input,
  .newsletter-btn {
    width: 100%;
    border-radius: 4px;
    margin-bottom: 10px;
  }
}

/* Hero Section */
.hero {
  background:
    linear-gradient(rgba(22, 106, 234, 0.6), rgba(13, 79, 156, 0.6)),
    url("../images/out-of-school-children-1.png") center/cover no-repeat;
  background-color: var(--primary-color);

  background-size: cover;
  background-position: center;
  color: white;
  padding: 80px 0;
  text-align: center;
  margin-bottom: 60px;
}

.hero h1 {
  font-size: 48px;
  margin-bottom: 20px;
}

.hero p {
  font-size: 20px;
  max-width: 800px;
  margin: 0 auto 30px;
  opacity: 0.9;
}

/* Stories Grid */
.stories-container {
  padding: 60px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 50px;
  position: relative;
}

.section-title h2 {
  font-size: 36px;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.section-title p {
  color: #666;
  max-width: 700px;
  margin: 0 auto;
  font-size: 18px;
}

.stories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
  margin-bottom: 60px;
}

/* Story Card */
.story-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.story-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.story-image {
  height: 220px;
  overflow: hidden;
}

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

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

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

.story-category {
  display: inline-block;
  background: #e9f2ff;
  color: var(--primary-color);
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 15px;
  align-self: flex-start;
}

.story-title {
  font-size: 22px;
  margin-bottom: 15px;
  color: #222;
}

.story-excerpt {
  color: #666;
  margin-bottom: 20px;
  flex-grow: 1;
}

.story-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #eee;
  padding-top: 20px;
  margin-top: auto;
}

.story-date {
  color: #888;
  font-size: 14px;
}

.story-date i {
  margin-right: 5px;
}

.read-story {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: color 0.3s;
}

.read-story:hover {
  color: #0d4f9c;
}

.read-story i {
  margin-left: 5px;
  transition: transform 0.3s;
}

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

/* Featured Story */
.featured-story {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 50px;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.featured-image {
  height: 400px;
}

.featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-content {
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-content .story-category {
  background: var(--primary-color);
  color: white;
}

.featured-content .story-title {
  font-size: 32px;
}

/* Filter Section */
.stories-filter {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
}

.filter-btn {
  background: white;
  border: 2px solid #e0e0e0;
  padding: 10px 25px;
  border-radius: 30px;
  font-family: "Montserrat", sans-serif;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
}

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

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  list-style: none;
  margin-top: 50px;
}

.page-item {
  margin: 0 5px;
}

.page-link {
  display: block;
  width: 40px;
  height: 40px;
  line-height: 40px;
  text-align: center;
  background: white;
  border-radius: 50%;
  color: #333;
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
  transition: all 0.3s;
}

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

/* Newsletter Section */
.newsletter {
  background: linear-gradient(135deg, var(--primary-color) 0%, #0d4f9c 100%);
  color: white;
  padding: 60px 0;
  text-align: center;
  margin-top: 80px;
}

.newsletter h3 {
  font-size: 32px;
  margin-bottom: 20px;
}

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

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

.newsletter-input {
  flex-grow: 1;
  padding: 15px 20px;
  border: none;
  border-radius: 4px 0 0 4px;
  font-family: "Open Sans", sans-serif;
  font-size: 16px;
}

.newsletter-btn {
  background: #ffd166;
  color: #333;
  border: none;
  padding: 0 30px;
  border-radius: 0 4px 4px 0;
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}

.newsletter-btn:hover {
  background: #ffc745;
}

/* Footer */
footer {
  background: #222;
  color: #bbb;
  padding: 60px 0 30px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-column h4 {
  color: white;
  margin-bottom: 20px;
  font-size: 18px;
}

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

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: #bbb;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: white;
}

.social-links {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: white;
  text-decoration: none;
  transition: background 0.3s;
}

.social-links a:hover {
  background: var(--primary-color);
}

.copyright {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid #444;
  font-size: 14px;
}

/* Responsive Design */
@media (max-width: 992px) {
  .featured-story {
    grid-template-columns: 1fr;
  }

  .featured-image {
    height: 300px;
  }

  .stories-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
}

@media (max-width: 576px) {
  .stories-grid {
    grid-template-columns: 1fr;
  }

  .stories-filter {
    flex-direction: column;
    align-items: center;
  }

  .filter-btn {
    width: 200px;
  }
}

/* Animation for cards */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.story-card {
  animation: fadeInUp 0.6s ease forwards;
}

/* Stagger animation for cards */
.story-card:nth-child(1) {
  animation-delay: 0.1s;
}
.story-card:nth-child(2) {
  animation-delay: 0.2s;
}
.story-card:nth-child(3) {
  animation-delay: 0.3s;
}
.story-card:nth-child(4) {
  animation-delay: 0.4s;
}
.story-card:nth-child(5) {
  animation-delay: 0.5s;
}
.story-card:nth-child(6) {
  animation-delay: 0.6s;
}
