/* =============================================================
   BLOG — Styles for article pages and blog listing
   ============================================================= */

/* ---- Article Hero ---- */
.article-hero {
  background: linear-gradient(-45deg, #03123a, #0b3278, #0e3f90, #082260);
  background-size: 300% 300%;
  animation: hero-gradient 20s ease infinite;
  padding: 148px 0 56px;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.article-hero::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -80px;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(30, 100, 255, 0.18) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

/* Breadcrumb */
.article-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.article-breadcrumb a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  transition: color 0.2s;
}

.article-breadcrumb a:hover { color: #fff; }

.article-breadcrumb span[aria-hidden] {
  color: rgba(255,255,255,0.35);
}

/* Category badge */
.article-category-badge {
  display: inline-block;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.22);
  color: rgba(255,255,255,0.9);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 30px;
  margin-bottom: 18px;
}

/* H1 */
.article-hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 800;
  line-height: 1.2;
  color: #fff;
  max-width: 780px;
  margin-bottom: 18px;
}

.article-h1-accent {
  color: #7eb8f7;
}

/* Lead */
.article-lead {
  font-size: 1.1rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.82);
  max-width: 680px;
  margin-bottom: 28px;
}

/* Meta bar */
.article-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.article-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.84rem;
  color: rgba(255,255,255,0.65);
}

.article-meta-item svg { flex-shrink: 0; opacity: 0.7; }

/* ---- Article Layout ---- */
.article-main {
  padding: 60px 0 80px;
  background: var(--surface, #f5f8ff);
}

.article-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  align-items: start;
}

/* ---- Article Content ---- */
.article-content {
  background: #fff;
  border-radius: var(--radius-lg, 20px);
  padding: 48px 52px;
  box-shadow: 0 2px 16px rgba(11,61,145,0.07);
}

/* Cover image */
.article-cover {
  margin: 0 0 36px;
  border-radius: 12px;
  overflow: hidden;
}

.article-cover img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}

.article-cover figcaption {
  font-size: 0.78rem;
  color: #9aaabf;
  text-align: center;
  padding: 10px 0 0;
  font-style: italic;
}

/* Body typography */
.article-content p {
  font-size: 1.02rem;
  line-height: 1.82;
  color: var(--ink, #0d1726);
  margin-bottom: 1.3rem;
}

.article-content h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary, #0B3D91);
  margin: 2.4rem 0 0.9rem;
  padding-top: 0.5rem;
  border-top: 2px solid #edf2fd;
  line-height: 1.3;
}

.article-content h2:first-of-type {
  margin-top: 0;
}

.article-content h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink, #0d1726);
  margin: 1.6rem 0 0.6rem;
}

.article-content strong { color: var(--primary-deep, #03123a); }

.article-content a {
  color: var(--primary, #0B3D91);
  text-decoration: underline;
  text-decoration-color: rgba(11,61,145,0.3);
  text-underline-offset: 3px;
  transition: color 0.2s;
}

.article-content a:hover { color: #1565c0; }

/* Highlight box */
.article-highlight {
  background: linear-gradient(135deg, #fff8e7 0%, #fff3cc 100%);
  border-left: 4px solid #f59e0b;
  border-radius: 0 12px 12px 0;
  padding: 24px 28px;
  margin: 2rem 0;
}

.article-highlight h2 {
  border-top: none;
  margin-top: 0;
  padding-top: 0;
  color: #92400e;
  font-size: 1.2rem;
}

.article-highlight p { margin-bottom: 0.8rem; }
.article-highlight p:last-child { margin-bottom: 0; }

/* CTA Box inside article */
.article-cta-box {
  display: flex;
  gap: 20px;
  background: linear-gradient(135deg, #edf2fd, #dbe6fb);
  border: 1px solid rgba(11,61,145,0.12);
  border-radius: 16px;
  padding: 28px 32px;
  margin: 2.4rem 0;
  align-items: flex-start;
}

.article-cta-icon {
  font-size: 2rem;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 2px;
}

.article-cta-box h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
  color: var(--primary-deep, #03123a);
}

.article-cta-box p {
  font-size: 0.95rem;
  margin-bottom: 16px;
  color: #374151;
}

.article-cta-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Tags */
.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #edf2fd;
}

.article-tag {
  background: #edf2fd;
  color: var(--primary, #0B3D91);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 30px;
  letter-spacing: 0.03em;
}

/* ---- Sidebar ---- */
.article-sidebar {
  position: sticky;
  top: 112px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-card {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 2px 16px rgba(11,61,145,0.07);
}

.sidebar-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary-deep, #03123a);
  margin: 0 0 14px;
  padding-bottom: 12px;
  border-bottom: 2px solid #edf2fd;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* TOC */
.article-toc {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.article-toc a {
  display: block;
  font-size: 0.86rem;
  color: #4a5568;
  text-decoration: none;
  padding: 7px 10px;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
  line-height: 1.4;
}

.article-toc a:hover {
  background: #edf2fd;
  color: var(--primary, #0B3D91);
}

/* Sidebar CTA */
.sidebar-cta {
  background: linear-gradient(135deg, #0B3D91, #1565c0);
  color: #fff;
}

.sidebar-cta h3 {
  color: #fff;
  border-bottom-color: rgba(255,255,255,0.15);
}

.sidebar-cta p {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 16px;
  line-height: 1.55;
}

.sidebar-cta-icon {
  font-size: 2rem;
  margin-bottom: 10px;
}

/* Related links */
.sidebar-related-link {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #f0f4ff;
  text-decoration: none;
  transition: background 0.2s;
}

.sidebar-related-link:last-child { border-bottom: none; }

.sidebar-related-link:hover .sidebar-related-icon + span {
  color: var(--primary, #0B3D91);
}

.sidebar-related-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  line-height: 1.4;
}

.sidebar-related-link span:last-child {
  font-size: 0.87rem;
  color: #374151;
  line-height: 1.45;
  transition: color 0.2s;
}

/* ================================================================
   BLOG LISTING PAGE
   ================================================================ */

/* Blog hero / page-hero override */
.blog-hero {
  background: linear-gradient(-45deg, #03123a, #0b3278, #0e3f90, #082260);
  background-size: 300% 300%;
  animation: hero-gradient 20s ease infinite;
  padding: 148px 0 64px;
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.blog-hero::before {
  content: '';
  position: absolute;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(30, 100, 255, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.blog-hero-label {
  display: inline-block;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.22);
  color: rgba(255,255,255,0.9);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 30px;
  margin-bottom: 18px;
}

.blog-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  color: #fff;
  margin-bottom: 16px;
  line-height: 1.2;
}

.blog-hero p {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.78);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.65;
}

/* Blog listing section */
.blog-listing {
  padding: 72px 0 96px;
  background: var(--surface, #f5f8ff);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 32px;
}

/* Article card */
.blog-card {
  background: #fff;
  border-radius: var(--radius-lg, 20px);
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(11,61,145,0.07);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
  text-decoration: none;
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 36px rgba(11,61,145,0.14);
}

.blog-card-thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: #dbe6fb;
}

.blog-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.blog-card:hover .blog-card-thumb img {
  transform: scale(1.04);
}

.blog-card-category {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--primary, #0B3D91);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 20px;
}

.blog-card-body {
  padding: 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.blog-card-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  color: #8a9ab5;
}

.blog-card-meta svg { opacity: 0.6; }

.blog-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-deep, #03123a);
  line-height: 1.35;
  margin-bottom: 10px;
  transition: color 0.2s;
}

.blog-card:hover .blog-card-title {
  color: var(--primary, #0B3D91);
}

.blog-card-excerpt {
  font-size: 0.9rem;
  color: #5a6a7e;
  line-height: 1.65;
  flex: 1;
  margin-bottom: 20px;
}

.blog-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #edf2fd;
  padding-top: 16px;
}

.blog-card-read {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--primary, #0B3D91);
  display: flex;
  align-items: center;
  gap: 6px;
}

.blog-card-read svg {
  transition: transform 0.2s;
}

.blog-card:hover .blog-card-read svg {
  transform: translateX(4px);
}

/* Blog CTA section */
.blog-cta {
  background: linear-gradient(135deg, #0B3D91, #1251a8);
  padding: 72px 0;
  text-align: center;
  color: #fff;
}

.blog-cta h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 800;
  margin-bottom: 14px;
}

.blog-cta p {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.82);
  max-width: 520px;
  margin: 0 auto 28px;
  line-height: 1.65;
}

.blog-cta-buttons {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 1024px) {
  .article-layout {
    grid-template-columns: 1fr 280px;
    gap: 28px;
  }
}

@media (max-width: 860px) {
  .article-layout {
    grid-template-columns: 1fr;
  }

  .article-sidebar {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .article-sidebar .sidebar-card:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .article-hero {
    padding: 132px 0 44px;
  }

  .blog-hero {
    padding: 132px 0 48px;
  }

  .article-content {
    padding: 28px 22px;
  }

  .article-content h2 {
    font-size: 1.15rem;
  }

  .article-cta-box {
    flex-direction: column;
    gap: 14px;
    padding: 22px;
  }

  .article-cta-buttons {
    flex-direction: column;
  }

  .article-cta-buttons .btn {
    justify-content: center;
  }

  .article-sidebar {
    grid-template-columns: 1fr;
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .article-hero {
    padding: 118px 0 36px;
  }

  .blog-hero {
    padding: 118px 0 40px;
  }

  .article-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .blog-card-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}
