 .modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.5);
}

.modal-content {
  background: white;
  margin: 15% auto;
  padding: 30px;
  border-radius: 8px;
  width: 90%;
  max-width: 400px;
  text-align: center;
  animation: fadeIn 0.5s ease-in-out;
}

.close-btn {
  position: absolute;
  top: 20px; right: 25px;
  font-size: 24px;
  color: #333;
  cursor: pointer;
}

  /* ------------- Base & Reset ------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: 'Segoe UI', sans-serif;
  color: #333;
  background: #f4f4f4;
  overflow-x: hidden;
  line-height: 1.6;
}

/* --------- Hero Banner --------- */
.hero {
  background: linear-gradient(145deg, #0056d2, #00c3ff);
  color: #fff;
  padding: 6rem 1rem;
  text-align: center;
  animation: heroFadeIn 1.2s ease forwards;
}
.hero h1 {
  font-size: 2.8rem;
  margin-bottom: 1rem;
}
.hero p {
  font-size: 1.2rem;
}

/* -------- Featured Post -------- */
.featured {
  padding: 3rem 1rem;
}
.featured-card {
  display: flex;
  flex-wrap: wrap;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  animation: slideInLeft 1.2s ease forwards;
}
.featured-card img {
  width: 100%;
  max-width: 400px;
  object-fit: cover;
}
.featured-info {
  padding: 2rem;
}
.featured-info h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}
.featured-info p {
  margin-bottom: 1.2rem;
}
.read-more {
  color: var(--primary-dark, #003c99);
  font-weight: bold;
  text-decoration: none;
}
.read-more:hover {
  text-decoration: underline;
}

/* -------- Blog Grid -------- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  padding: 2rem 1rem;
}
.blog-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  transition: transform 0.3s;
  animation: fadeInUp 1s ease forwards;
}
.blog-card:hover {
  transform: translateY(-6px);
}
.blog-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.blog-card h3 {
  font-size: 1.4rem;
  margin: 1rem;
}
.blog-card p {
  margin: 0 1rem 1rem;
}
.blog-card a {
  margin: 0 1rem 1.5rem;
  display: inline-block;
  color: var(--accent, #00c3ff);
  font-weight: 500;
}
.blog-card a:hover {
  text-decoration: underline;
}

/* -------- Newsletter Form -------- */
.newsletter {
  background: #fff;
  text-align: center;
  padding: 3rem 1rem;
  margin: 2rem auto;
  max-width: 600px;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  animation: fadeInUp 1.3s ease forwards;
}
.newsletter h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}
.newsletter p {
  margin-bottom: 1.5rem;
}
.newsletter form {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.newsletter input[type="email"] {
  flex: 1 1 240px;
  padding: 0.8rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
}
.newsletter button {
  background: var(--primary-dark, #003c99);
  color: #fff;
  border: none;
  padding: 0.8rem 1.5rem;
  font-size: 1rem;
  border-radius: 6px;
  cursor: pointer;
}
.newsletter button:hover {
  background: var(--primary, #0056d2);
}

/* -------- Footer -------- */
.footer {
  background: #111;
  color: #eee;
  padding: 2rem 1rem;
  text-align: center;
  font-size: 0.9rem;
}
.footer a {
  color: #ccc;
}
.footer a:hover {
  color: #fff;
}

/* --- Bottom reset to remove awkward whitespace --- */
footer + * {
  margin-top: 0;
}
body > *:last-child {
  margin-bottom: 0;
}

/* -------- Responsive Animations -------- */
@keyframes heroFadeIn {
  from { opacity: 0; transform: scale(1.05); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* -------- Media Queries -------- */
@media (max-width: 768px) {
  .hero h1 { font-size: 2.2rem; }
  .featured-card { flex-direction: column; }
}
@media (max-width: 576px) {
  .blog-card img { height: 150px; }
  .newsletter input[type="email"] { flex-basis: 100%; }
}