/* ==========================================================================
   ILAMA BOOKS — BLOG PAGE STYLES
   Place at: ilama-books-child/assets/css/blog.css
   Scoped to #il-blog so nothing leaks to other pages.
   ========================================================================== */

#il-blog {
  font-family: "Lato", "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--il-ink);
  line-height: 1.6;
  background: var(--il-bg);
}

/* =====================================================================
   PAGE HERO BANNER
   Same feel as home sections — soft bg, centred, with eyebrow label
   ===================================================================== */

#il-blog .il-blog-hero {
  background: var(--il-bg-soft);
  padding: 60px 0 50px;
  text-align: center;
  border-bottom: 1px solid #eee;
}

#il-blog .il-blog-hero .il-eyebrow {
  color: var(--il-accent);
  font-size: 15px;
  letter-spacing: .5px;
  margin-bottom: 10px;
}

#il-blog .il-blog-hero__title {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font-size: clamp(26px, 3.5vw, 38px);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 12px;
}

/* Decorative side-lines matching home section headings */
#il-blog .il-blog-hero__title::before,
#il-blog .il-blog-hero__title::after {
  content: "";
  width: 56px;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, rgba(255,100,40,.15), var(--il-accent));
}
#il-blog .il-blog-hero__title::after { transform: scaleX(-1); }

#il-blog .il-blog-hero__sub {
  color: var(--il-muted);
  font-size: 16px;
  max-width: 520px;
  margin: 0 auto;
}

/* =====================================================================
   MAIN CONTENT AREA
   ===================================================================== */

#il-blog .il-blog-body {
  padding: 70px 0;
}

/* =====================================================================
   BLOG GRID
   4 → 3 → 2 → 1 column layout, same rhythm as the book grid
   ===================================================================== */

#il-blog .il-post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* =====================================================================
   BLOG CARD
   Mirrors il-card from home.css — same shadow, radius, hover lift
   ===================================================================== */

#il-blog .il-post-card {
  background: #fff;
  border-radius: var(--il-radius);
  box-shadow: var(--il-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .2s, box-shadow .2s;
}

#il-blog .il-post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 26px rgba(0,0,0,.14);
}

/* Thumbnail */
#il-blog .il-post-card__thumb {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--il-bg-soft);
}

#il-blog .il-post-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s;
}

#il-blog .il-post-card:hover .il-post-card__thumb img {
  transform: scale(1.04);
}

/* Placeholder when no featured image */
#il-blog .il-post-card__thumb--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #fff4ee 0%, #ffe8dc 100%);
}

#il-blog .il-post-card__thumb--placeholder svg {
  width: 48px;
  height: 48px;
  opacity: .35;
  color: var(--il-accent);
}

/* Card body */
#il-blog .il-post-card__body {
  padding: 20px 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

/* Category tag — accent pill */
#il-blog .il-post-card__cat {
  display: inline-block;
  background: rgba(255,100,40,.1);
  color: var(--il-accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .4px;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 20px;
  align-self: flex-start;
  text-decoration: none !important;
}

#il-blog .il-post-card__cat:hover {
  background: var(--il-accent);
  color: #fff;
}

/* Post title */
#il-blog .il-post-card__title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
}

#il-blog .il-post-card__title a {
  color: var(--il-ink);
  text-decoration: none !important;
}

#il-blog .il-post-card__title a:hover {
  color: var(--il-accent);
}

/* Excerpt */
#il-blog .il-post-card__excerpt {
  font-size: 14px;
  color: var(--il-muted);
  line-height: 1.6;
  /* Clamp to 3 lines */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Meta row — date & read time */
#il-blog .il-post-card__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--il-muted);
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid #f0f0f0;
}

#il-blog .il-post-card__meta svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  opacity: .6;
}

/* Read More link at bottom of card */
#il-blog .il-post-card__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--il-accent);
  text-decoration: none !important;
  margin-top: 4px;
}

#il-blog .il-post-card__link:hover {
  color: var(--il-accent-dark);
}

#il-blog .il-post-card__link svg {
  width: 14px;
  height: 14px;
  transition: transform .2s;
}

#il-blog .il-post-card:hover .il-post-card__link svg {
  transform: translateX(3px);
}

/* =====================================================================
   NO POSTS STATE
   ===================================================================== */

#il-blog .il-blog-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--il-muted);
}

#il-blog .il-blog-empty svg {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  opacity: .3;
  color: var(--il-accent);
}

#il-blog .il-blog-empty h2 {
  font-size: 22px;
  color: var(--il-ink);
  margin-bottom: 8px;
}

/* =====================================================================
   PAGINATION
   Consistent with button styles from header-footer.css
   ===================================================================== */

#il-blog .il-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 56px;
  flex-wrap: wrap;
}

#il-blog .il-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: var(--il-radius);
  font-size: 15px;
  font-weight: 600;
  color: var(--il-ink);
  text-decoration: none !important;
  border: 1.5px solid #d4d4d8;
  transition: background-color .2s, color .2s, border-color .2s;
}

#il-blog .il-pagination .page-numbers:hover {
  border-color: var(--il-accent);
  color: var(--il-accent);
}

#il-blog .il-pagination .page-numbers.current {
  background: var(--il-accent);
  border-color: var(--il-accent);
  color: #fff;
}

#il-blog .il-pagination .page-numbers.dots {
  border-color: transparent;
  cursor: default;
}

/* =====================================================================
   RESPONSIVE
   ===================================================================== */

@media (max-width: 1024px) {
  #il-blog .il-post-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  #il-blog .il-blog-hero { padding: 44px 0 36px; }
  #il-blog .il-blog-body { padding: 48px 0; }
  #il-blog .il-post-grid { grid-template-columns: 1fr; gap: 20px; }

  #il-blog .il-blog-hero__title::before,
  #il-blog .il-blog-hero__title::after { width: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  #il-blog .il-post-card,
  #il-blog .il-post-card__thumb img,
  #il-blog .il-post-card__link svg { transition: none; }
}
