/* ==========================================================================
   TutorGuide in India — Newsroom & Blog Archives (home.php & archive.php)
   ========================================================================== */

body.blog .site.grid-container,
body.archive .site.grid-container,
body.search .site.grid-container {
  max-width: 1240px !important;
  margin: 0 auto !important;
}

body.blog .site-content,
body.archive .site-content,
body.search .site-content {
  padding: 1.5rem 1.25rem 3.5rem !important;
}

body.blog .content-area,
body.archive .content-area,
body.search .content-area {
  width: 100% !important;
  max-width: none !important;
  float: none !important;
}

/* ── Archive Header Banner ── */
.tg-archive-hero {
  background: var(--tg-navy-primary, #132e54);
  color: #ffffff;
  padding: 3rem 1.5rem 2.5rem;
  border-radius: 12px;
  margin-bottom: 2.5rem;
  text-align: center;
}

.tg-archive-hero h1 {
  font-size: 32px;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 0.5rem;
}

.tg-archive-hero p {
  font-size: 15px;
  color: #cbd5e1;
  max-width: 650px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ── Filter Pills ── */
.tg-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 2.5rem;
}

.tg-filter-btn {
  display: inline-block;
  padding: 6px 16px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  color: #334155 !important;
  text-decoration: none !important;
  transition: all 0.15s ease;
}

.tg-filter-btn:hover,
.tg-filter-btn.active {
  background: var(--tg-navy-primary, #132e54) !important;
  color: #ffffff !important;
  border-color: var(--tg-navy-primary, #132e54);
}

/* ── 2-Column Archive Layout with Sidebar ── */
.tg-archive-layout {
  display: flex;
  align-items: flex-start;
  gap: 2.5rem;
  width: 100%;
}

.tg-archive-main {
  flex: 1 1 0;
  min-width: 0;
}

.tg-archive-layout #right-sidebar {
  flex: 0 0 340px;
  width: 340px;
  max-width: 340px;
  float: none !important;
  display: block !important;
}

.tg-archive-layout .inside-right-sidebar {
  position: sticky;
  top: 92px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* ── Articles Grid beside Sidebar (2 columns on desktop) ── */
.tg-blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem;
  margin-bottom: 3rem;
}

.tg-blog-card {
  background: #ffffff;
  border: 1px solid var(--tg-border-light, #e2e8f0);
  border-radius: 12px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 8px rgba(11, 26, 48, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tg-blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 26px rgba(11, 26, 48, 0.08);
}

.tg-blog-card-tag {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--tg-navy-primary, #132e54);
  background: #f1f5f9;
  padding: 3px 8px;
  border-radius: 4px;
  align-self: flex-start;
  margin-bottom: 0.75rem;
}

.tg-blog-card-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--tg-navy-dark, #0b1a30);
  margin: 0 0 0.75rem;
}

.tg-blog-card-title a {
  color: var(--tg-navy-dark, #0b1a30) !important;
  text-decoration: none !important;
}

.tg-blog-card-title a:hover {
  color: var(--tg-amber-gold, #e59819) !important;
}

.tg-blog-card-excerpt {
  font-size: 13.5px;
  line-height: 1.6;
  color: #64748b;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.tg-card-readmore-wrap {
  margin: 0;
}

.tg-read-more {
  font-size: 13px;
  font-weight: 700;
  color: var(--tg-navy-primary, #132e54) !important;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.tg-read-more:hover {
  color: var(--tg-amber-gold, #e59819) !important;
  text-decoration: underline !important;
}

.tg-blog-card-footer {
  font-size: 12px;
  color: #94a3b8;
  padding-top: 1rem;
  border-top: 1px solid #f1f5f9;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

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

.tg-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155 !important;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none !important;
}

.tg-pagination .page-numbers.current {
  background: var(--tg-navy-primary, #132e54) !important;
  color: #ffffff !important;
  border-color: var(--tg-navy-primary, #132e54);
}

/* Responsive Breakpoints */
@media (max-width: 991px) {
  .tg-archive-layout {
    flex-direction: column;
    gap: 2.5rem;
  }

  .tg-archive-main {
    width: 100%;
  }

  .tg-archive-layout #right-sidebar {
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 1 100% !important;
  }

  .tg-archive-layout .inside-right-sidebar {
    position: static !important;
  }

  .tg-blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .tg-blog-grid {
    grid-template-columns: 1fr;
  }

  .tg-archive-hero h1 {
    font-size: 24px;
  }
}
