/* ===== BLOG STYLES — HVAC System Aircon ===== */

/* ── Category Tag ── */
.blog-cat-tag {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--cat-color, #1a56db);
  background: color-mix(in srgb, var(--cat-color, #1a56db) 10%, white);
  border: 1px solid color-mix(in srgb, var(--cat-color, #1a56db) 25%, white);
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 12px;
}

/* ── Blog Index Hero ── */
.blog-index-hero {
  padding: 64px 0 48px;
  background: linear-gradient(135deg, #f8faff 0%, #f0f4ff 100%);
  border-bottom: 1px solid var(--gray-200);
  text-align: center;
}
.blog-index-hero h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--black);
  letter-spacing: -0.025em;
  margin-bottom: 14px;
}
.blog-index-hero p {
  font-size: 1.05rem;
  color: var(--gray-500);
  max-width: 560px;
  margin: 0 auto 20px;
  line-height: 1.7;
}
.blog-stats-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--gray-700);
  flex-wrap: wrap;
}

/* ── Filter Bar ── */
.blog-filter-bar {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 0;
  z-index: 99;
}
.sticky-filters {
  position: sticky;
  top: var(--header-h);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.filter-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 12px 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.filter-tabs::-webkit-scrollbar { display: none; }
.filter-tab {
  flex-shrink: 0;
  font-family: var(--font);
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--gray-700);
  background: transparent;
  border: 1.5px solid var(--gray-200);
  border-radius: 100px;
  padding: 7px 16px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
}
.filter-tab:hover { border-color: #1a56db; color: #1a56db; background: #eff6ff; }
.filter-tab.active { background: #1a56db; color: #fff; border-color: #1a56db; }

/* ── Blog Grid ── */
.blog-grid-section { background: var(--white); }
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}
@media (max-width: 900px) { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .blog-grid { grid-template-columns: 1fr; gap: 16px; } }

.blog-card {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.22s ease, transform 0.22s ease;
  display: flex;
  flex-direction: column;
}
.blog-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}
.blog-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.blog-card h2 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--black);
  line-height: 1.4;
  margin-bottom: 10px;
}
.blog-card h2 a { color: inherit; transition: color 0.18s; }
.blog-card h2 a:hover { color: #1a56db; }
.blog-card p {
  font-size: 0.88rem;
  color: var(--gray-500);
  line-height: 1.65;
  flex: 1;
  margin-bottom: 16px;
}
.blog-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--gray-100);
}
.read-time { font-size: 0.8rem; color: var(--gray-500); font-weight: 500; }
.read-more-link {
  font-size: 0.83rem;
  font-weight: 700;
  color: #1a56db;
  text-decoration: none;
  white-space: nowrap;
  transition: gap 0.18s;
}
.read-more-link:hover { text-decoration: underline; }

/* ── Pagination ── */
.blog-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.page-btn {
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--gray-700);
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: 10px;
  padding: 9px 16px;
  cursor: pointer;
  transition: all 0.18s ease;
  min-width: 42px;
}
.page-btn:hover { border-color: #1a56db; color: #1a56db; background: #eff6ff; }
.page-btn.active { background: #1a56db; color: #fff; border-color: #1a56db; }
.page-prev, .page-next { padding: 9px 18px; }

/* ── No results ── */
.blog-no-results {
  text-align: center;
  padding: 48px 20px;
  color: var(--gray-500);
  font-size: 1rem;
}
.blog-no-results a { color: #1a56db; font-weight: 600; }

/* ── Services CTA Section ── */
.blog-services-cta {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
  padding: 72px 0;
}
.blog-cta-header { text-align: center; margin-bottom: 40px; }
.blog-cta-header .tag { background: rgba(255,255,255,0.12); color: rgba(255,255,255,0.9); }
.blog-cta-header .section-title { color: #fff; }
.blog-cta-header .section-sub { color: rgba(255,255,255,0.7); margin: 0 auto; }
.blog-services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 36px;
}
@media (max-width: 768px) { .blog-services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .blog-services-grid { grid-template-columns: 1fr; } }

.blog-svc-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 14px 16px;
  text-decoration: none;
  color: #fff;
  transition: background 0.2s, transform 0.2s;
}
.blog-svc-card:hover {
  background: rgba(255,255,255,0.13);
  transform: translateY(-2px);
}
.blog-svc-icon { font-size: 1.3rem; flex-shrink: 0; }
.blog-svc-info { flex: 1; }
.blog-svc-info strong { display: block; font-size: 0.9rem; font-weight: 700; color: #fff; }
.blog-svc-info span { font-size: 0.78rem; color: rgba(255,255,255,0.6); }
.blog-svc-card svg { flex-shrink: 0; opacity: 0.6; stroke: #fff; }
.blog-cta-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── ARTICLE PAGE ── */

/* Breadcrumb */
.blog-breadcrumb {
  background: var(--gray-100);
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-200);
  font-size: 0.82rem;
  color: var(--gray-500);
}
.blog-breadcrumb .container {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.blog-breadcrumb a { color: var(--gray-700); font-weight: 500; transition: color 0.15s; }
.blog-breadcrumb a:hover { color: #1a56db; }
.blog-breadcrumb span { color: var(--gray-500); }
.blog-breadcrumb svg { flex-shrink: 0; stroke: var(--gray-400); }

/* Article layout */
.blog-article { padding: 48px 0 0; }
.blog-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
  align-items: start;
}
@media (max-width: 900px) {
  .blog-layout { grid-template-columns: 1fr; }
  .blog-sidebar { order: -1; }
}

/* Article header */
.article-header { margin-bottom: 32px; }
.article-header h1 {
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  font-weight: 800;
  color: var(--black);
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 14px;
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--gray-500);
  font-weight: 500;
}

/* Article body typography */
.article-body {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--gray-700);
}
.article-body h1,
.article-body h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--black);
  margin: 40px 0 14px;
  letter-spacing: -0.015em;
  line-height: 1.3;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--gray-100);
}
.article-body h1:first-child { margin-top: 0; }
.article-body h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gray-900);
  margin: 28px 0 10px;
}
.article-body h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-900);
  margin: 20px 0 8px;
}
.article-body p { margin-bottom: 18px; }
.article-body ul, .article-body ol {
  padding-left: 22px;
  margin-bottom: 18px;
}
.article-body li { margin-bottom: 6px; }
.article-body strong { color: var(--gray-900); font-weight: 700; }
.article-body em { color: var(--gray-700); }
.article-body hr {
  border: none;
  border-top: 1px solid var(--gray-200);
  margin: 36px 0;
}
.article-body blockquote {
  border-left: 4px solid #1a56db;
  padding: 14px 20px;
  margin: 24px 0;
  background: #f0f6ff;
  border-radius: 0 8px 8px 0;
  color: var(--gray-700);
  font-style: italic;
}
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 0.9rem;
  overflow-x: auto;
  display: block;
}
.article-body th, .article-body td {
  border: 1px solid var(--gray-200);
  padding: 10px 14px;
  text-align: left;
}
.article-body th { background: var(--gray-100); font-weight: 700; color: var(--black); }
.article-body tr:nth-child(even) td { background: #fafbfc; }
.article-body code {
  background: var(--gray-100);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.88em;
  color: #dc2626;
}
.article-body a { color: #1a56db; text-decoration: underline; }
.article-body a:hover { color: #1447c0; }

/* Inline CTA */
.article-inline-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  padding: 24px 28px;
  margin: 40px 0 0;
  flex-wrap: wrap;
}
.inline-cta-text strong {
  display: block;
  font-size: 1rem;
  font-weight: 800;
  color: var(--black);
  margin-bottom: 4px;
}
.inline-cta-text p { font-size: 0.88rem; color: var(--gray-500); margin: 0; }
.inline-cta-btns { display: flex; gap: 10px; flex-wrap: wrap; }

/* Sidebar */
.blog-sidebar {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  display: flex;
  flex-direction: column;
  gap: 20px;
}
@media (max-width: 900px) {
  .blog-sidebar { position: static; }
}
.sidebar-widget {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.sidebar-widget h3 {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--black);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--gray-100);
}
.sidebar-cta-widget { background: linear-gradient(135deg, #1a56db 0%, #1447c0 100%); border-color: #1447c0; }
.sidebar-cta-widget h3 { color: #fff; border-color: rgba(255,255,255,0.2); }
.sidebar-cta-widget p { font-size: 0.85rem; color: rgba(255,255,255,0.85); margin-bottom: 16px; }

.sidebar-services { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.sidebar-services li a {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.87rem;
  font-weight: 600;
  color: var(--gray-700);
  padding: 8px 0;
  border-bottom: 1px solid var(--gray-100);
  transition: color 0.15s, padding-left 0.18s;
}
.sidebar-services li:last-child a { border-bottom: none; }
.sidebar-services li a::before { content: '→'; color: #1a56db; font-size: 0.8rem; flex-shrink: 0; }
.sidebar-services li a:hover { color: #1a56db; padding-left: 4px; }

.sidebar-posts { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.sidebar-posts li a {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--gray-700);
  line-height: 1.4;
  display: block;
  padding: 8px 0;
  border-bottom: 1px solid var(--gray-100);
  transition: color 0.15s;
}
.sidebar-posts li:last-child a { border-bottom: none; }
.sidebar-posts li a:hover { color: #1a56db; }

/* Related Posts */
.related-posts .section-header { margin-bottom: 32px; }
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 768px) { .related-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .related-grid { grid-template-columns: 1fr; } }

.related-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 20px;
  text-decoration: none;
  color: inherit;
  display: block;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
}
.related-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.related-card h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 8px;
  line-height: 1.4;
}
.related-card p {
  font-size: 0.82rem;
  color: var(--gray-500);
  line-height: 1.55;
  margin-bottom: 12px;
}
.related-card .read-more-link {
  font-size: 0.82rem;
  font-weight: 700;
  color: #1a56db;
}

/* ── Mobile adjustments for article ── */
@media (max-width: 600px) {
  .blog-article { padding: 32px 0 0; }
  .article-inline-cta { flex-direction: column; align-items: flex-start; }
  .article-body h2 { font-size: 1.15rem; }
  .article-body table { font-size: 0.8rem; }
}
