/* ══════════════════════════════════════════════════
   blog.css — Premium Glassmorphic Dark-Mode Blog Styling
   ══════════════════════════════════════════════════ */

:root {
  --blog-navy: #070D19;
  --blog-navy-card: rgba(25, 44, 74, 0.35);
  --blog-border: rgba(255, 255, 255, 0.08);
  --blog-text: #F4F7FC;
  --blog-muted: #94A3B8;
  --blue-glow: rgba(37, 99, 235, 0.25);
  --pink-glow: rgba(244, 63, 94, 0.15);
}

body.blog-body {
  background: radial-gradient(circle at 50% 0%, #0F1E38 0%, var(--blog-navy) 80%);
  color: var(--blog-text);
}

/* ── Glowing meshes ── */
.blog-glow-1 {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.08) 0%, rgba(37, 99, 235, 0) 70%);
  top: -150px;
  left: 10%;
  pointer-events: none;
  z-index: 0;
}
.blog-glow-2 {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(244, 63, 94, 0.04) 0%, rgba(244, 63, 94, 0) 70%);
  top: 400px;
  right: 5%;
  pointer-events: none;
  z-index: 0;
}

/* ── Hero Section ── */
#blog-hero {
  padding-top: 110px;
  padding-bottom: 40px;
  position: relative;
  z-index: 10;
}
.blog-hero-inner {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}
.blog-hero-inner h1 {
  font-size: clamp(32px, 4.5vw, 56px);
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1.08;
  color: #fff;
  margin-bottom: 16px;
  text-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.blog-hero-inner p {
  font-size: 16px;
  color: var(--blog-muted);
  line-height: 1.6;
  max-width: 580px;
  margin: 0 auto 28px;
}

/* ── Breadcrumb Custom ── */
.blog-body .breadcrumb {
  margin-bottom: 24px;
}
.blog-body .breadcrumb a, 
.blog-body .breadcrumb-cur {
  color: var(--blog-muted);
}
.blog-body .breadcrumb a:hover {
  color: #fff;
}
.blog-body .breadcrumb-cur {
  color: #fff;
}

/* ── Controls (Filter & Search) ── */
.blog-ctrls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 40px;
  position: relative;
  z-index: 20;
}
.blog-tabs {
  display: flex;
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--blog-border);
  padding: 4px;
  border-radius: 12px;
}
.blog-tab {
  padding: 8px 18px;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--blog-muted);
  cursor: pointer;
  transition: all 0.25s ease;
  border: none;
  background: transparent;
}
.blog-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.02);
}
.blog-tab.active {
  color: #fff;
  background: var(--blue);
  box-shadow: 0 4px 12px var(--blue-glow);
}
.blog-search-wrap {
  position: relative;
  width: 100%;
  max-width: 320px;
}
.blog-search {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--blog-border);
  padding: 10px 16px 10px 38px;
  border-radius: 12px;
  color: #fff;
  font-size: 13.5px;
  font-family: inherit;
  outline: none;
  transition: all 0.25s ease;
}
.blog-search:focus {
  border-color: var(--blue);
  box-shadow: 0 0 16px var(--blue-glow);
  background: rgba(255, 255, 255, 0.05);
}
.blog-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--blog-muted);
  font-size: 15px;
  pointer-events: none;
}

/* ── Blog Grid & Cards ── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  padding-bottom: 80px;
  position: relative;
  z-index: 10;
}

/* Featured card */
.blog-featured-card {
  grid-column: span 3;
  display: flex;
  background: var(--blog-navy-card);
  border: 1px solid var(--blog-border);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}
.blog-featured-card:hover {
  transform: translateY(-3px);
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 25px 60px rgba(37, 99, 235, 0.08), inset 0 1px 0 rgba(255,255,255,0.05);
}
.blog-feat-vis {
  width: 50%;
  background: linear-gradient(135deg, #101F3E 0%, #081122 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px;
  padding: 44px;
  border-right: 1px solid var(--blog-border);
  position: relative;
  overflow: hidden;
}
.blog-feat-vis::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(37,99,235,0.15) 0%, transparent 60%);
}
.blog-feat-body {
  width: 50%;
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Normal Cards */
.blog-card {
  display: flex;
  flex-direction: column;
  background: var(--blog-navy-card);
  border: 1px solid var(--blog-border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 16px 36px rgba(0,0,0,0.25);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  height: 100%;
}
.blog-card:hover {
  transform: translateY(-3px);
  border-color: rgba(244, 63, 94, 0.25);
  box-shadow: 0 20px 44px rgba(244, 63, 94, 0.04);
}
.blog-card-vis {
  height: 180px;
  background: linear-gradient(135deg, #101F3E 0%, #081122 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 52px;
  border-bottom: 1px solid var(--blog-border);
  position: relative;
  overflow: hidden;
}
.blog-card-vis::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.03) 0%, transparent 75%);
}
.blog-card-body {
  padding: 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Common card styling */
.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--blog-muted);
  margin-bottom: 12px;
}
.blog-card-cat {
  color: var(--pink);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.blog-card-meta-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--blog-border);
}
.blog-card-title {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.35;
  color: #fff;
  margin-bottom: 12px;
  transition: color 0.2s;
}
.blog-card:hover .blog-card-title,
.blog-featured-card:hover .blog-card-title {
  color: var(--blue-lt);
}
.blog-featured-card .blog-card-title {
  font-size: 28px;
  margin-bottom: 16px;
}
.blog-card-desc {
  font-size: 14px;
  color: var(--blog-muted);
  line-height: 1.55;
  margin-bottom: 20px;
}
.blog-featured-card .blog-card-desc {
  font-size: 15px;
  margin-bottom: 24px;
}
.blog-card-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.blog-card-author {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: #fff;
  font-weight: 500;
}
.blog-card-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--navy-sub);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}
.blog-card-arrow {
  color: var(--blue);
  font-weight: bold;
  font-size: 14px;
  transition: transform 0.2s;
}
.blog-card:hover .blog-card-arrow,
.blog-featured-card:hover .blog-card-arrow {
  transform: translateX(4px);
}

/* No results state */
.blog-no-results {
  grid-column: span 3;
  padding: 80px 20px;
  background: var(--blog-navy-card);
  border: 1px solid var(--blog-border);
  border-radius: 20px;
  text-align: center;
  display: none;
}
.blog-no-results h3 {
  font-size: 20px;
  color: #fff;
  margin-bottom: 8px;
}
.blog-no-results p {
  color: var(--blog-muted);
  font-size: 14.5px;
}

/* ── Blog Post (Article View) ── */
#article-view {
  padding-top: 100px;
  padding-bottom: 80px;
  position: relative;
  z-index: 10;
}
.article-wrap {
  max-width: 780px;
  margin: 0 auto;
}
.article-header {
  margin-bottom: 36px;
  text-align: center;
}
.article-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  line-height: 1.15;
  color: #fff;
  margin-bottom: 24px;
  letter-spacing: -1.2px;
}
.article-meta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 28px;
}
.article-meta-box {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--blog-muted);
}
.article-content {
  font-size: 17px;
  line-height: 1.75;
  color: #E2E8F0;
}
.article-content p {
  margin-bottom: 24px;
  font-weight: 400;
}
.article-content h2 {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin-top: 48px;
  margin-bottom: 16px;
  letter-spacing: -0.6px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.article-content h2::after {
  content: "";
  position: absolute;
  margin-left: 10px;
  flex: 1;
  height: 1px;
  background: var(--blog-border);
}
.article-content h3 {
  font-size: 19px;
  font-weight: 700;
  color: #fff;
  margin-top: 36px;
  margin-bottom: 12px;
  letter-spacing: -0.3px;
}
.article-content ul, .article-content ol {
  margin-bottom: 28px;
  padding-left: 20px;
}
.article-content li {
  margin-bottom: 8px;
}
.article-content blockquote {
  border-left: 3px solid var(--blue);
  background: rgba(37, 99, 235, 0.05);
  padding: 18px 24px;
  border-radius: 0 12px 12px 0;
  margin: 32px 0;
  font-style: italic;
  color: #fff;
  font-size: 16.5px;
}
.article-content blockquote p {
  margin-bottom: 0;
}

/* Highlights callout */
.article-callout {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--blog-border);
  padding: 24px;
  border-radius: 16px;
  margin: 36px 0;
}
.article-callout-title {
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Elegant bottom CTA box */
.article-cta {
  background: linear-gradient(135deg, rgba(25, 44, 74, 0.6) 0%, rgba(15, 30, 56, 0.6) 100%);
  border: 1px solid rgba(37, 99, 235, 0.2);
  padding: 44px;
  border-radius: 20px;
  text-align: center;
  margin-top: 60px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
  z-index: 10;
}
.article-cta::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 100%, rgba(37,99,235,0.1) 0%, transparent 60%);
  pointer-events: none;
}
.article-cta-h3 {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
  letter-spacing: -0.6px;
}
.article-cta-p {
  font-size: 15px;
  color: var(--blog-muted);
  max-width: 520px;
  margin: 0 auto 28px;
  line-height: 1.55;
}

/* Back button */
.article-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--blog-muted);
  transition: color 0.25s ease;
  margin-bottom: 24px;
}
.article-back:hover {
  color: #fff;
}

/* ── Responsive adjustments ── */
@media (max-width: 960px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  .blog-featured-card {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  .blog-featured-card {
    flex-direction: column;
  }
  .blog-feat-vis {
    width: 100%;
    height: 220px;
    border-right: none;
    border-bottom: 1px solid var(--blog-border);
  }
  .blog-feat-body {
    width: 100%;
    padding: 32px;
  }
  .blog-featured-card .blog-card-title {
    font-size: 22px;
  }
  .blog-ctrls {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }
  .blog-search-wrap {
    max-width: 100%;
  }
}

@media (max-width: 540px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }
  .blog-featured-card {
    grid-column: span 1;
  }
  .blog-tab {
    padding: 8px 12px;
    font-size: 12.5px;
  }
  .article-cta {
    padding: 32px 20px;
  }
  .article-cta-h3 {
    font-size: 20px;
  }
}

/* ── Footer styling overrides for dark pages ── */
.blog-body footer {
  color: var(--text) !important;
}
.blog-body footer .ft-brand h3 {
  color: var(--text) !important;
}
.blog-body footer .ft-brand p {
  color: var(--muted) !important;
}
.blog-body footer .ft-col h4 {
  color: var(--muted) !important;
}
.blog-body footer .ft-col a {
  color: var(--muted) !important;
}
.blog-body footer .ft-col a:hover {
  color: var(--text) !important;
}
.blog-body footer .ft-bot p {
  color: var(--muted) !important;
}
