/* 🌐 General Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Poppins", sans-serif;
  background-color: #f8f9fb;
  color: #333;
  line-height: 1.6;
}

/* ============================= */
/* 🏠 Header Section */
/* ============================= */
.blog-header {
  text-align: center;
  padding: 60px 8% 40px;
  background: linear-gradient(135deg, #2f3558, #545fa5);
  color: #fff;
}

.blog-header h1 {
  font-size: 2.5rem;
  font-weight: 600;
  margin-bottom: 15px;
}

.blog-header p {
  font-size: 1rem;
  max-width: 700px;
  margin: 0 auto;
  opacity: 0.9;
}

/* ============================= */
/* 🌟 Featured Post */
/* ============================= */
.featured-post {
  position: relative;
  margin: 60px 8%;
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  min-height: 500px; /* ✅ prevents collapse */
}

.featured-post img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  display: block;
  border-radius: 20px 20px 0 0;
  flex-shrink: 0; /* ✅ keeps image from collapsing */
}

.featured-content {
  background: rgba(47, 53, 88, 0.9);
  color: #fff;
  padding: 30px;
  backdrop-filter: blur(6px);
  border-radius: 0 0 20px 20px;
  flex-grow: 1; /* ✅ ensures content fills space */
}

.featured-content h2 {
  font-size: 1.8rem;
  margin-bottom: 10px;
}

.featured-content p {
  font-size: 1rem;
  margin-bottom: 15px;
}

.read-more {
  display: inline-block;
  padding: 10px 20px;
  background: #e3b04b;
  color: #fff;
  text-decoration: none;
  border-radius: 30px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.read-more:hover {
  background: #cf9a3e;
}

/* ============================= */
/* 🧱 Blog Grid */
/* ============================= */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 40px;
  padding: 50px 8%;
}

/* ============================= */
/* 📰 Blog Card */
/* ============================= */
.blog-card {
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  transition: all 0.35s ease;
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.08);
  position: relative;
}

.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.blog-card img {
  width: 100%;
  height: 230px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.blog-card:hover img {
  transform: scale(1.05);
}

.blog-card:active {
  transform: scale(0.98);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* ============================= */
/* ✏️ Blog Card Content */
/* ============================= */
.blog-card-content {
  padding: 24px;
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 200px;
}

.blog-card-content h2 {
  font-size: 1.4rem;
  font-weight: 600;
  color: #2f3558;
  margin-bottom: 14px;
  line-height: 1.4;
  transition: color 0.3s ease;
}

.blog-card-content h2:hover {
  color: #e3b04b;
}

.blog-card-content p {
  font-size: 0.9rem;
  color: #555;
  line-height: 1.5;
  margin-bottom: 20px;
  flex-grow: 1;
  text-align: justify;
}

.blog-card-content a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  background: transparent;
  border: 1.5px solid #e3b04b;
  color: #e3b04b;
  padding: 10px 20px;
  border-radius: 30px;
  transition: all 0.3s ease;
  font-weight: 500;
  text-decoration: none;
  align-self: flex-start;
  margin-top: auto;
}

.blog-card-content a:hover {
  background: #e3b04b;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(227, 176, 75, 0.3);
}

/* ============================= */
/* 🗓️ Optional Date Badge */
/* ============================= */
.card-date {
  position: absolute;
  top: 15px;
  left: 15px;
  background: rgba(47, 53, 88, 0.9);
  color: #fff;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  letter-spacing: 0.5px;
}

/* ============================= */
/* 🦶 Footer */
/* ============================= */
.blog-footer {
  text-align: center;
  padding: 30px 0;
  background: #2f3558;
  color: #fff;
  margin-top: 60px;
  font-size: 0.9rem;
}

/* ============================= */
/* 📱 Responsive Styling */
/* ============================= */
@media (max-width: 768px) {
  .blog-header h1 {
    font-size: 2rem;
  }

  .blog-header p {
    font-size: 0.9rem;
  }

  .featured-post {
    margin: 40px 5%;
    border-radius: 16px;
  }

  .featured-post img {
    height: auto;
    max-height: 280px;
    min-height: 220px;
  }

  .featured-content {
    background: rgba(47, 53, 88, 0.95);
    padding: 20px;
  }

  .featured-content h2 {
    font-size: 1.3rem;
  }

  .featured-content p {
    font-size: 0.9rem;
  }

  .blog-grid {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 40px 5%;
  }
}

/* Small Mobile View (Extra Optimization) */
@media (max-width: 480px) {
 .featured-post {
    margin: 30px 5%;
  }

  .featured-post img {
    max-height: 240px;
  }

  .featured-content {
    padding: 18px;
  }

  .featured-content h2 {
    font-size: 1.1rem;
  }

  .featured-content p {
    font-size: 0.85rem;
  }

  .blog-card-content {
    padding: 18px;
  }

  .blog-card-content h2 {
    font-size: 1.2rem;
  }

  .blog-card-content p {
    font-size: 0.85rem;
  }
}

/* ============================= */
/* 🧾 Single Blog Post Styling */
/* ============================= */
.post-container {
  max-width: 900px;
  margin: 60px auto;
  padding: 0 20px;
}

.blog-article {
  background: #fff;
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  color: #444;
}

.post-image {
  width: 100%;
  border-radius: 15px;
  margin-bottom: 25px;
  height: 400px;
  object-fit: cover;
}

.post-meta {
  font-size: 0.9rem;
  color: #777;
  margin-bottom: 30px;
}

.blog-article h2 {
  color: #2f3558;
  margin: 25px 0 10px;
  font-size: 1.5rem;
}

.blog-article p {
  margin-bottom: 15px;
  font-size: 1rem;
}

.blog-article ul {
  margin: 10px 0 20px 25px;
}

.blog-article li {
  margin-bottom: 8px;
}

blockquote {
  border-left: 5px solid #e3b04b;
  padding-left: 15px;
  font-style: italic;
  color: #2f3558;
  margin: 25px 0;
}

.inline-link {
  color: #e3b04b;
  text-decoration: none;
  font-weight: 500;
}

.inline-link:hover {
  text-decoration: underline;
}

/* Single Post Mobile Adjustments */
@media (max-width: 768px) {
  .blog-article {
    padding: 25px;
  }

  .post-image {
    height: 250px;
  }
}
