/* ============================================
   BLOG PAGE CONTAINER
   ============================================ */
main.blog-container {
  max-width: 1100px;
  margin: 3rem auto;
  padding: 2rem;
  background: var(--card);
  border-radius: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.10);
  line-height: 1.75;
  font-size: 1.08rem;
  color: var(--text);
  animation: fadeIn 0.4s ease-out;
}

/* Simple fade animation */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   TITLE & META
   ============================================ */
main.blog-container h1 {
  font-size: 2.4rem;
  font-weight: 900;
  margin-bottom: 0.5rem;
  text-align: center;
  line-height: 1.2;
}

main.blog-container .meta {
  font-size: 0.95rem;
  color: var(--soft);
  text-align: center;
  margin-bottom: 2rem;
}

/* ============================================
   HERO IMAGE
   ============================================ */
main.blog-container img.hero {
  width: 100%;
  height: 440px;
  border-radius: 1rem;
  margin: 1rem auto 2.5rem;
  object-fit: cover;
  object-position: center;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
  display: block;
}

/* ============================================
   HEADINGS & PARAGRAPHS
   ============================================ */
main.blog-container h2 {
  margin-top: 2.4rem;
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--primary);
}

main.blog-container p {
  margin: 1.2rem 0;
  text-align: justify;
  color: var(--text);
}

/* ============================================
   LISTS
   ============================================ */
main.blog-container ul {
  background: var(--muted);
  padding: 1rem 1.5rem;
  border-radius: 0.8rem;
  margin: 1.2rem 0;
}

main.blog-container ul li {
  margin-bottom: 0.6rem;
}

/* ============================================
   READ NEXT SECTION
   ============================================ */
.read-next-section {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.read-next-section h3 {
  text-align: center;
  font-size: 1.7rem;
  font-weight: 900;
  margin-bottom: 1.5rem;
}

/* GRID LAYOUT (desktop: 3 columns) */
.read-next-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.7rem;
  justify-items: center;
}

/* Cards */
.read-next-card {
  width: 100%;
  max-width: 380px;
  background: var(--card);
  border-radius: 1rem;
  overflow: hidden;
  cursor: pointer;
  transform: translateY(0);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  animation: slideUp 0.5s ease forwards;
  opacity: 0;
}

/* Slight stagger delay */
.read-next-card:nth-child(1) { animation-delay: .05s; }
.read-next-card:nth-child(2) { animation-delay: .1s; }
.read-next-card:nth-child(3) { animation-delay: .15s; }

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

/* Hover effect */
.read-next-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.18);
}

/* Thumbnail */
.read-next-card .blog-thumb img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  display: block;
}

/* Content */
.read-next-card .content {
  padding: 1.2rem 1.2rem 1.4rem;
}

.read-next-card .content h4 {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 0.4rem;
}

.read-next-card .content p {
  font-size: 0.9rem;
  color: var(--soft);
}

.read-next-desc {
  font-size: 0.9rem;
  color: var(--soft);
  margin-top: 0.3rem;
  line-height: 1.5;
}

/* ============================================
   ADS
   ============================================ */
.ad-placeholder-left,
.ad-placeholder-right {
  width: 160px;
  height: 600px;
  position: fixed;
  top: 120px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 10px;
  color: var(--soft);
  font-size: 0.9rem;
  text-align: center;
  box-shadow: var(--shadow);
}

.ad-placeholder-left { left: 2rem; }
.ad-placeholder-right { right: 2rem; }

@media (max-width: 1200px) {
  .ad-placeholder-left,
  .ad-placeholder-right { display: none; }
}

/* ============================================
   MOBILE (under 768px)
   ============================================ */
@media (max-width: 768px) {

  /* Blog Container */
  main.blog-container {
    padding: 1.25rem 1.2rem;
    margin: 0.8rem auto;
    width: 95%;
    border-radius: 0.9rem;
    font-size: 0.98rem;
    line-height: 1.68;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
  }

  main.blog-container img.hero {
    width: 100%;
    height: 260px;
    border-radius: 0.9rem;
    object-fit: cover;
    object-position: center;
    overflow: hidden;
  }

  /* Headings */
  main.blog-container h1 {
    font-size: 1.45rem;
    margin-bottom: 1rem;
  }

  main.blog-container h2 {
    margin-top: 2rem;
    font-size: 1.15rem;
    line-height: 1.35;
    text-align: center;
  }

  /* Lists */
  main.blog-container ul {
    padding: 0.9rem 1.2rem;
    font-size: 0.95rem;
    border-radius: 0.7rem;
  }

  .read-next-section {
    padding-top: 0.5rem;
  }

  /* READ NEXT (mobile: 2 columns) */
  .read-next-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
  }

  /* hide 3rd card on mobile */
  .read-next-card:nth-child(3) {
    display: none !important;
  }

  .read-next-card {
    border-radius: 0.9rem;
    overflow: hidden;
    background: var(--card);
  }

  .read-next-card .blog-thumb img {
    height: 110px;
  }

  .read-next-card .content {
    padding: 0.8rem 1rem 1rem;
  }

  .read-next-card .content h4 {
    font-size: 0.92rem;
    text-align: center;
  }

  /* Truncate the title */
  .read-next-section h4 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .read-next-card .content p {
    font-size: 0.86rem;
    text-align: center;
  }

  .read-next-section h3 {
    text-align: center;
    font-size: 1.4rem;
    font-weight: 900;
    margin-bottom: 1rem;
  }

  /* Truncate the paragraph */
  .read-next-section p {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

}

/* ============================================
   EXTRA SMALL DEVICES (under 480px)
   ============================================ */
@media (max-width: 480px) {

  .read-next-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
  }

  .read-next-card .blog-thumb img {
    height: 95px;
  }

  .read-next-card .content {
    padding: 0.7rem 0.8rem 0.9rem;
  }

  main.blog-container img.hero {
    height: 210px;
  }
}
