:root {
  --primary: #4e54c8;
  --secondary: #8f94fb;
  --dark: #1c1c2e;
  --light: #f5f6fa;
  --text: #2c3e50;
  --white: #ffffff;
}

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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text);
  background: var(--light);
}

header {
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  padding: 1rem;
  text-align: center;
  color: var(--white);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

nav {
  background: var(--dark);
  display: flex;
  justify-content: center;
  gap: 1rem;
  padding: 0.7rem 0;
}

nav a {
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

nav a:hover {
  color: var(--secondary);
}

main {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
}

/* ✅ Latest Post */
.latest-post {
  margin-bottom: 2rem;
}

.latest-post h2 {
  color: var(--primary);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.latest-post .news-post {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
  display: flex;
  gap: 1rem;
  transition: transform 0.3s ease;
}

.latest-post .news-post:hover {
  transform: translateY(-4px);
}

.latest-post img {
  width: 180px;
  object-fit: cover;
}

.latest-post .content {
  padding: 1rem;
}

/* ✅ News List */
.news-list {
  display: grid;
  gap: 1.5rem;
}

.news-post {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
}

.news-post:hover {
  transform: translateY(-4px);
}

.news-post img {
  width: 100%;
  height: 230px;
  object-fit: cover;
}

.news-post .content {
  padding: 1rem;
  flex: 1;
}

.news-post h3 {
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
  color: var(--primary);
}

/* ✅ Remove underline from all a tags inside news-post */
.news-post a {
  text-decoration: none !important;
  color: var(--text);
}

/* ✅ Remove underline and style for titles */
.news-post h3 a {
  text-decoration: none !important;
  color: var(--primary);
  font-weight: bold;
}

.news-post h3 a:hover {
  color: var(--secondary);
  text-decoration: none !important;
}

/* ✅ Remove underline and style for descriptions */
.news-post .content a {
  text-decoration: none !important;
  color: var(--text);
}

.news-post .content a:hover {
  color: var(--primary);
  text-decoration: none !important;
}

/* ✅ Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 2rem 0;
}

.pagination button {
  background: var(--primary);
  color: var(--white);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 30px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease;
}

.pagination button:hover {
  background: var(--secondary);
}

.pagination button:disabled {
  opacity: 0.5;
  cursor: default;
}

/* ✅ Footer */
footer {
  background: var(--dark);
  color: var(--white);
  padding: 1.5rem;
  text-align: center;
  margin-top: 2rem;
}

.footer-nav,
.social-icons {
  margin-bottom: 1rem;
}

.footer-nav a {
  color: var(--white);
  text-decoration: none;
  margin: 0 0.5rem;
}

.footer-nav a:hover {
  text-decoration: underline;
  color: var(--secondary);
}

.social-icons a {
  margin: 0 0.5rem;
  color: var(--white);
  font-size: 1.2rem;
  transition: color 0.3s ease;
}

.social-icons a:hover {
  color: var(--secondary);
}

/* ✅ Responsive */
@media (min-width: 768px) {
  .news-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .news-list {
    grid-template-columns: 1fr;
  }

  .latest-post .news-post {
    flex-direction: column;
  }

  .latest-post img {
    width: 100%;
    height: 200px;
  }
}
