/* =============================================================
   BLOG LISTING STYLES — Dr. Anshumali Misra
   Matches existing site palette: #154082 primary blue
   ============================================================= */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,600;0,700;1,400&family=DM+Sans:wght@300;400;500;600&display=swap');

/* ── CSS Variables ── */
:root {
  --primary:       #154082;
  --primary-dark:  #0d2d5e;
  --primary-light: #e8eef8;
  --accent:        #e84a4a;
  --text-dark:     #1a1a2e;
  --text-mid:      #4a5568;
  --text-light:    #718096;
  --border:        #e2e8f0;
  --bg-page:       #f7f9fc;
  --bg-card:       #ffffff;
  --shadow-sm:     0 2px 8px rgba(21,64,130,.08);
  --shadow-md:     0 8px 30px rgba(21,64,130,.14);
  --shadow-hover:  0 16px 48px rgba(21,64,130,.2);
  --radius:        12px;
  --transition:    0.3s cubic-bezier(.4,0,.2,1);
  --font-head:     'Lora', Georgia, serif;
  --font-body:     'DM Sans', system-ui, sans-serif;
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  background: var(--bg-page);
  color: var(--text-dark);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a   { text-decoration: none; color: inherit; }

/* ── TOPBAR ── */
.blog-topbar {
  background: var(--primary-dark);
  color: #fff;
  font-size: 13px;
  padding: 8px 0;
}
.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.topbar-contact { display: flex; gap: 20px; flex-wrap: wrap; }
.topbar-contact a, .topbar-contact span {
  color: rgba(255,255,255,.85);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color var(--transition);
}
.topbar-contact a:hover { color: #fff; }
.topbar-social { display: flex; gap: 12px; }
.topbar-social a {
  color: rgba(255,255,255,.75);
  font-size: 14px;
  transition: color var(--transition);
}
.topbar-social a:hover { color: #fff; }

/* ── HEADER / NAV ── */
.blog-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.site-logo img {
  height: 52px;
  width: auto;
}
.site-logo span {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
}
.site-logo small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--text-light);
  font-family: var(--font-body);
}
.header-cta {
  display: flex;
  align-items: center;
  gap: 16px;
}
.btn-appt {
  background: var(--primary);
  color: #fff;
  padding: 10px 22px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  transition: background var(--transition), transform var(--transition);
  white-space: nowrap;
}
.btn-appt:hover {
  background: var(--primary-dark);
  color: #fff;
  transform: translateY(-1px);
}
.header-phone {
  color: var(--text-mid);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── PAGE HERO ── */
.blog-hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  position: relative;
  overflow: hidden;
  padding: 72px 24px 80px;
  text-align: center;
}
.blog-hero::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: rgba(255,255,255,.05);
  pointer-events: none;
}
.blog-hero::after {
  content: '';
  position: absolute;
  bottom: -80px; left: -40px;
  width: 260px; height: 260px;
  border-radius: 50%;
  background: rgba(255,255,255,.04);
  pointer-events: none;
}
.blog-hero-inner { position: relative; z-index: 1; max-width: 700px; margin: 0 auto; }
.hero-label {
  display: inline-block;
  background: rgba(255,255,255,.15);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 50px;
  margin-bottom: 16px;
  border: 1px solid rgba(255,255,255,.25);
}
.blog-hero h1 {
  font-family: var(--font-head);
  font-size: clamp(28px, 5vw, 46px);
  color: #fff;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 14px;
}
.blog-hero p {
  color: rgba(255,255,255,.8);
  font-size: 16px;
  max-width: 520px;
  margin: 0 auto;
}

/* ── BREADCRUMB ── */
.breadcrumb-bar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
}
.breadcrumb-inner {
  max-width: 1200px;
  margin: 0 auto;
  font-size: 13px;
  color: var(--text-light);
}
.breadcrumb-inner a { color: var(--primary); }
.breadcrumb-inner a:hover { text-decoration: underline; }
.breadcrumb-inner span { margin: 0 6px; }

/* ── MAIN LAYOUT ── */
.blog-page-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}

/* ── FILTER / CATEGORY TABS ── */
.blog-filter {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 40px;
  align-items: center;
}
.filter-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-mid);
  margin-right: 4px;
}
.filter-btn {
  background: #fff;
  border: 1.5px solid var(--border);
  color: var(--text-mid);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 16px;
  border-radius: 50px;
  cursor: pointer;
  transition: all var(--transition);
}
.filter-btn:hover,
.filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ── BLOG GRID ── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* ── BLOG CARD ── */
.blog-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition);
  border: 1px solid var(--border);
  opacity: 0;
  transform: translateY(24px);
  animation: cardIn 0.5s ease forwards;
}
.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

@keyframes cardIn {
  to { opacity: 1; transform: translateY(0); }
}

/* staggered entry delay */
.blog-card:nth-child(1)  { animation-delay: .05s; }
.blog-card:nth-child(2)  { animation-delay: .10s; }
.blog-card:nth-child(3)  { animation-delay: .15s; }
.blog-card:nth-child(4)  { animation-delay: .20s; }
.blog-card:nth-child(5)  { animation-delay: .25s; }
.blog-card:nth-child(6)  { animation-delay: .30s; }

/* Card Image */
.card-img-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--primary-light);
}
.card-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.blog-card:hover .card-img-wrap img { transform: scale(1.06); }

.card-category {
  position: absolute;
  top: 14px; left: 14px;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
}

/* Image placeholder (while loading) */
.card-img-placeholder {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-light), #dde6f5);
  color: var(--primary);
  font-size: 40px;
}

/* Card Body */
.card-body {
  padding: 22px 22px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 10px;
}
.card-meta i { color: var(--primary); }

.card-title {
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.4;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--transition);
}
.blog-card:hover .card-title { color: var(--primary); }

.card-excerpt {
  font-size: 14px;
  color: var(--text-mid);
  line-height: 1.6;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 18px;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  font-size: 14px;
  font-weight: 600;
  transition: gap var(--transition), color var(--transition);
  margin-top: auto;
}
.card-link:hover { color: var(--primary-dark); gap: 10px; }
.card-link i { font-size: 12px; }

/* ── LOADING SENTINEL & SPINNER ── */
#load-sentinel { height: 40px; }

.loading-spinner {
  display: none;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 32px;
  color: var(--text-mid);
  font-size: 14px;
}
.loading-spinner.visible { display: flex; }
.spinner-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--primary);
  animation: dotBounce 1.2s ease-in-out infinite;
}
.spinner-dot:nth-child(2) { animation-delay: .2s; }
.spinner-dot:nth-child(3) { animation-delay: .4s; }
@keyframes dotBounce {
  0%, 80%, 100% { transform: scale(.5); opacity: .4; }
  40%            { transform: scale(1);  opacity: 1; }
}

/* ── ALL LOADED MESSAGE ── */
.all-loaded {
  text-align: center;
  color: var(--text-light);
  font-size: 14px;
  padding: 24px;
  display: none;
}
.all-loaded.visible { display: block; }

/* ── NO RESULTS ── */
.no-results {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-mid);
  display: none;
  grid-column: 1 / -1;
}
.no-results.visible { display: block; }
.no-results i { font-size: 48px; color: var(--border); margin-bottom: 16px; }
.no-results h3 { font-family: var(--font-head); margin-bottom: 8px; }

/* ── STICKY BUTTONS (WhatsApp / Call) ── */
.sticky-btn {
  position: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  border-radius: 50px;
  z-index: 9999;
  box-shadow: 0 4px 12px rgba(0,0,0,.25);
  gap: 8px;
  transition: transform var(--transition), box-shadow var(--transition);
}
.sticky-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.3); }
.sticky-btn i { font-size: 20px; }
.whatsapp-btn { left: 20px; bottom: 24px; background: #25D366; }
.call-btn     { right: 20px; bottom: 24px; background: #154082; }

@media (min-width: 769px) {
  .call-btn { display: none !important; }
}
@media (max-width: 768px) {
  .sticky-btn span { display: none; }
  .sticky-btn { padding: 14px; }
}

/* ── SCROLL TO TOP ── */
.scroll-top {
  position: fixed;
  bottom: 90px; right: 20px;
  width: 40px; height: 40px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  transition: all var(--transition);
  z-index: 500;
  border: none;
  box-shadow: var(--shadow-sm);
}
.scroll-top.visible { opacity: 1; transform: translateY(0); }
.scroll-top:hover   { background: var(--primary-dark); }

/* ── FOOTER ── */
.blog-footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,.8);
  padding: 48px 24px 0;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  padding-bottom: 40px;
}
.footer-col h4 {
  color: #fff;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(255,255,255,.15);
}
.footer-col p, .footer-col a {
  font-size: 14px;
  color: rgba(255,255,255,.72);
  line-height: 2;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.footer-col a:hover { color: #fff; }
.footer-col i { color: rgba(255,255,255,.5); margin-top: 4px; flex-shrink: 0; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12);
  padding: 16px 0;
  text-align: center;
  font-size: 13px;
  color: rgba(255,255,255,.5);
}
.footer-bottom a { color: rgba(255,255,255,.7); }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .blog-grid { grid-template-columns: 1fr; gap: 20px; }
  .blog-hero { padding: 52px 20px 60px; }
  .header-phone { display: none; }
  .footer-inner { grid-template-columns: 1fr; }
  .blog-page-content { padding: 36px 16px 60px; }
}
@media (max-width: 480px) {
  .blog-filter { gap: 8px; }
  .filter-btn  { font-size: 12px; padding: 5px 13px; }
}
