/* Blog-specific body + container */
.blog-page {
  background: #fafafa;
}
.blog-page .blog-content,
.blog-page .blog-toc,
.blog-page .hero {
  font-family: Arial, sans-serif;
  color: #333;
  line-height: 1.6;
}
.blog-page .container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Blog Hero */
.blog-page .blog-hero {
  padding: 40px 20px 20px;
  background: #fff;
  border-bottom: 1px solid #eee;
}

.blog-page .blog-hero .breadcrumb {
  font-size: 0.9rem;
  color: #222222;
  margin-bottom: 8px;
  text-align: center;
}

.blog-page .blog-hero .breadcrumb a {
  color: #1766c6;
  text-decoration: none;
  pointer-events: auto; /* clickable again */
}
.blog-page .blog-hero .blog-title {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin: 0 auto;
  max-width: 800px;
}

.blog-page .blog-hero .featured-image img {
  width: auto;           /* let width shrink naturally */
  max-width: 100%;       /* don’t overflow on mobile */
  max-height: 600px;     /* taller than before for desktop */
  object-fit: contain;   /* show full image without cropping */
  border-radius: 40px;
  display: block;
  margin: 0 auto;
}
.blog-page .blog-hero .blog-meta {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
  font-size: 0.95rem;
  color: #555;
  margin-top: 10px;
  padding: 10px 0;
  border-top: 1px solid #eee;
}
.blog-page .blog-hero .meta-item {
  flex: 1;
  min-width: 150px;
  text-align: center;
}

/* Layout with TOC */
.blog-page .blog-layout {
  display: flex;
  gap: 30px;
  margin-top: 30px;
  width: 90%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}
.blog-page .blog-toc {
  width: 22%; /* slightly wider for balance */
  position: sticky;
  top: 100px;
  max-height: 50vh; /* limit height */
  overflow-y: auto; /* scroll if long */
  background: #fff;
  border: 1px solid #ddd;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  flex-shrink: 0;
}
.blog-page .blog-toc h2 {
  font-size: 1.1rem;
  margin-bottom: 12px;
  border-bottom: 1px solid #eee;
  padding-bottom: 6px;
}

.blog-page .blog-toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.blog-page .blog-toc li {
  margin-bottom: 6px;
}
.blog-page .blog-toc a {
  display: block;
  padding: 8px 10px;
  border-left: 3px solid transparent;
  color: #0077cc;
  text-decoration: none; /* remove underline */
  transition: all 0.2s ease;
  border-radius: 4px;
}
.blog-page .blog-toc a:hover {
  background: #f5faff;
  border-left-color: #0077cc; /* separator highlight */
}


.blog-page .blog-toc a.active {
  background: #e9f4ff;
  border-left-color: #0077cc;
  font-weight: 600;
}

/* Content column — give more width */
.blog-page .blog-content {
  width: 70%; /* take more space, less whitespace */
  flex: 1; 
}
/* Blog hyperlinks */
.blog-page .blog-content a {
  color: #1766c6;            /* link color */
  text-decoration: none;     /* no underline by default */
  transition: color 0.2s ease, text-decoration 0.2s ease;
}

.blog-page .blog-content a:hover {
  color: #1766c6;            /* keep same color */
  text-decoration: underline;/* underline on hover */
}

/* Headings */
.blog-page .blog-content h1,
.blog-page .blog-content h2 {
  background: #eef6ff;
  padding: 8px;
  border-left: 4px solid #0077cc;
}
.blog-page .blog-content h3 {
  margin-top: 20px;
  font-size: 1.3rem;
}
.blog-page .blog-content h4 {
  margin-top: 15px;
  font-size: 1.1rem;
}

/* Tables */
.blog-page .blog-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}
.blog-page .blog-content th, .blog-content td {
  border: 1px solid #ddd;
  padding: 10px;
}
.blog-page .blog-content th {
  background: #f0f0f0;
}

/* Images alternating */
.blog-page .image-block {
  margin: 20px 0;
}

.blog-page .image-block img {
  width: 100%;           /* full blog content width */
  height: 450px;         /* fixed height (adjustable: 250–400px) */
  object-fit: cover;     /* crop to fit fixed height */
  border-radius: 8px;
  display: block;
}

/* FAQ Accordion */
.blog-page .faq-item {
  margin: 15px 0;
}
.blog-page .faq-question {
  display: flex;
  justify-content: space-between; /* push text left, icon right */
  align-items: flex-start;        /* icon aligns with first line */
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  background: #0077cc;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  font-size: 1rem;
  position: relative; /* remove absolute dependency */
}
/* make ::after part of the flex layout */
.blog-page .faq-question::after {
  content: "+";
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}
.blog-page .faq-item.active .faq-question::after {
  content: "–";
  transform: rotate(180deg);
}
.blog-page .faq-answer {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s ease, padding 0.3s ease, opacity 0.3s ease;
  padding: 0 10px; /* collapsed state */
  background: #f9f9f9;
  border-left: 3px solid #0077cc;
}
.blog-page .faq-item.active .faq-answer {
  padding: 10px;
  opacity: 1;
}

/* Author */
.blog-page .blog-author {
  margin-top: 30px;
  font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
 .blog-page .blog-layout {
    flex-direction: column;
  }
  .blog-page .blog-toc {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
  }
  .blog-page .blog-content {
    width: 100%;
  }
 .blog-page .blog-hero .blog-title {
    font-size: 1.6rem;
  }
  .blog-hero .blog-meta {
    flex-direction: column;
    align-items: center;
  }
}
@media (max-width: 991px) {
  .blog-page .blog-toc {
    display: none; /* ✅ removes TOC on mobile */
  }
}
/* Desktop: image not full width */
@media (min-width: 992px) {
  .blog-page .blog-hero .featured-image img {
    max-width: 80%;   /* narrower on big screens */
  }
}

/* Tablet & Mobile: full width */
@media (max-width: 991px) {
  .blog-page .blog-hero .featured-image img {
    max-width: 100%;
  }
}
@media (max-width: 991px) {
  .blog-page .image-block img {
    height: auto;         /* let height grow naturally */
    max-height: 500px;    /* optional cap */
    object-fit: contain;  /* show the whole graph */
  }
}
