/* ============================================
   BLOG PAGE
   Uses: common.css, home.css (insight-card = same as home Insights section)
   ============================================ */

/* ---------- Blog Hero ---------- */
.blog-hero {
  padding: 9.65rem 0 5.25rem;
  text-align: center;
  background: var(--bg-white);
  border-bottom: 1px solid #f3f4f6;
}

.blog-hero-inner {
  max-width: 640px;
  margin: 0 auto;
}

.blog-hero-title {
  font-weight: var(--font-weight-bold);
  color: #0b1120;
  margin-bottom: 1.3rem;
  font-size: 46px;
  line-height: 1.15;
  letter-spacing: -1.31px;
  text-align: center;
  vertical-align: middle;
}

.blog-hero-desc {
  font-size: 18px;
  color: var(--text-light);
  line-height: 1.33;
  margin-bottom: 1.75rem;
  font-weight: 300;
}

.blog-hero-contact {
  color: #f05a28;
  font-weight: var(--font-weight-medium);
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition-fast);
  line-height: 1.5;
}

.blog-hero-contact:hover {
  color: var(--primary-dark);
}

/* ---------- Blog Main (search + grid) ---------- */
.blog-main {
  padding-top: 3.5rem;
  padding-bottom: 3.5rem;
  background: var(--bg-white);
}

.blog-toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 2.65rem;
}

.blog-search-wrap {
  position: relative;
  width: 100%;
  max-width: 280px;
}

.blog-search {
  width: 100%;
  padding: 9px 44px 9px 16px;
  font-size: var(--font-size-sm);
  color: var(--text-light);
  background: var(--bg-white);
  border-radius: 10px;
  outline: none;
  transition: border-color var(--transition-fast);
  line-height: 1.45;
}

.blog-search::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.blog-search::placeholder {
  color: var(--text-light);
  opacity: 1;
}

.blog-search:focus {
  border-color: var(--primary-color);
}

.blog-search-icon {
  position: absolute;
  right: 11px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.blog-search-icon img {
  width: 24px;
  height: 24px;
  display: block;
  object-fit: contain;
}

.insights-grid {
  gap: 3.5rem 1.75rem;
}

/* Cards use home.css .insight-card, .insights-grid */

/* ============================================
   BLOG DETAIL (SINGLE POST)
   ============================================ */
.post-detail {
  background: var(--bg-white);
  padding-bottom: 3rem;
}

.post-header {
  padding: 5rem 0;
  text-align: center;
  line-height: 1;
}

.post-header-inner {
  max-width: 758px;
  margin: 0 auto;
}

.post-category {
  display: block;
  font-size: 10px;
  font-weight: var(--font-weight-semibold);
  color: #4f4d55;
  letter-spacing: 5%;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.post-title {
  font-weight: var(--font-weight-semibold);
  color: #0a090b;
  margin-bottom: 1.5rem;
  font-size: 46px;
  line-height: 120%;
  letter-spacing: -3%;
  text-align: center;
  vertical-align: middle;
}

.post-author-byline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.post-author-avatar-sm {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: #d4d1bf;
}

.post-author-avatar-sm img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-author-name-sm {
  font-size: 14px;
  font-weight: var(--font-weight-medium);
  color: #0a090b;
  line-height: 20px;
  letter-spacing: -0.05px;
}

/* Share row: "Share this article" left, icons right, above featured image */
.post-share-row {
  max-width: 1310px;
  margin: 1.5rem auto 0;
  padding: 0 15px;
}

.post-share-row-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 24px 0;
}

.post-share-label {
  font-size: 0.875rem;
  color: #0a090b;
  font-weight: var(--font-weight-medium);
  letter-spacing: -0.05px;
  line-height: 20px;
}

.post-share-icons {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.post-share-icon-btn img {
  width: 16px;
  height: 16px;
  display: block;
  object-fit: contain;
}

.post-share-icon-btn:hover {
  background: var(--primary-color);
}

.post-share {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.post-share-icon {
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: color var(--transition-fast);
}

.post-share-icon:hover {
  color: var(--primary-color);
}

.post-featured-image {
  width: 100%;
  max-width: 1310px;
  margin: 0 auto;
  padding: 0 15px;
  overflow: hidden;
  border-radius: 0;
}

.post-header .post-featured-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  max-height: 400px;
  object-position: center;
}

.post-content-wrap {
  margin: 1.5rem auto 0;
}

.post-layout {
  display: grid;
  grid-template-columns: 25% 1fr 25%;
  gap: 30px;
  align-items: start;
}

.post-content {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-primary);
  max-width: 100%;
}

/* Table of Contents */
.post-toc {
  position: sticky;
  top: 100px;
  background: var(--bg-white);
  border-radius: 10px;
  padding: 20px;
  border: 1px solid #D1D5DB;
  z-index: 99;
  transform: translateZ(0);
}

.post-toc::-webkit-scrollbar {
  display: none;
}

.toc-title {
  font-weight: var(--font-weight-bold);
  font-size: 18px;
  color: #111827;
  margin-bottom: 1.25rem;
  letter-spacing: 0;
  line-height: 1.35;
}

.toc-nav {
  margin: 0;
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-item:not(:last-child) {
  margin-bottom: 6px;
}

.toc-link {
  display: block;
  font-size: 15px;
  color: #636363;
  text-decoration: none;
  padding: 10px;
  border-radius: 0;
  transition: all var(--transition-fast);
  line-height: 1.3;
  letter-spacing: -0.05px;
  font-weight: 400;
}

.toc-link.active {
  color: #ffffff;
  background-color: var(--primary-color);
  font-weight: var(--font-weight-semibold);
}

.toc-link:hover {
  color: #111827;
}

.toc-link.active {
  color: #ffffff;
  background-color: var(--primary-color);
  font-weight: var(--font-weight-semibold);
}

/* Sidebar Form */
.post-sidebar-form {
  position: sticky;
  top: 100px;
  z-index: 99;
  transform: translateZ(0);
}

.post-sidebar-form::-webkit-scrollbar {
  display: none;
}

.sidebar-form-wrapper {
  background: var(--bg-white);
  border-radius: 10px;
  padding: 20px;
  border: 1px solid #D1D5DB;
}

.sidebar-form-title {
  font-weight: var(--font-weight-bold);
  font-size: 18px;
  color: #111827;
  margin-bottom: 10px;
  letter-spacing: 0;
  line-height: 1.35;
}

.sidebar-form-desc {
  font-size: 12px;
  line-height: 1.6;
  color: #222222;
  margin-bottom: 1.25rem;
  letter-spacing: 0;
}

.sidebar-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-label {
  font-size: 12px;
  font-weight: var(--font-weight-medium);
  color: #374151;
  margin-bottom: 3.5px;
  line-height: 1.45;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 9px 14px;
  font-size: 14px;
  color: #111827;
  background: var(--bg-white);
  border-radius: 3.5px;
  outline: none;
  transition: border-color var(--transition-fast);
  line-height: 1.25;
  border: 1px solid #D1D5DB;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: #9ca3af;
  opacity: 1;
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--primary-color);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

.form-submit {
  width: 100%;
  padding: 10.5px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 14px;
  font-weight: var(--font-weight-medium);
  border: none;
  border-radius: 3.5px;
  cursor: pointer;
  line-height: 1.5;
  transition: all var(--transition-fast);
  box-shadow: 0px 4px 6px -1px rgb(0 0 0 / 10%);
}

.form-submit-arrow {
  font-size: 15px;
  line-height: 1;
}

.post-content p {
  margin-bottom: 1.5rem;
  font-weight: 400;
  font-size: 18px;
  line-height: 24px;
  letter-spacing: -0.26px;
  vertical-align: middle;
  color: #0a090b;
}

/* Links inside blog post content */
.blog-details-div a,
.post-content a {
  color: var(--primary-color);
  text-underline-offset: 2px;
  transition: color var(--transition-fast);
}

.blog-details-div a:hover,
.post-content a:hover {
  color: var(--primary-dark);
}

.section-box {
  padding-top: 10px;
}

.section-box h2.section-title {
  font-weight: 600;
  font-size: 24px;
  line-height: 120%;
  letter-spacing: -3%;
  vertical-align: middle;
  color: #0a090b;
  margin-bottom: 1.5rem;
}

.post-content-heading {
  font-weight: var(--font-weight-semibold);
  color: #0a090b;
  margin-bottom: 1.75rem;
  font-size: 36px;
  line-height: 120%;
  letter-spacing: -3%;
  vertical-align: middle;
}

/* CTA box */
.post-cta-box {
  background: #f8f8f8;
  border-radius: 14px;
  padding: 1.5rem;
  margin: 2.75rem 0;
}

.post-content .post-cta-box-title {
  margin-bottom: 1rem;
  color: #0a090b;
  font-weight: 500;
  font-size: 36px;
  line-height: 120%;
  letter-spacing: -3%;
  vertical-align: middle;
}

.post-content .post-cta-box-subtitle {
  margin-bottom: 1rem;
  color: #4f4d55;
  font-weight: 400;
  font-size: 18px;
  line-height: 24px;
  letter-spacing: -0.26px;
  vertical-align: middle;
}

.post-cta-box-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  padding: 19px 0;
  margin-bottom: 4rem;
}

.post-cta-feature {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.post-cta-feature-icon {
  line-height: 1;
  flex-shrink: 0;
  padding: 4px;
}

.post-cta-feature-title {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.post-cta-feature-desc {
  color: #0a090b;
  font-weight: 400;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: -0.05px;
  vertical-align: middle;
}

.post-cta-box-link {
  font-weight: var(--font-weight-semibold);
  color: #0a090b;
  transition: color var(--transition-fast);
  font-size: 16px;
  line-height: 22px;
  letter-spacing: -0.18px;
  vertical-align: middle;
}

.post-cta-box-link:hover {
  color: var(--primary-dark);
}

/* In-article image */
.post-figure {
  margin: 3rem 0;
}

.post-inline-image {
  width: 100%;
  height: auto;
  border-radius: var(--border-radius-md);
  display: block;
}

.section-box ol {
  margin-bottom: 3.5rem;
  font-weight: 400;
  font-size: 18px;
  line-height: 24px;
  letter-spacing: -0.26px;
  vertical-align: middle;
  color: #0a090b;
  padding-left: 20px;
}

.section-box ol li {
  margin-bottom: 5px;
}

.post-figcaption {
  margin-top: 12px;
  display: flex;
  align-items: flex-start;
  gap: 2px;
}

.img-data h3 {
  font-weight: 500;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: -0.05px;
  vertical-align: middle;
  color: #0a090b;
  margin: 0;
}

.post-content .img-data p {
  font-weight: 400;
  font-size: 12px;
  line-height: 18px;
  letter-spacing: 0px;
  vertical-align: middle;
  color: #4f4d55;
  margin: 0;
}

.post-figcaption img {
  width: 20px;
  height: auto;
}

/* Blockquote */
.post-quote {
  margin: 2.5rem 0;
  padding: 0 0 0 2rem;
  border-left: 4px solid #ececed;
  border-radius: 0;
}

span.post-quote-icon {
  width: 32px;
  height: 32px;
  display: inline-flex;
  background: #ed5c37;
  border-radius: 6px;
  justify-content: center;
  align-items: center;
  margin-bottom: 1rem;
}

.post-content .post-quote-text {
  font-size: 1.5rem;
  line-height: 1.2;
  color: #0a090b;
  margin-bottom: 1rem;
  font-style: italic;
  letter-spacing: -3%;
}

.post-quote .post-author {
  margin: 0;
  padding: 0;
  border-top: none;
}

span.post-quote-icon img {
  width: 20px;
  height: auto;
}

/* Author bio */
.post-author {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 1.5rem;
  margin-top: 4rem;
  border-top: 1px solid #e6e6e6;
  padding-bottom: 1.5rem;
}

.post-author-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: #d4d1bf;
}

.post-author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-author-info {
  flex: 1;
  min-width: 0;
}

.post-content .post-author-name {
  font-weight: var(--font-weight-semibold);
  color: #0a090b;
  margin-bottom: 0;
  font-size: 12px;
  line-height: 18px;
  letter-spacing: 0px;
  vertical-align: middle;
}

.post-content .post-author-role {
  font-size: 12px;
  color: #4f4d55;
  margin: 0;
  line-height: 1.5;
}


/* ============================================
   Pagination
   ============================================ */
.pagination-root {
  margin-top: 40px;
  text-align: center;
}

.pagination-ul {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.pagination-ul li a,
.pagination-ul li span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  font-size: 14px;
  font-weight: 600;
  color: #0b1120;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.pagination-ul li.active a {
  background-color: var(--primary-color);
  color: #fff;
  border-radius: 50%;
}

.pagination-ul li.prev a,
.pagination-ul li.next a {
  border: 1px solid #f3f4f6;
  border-radius: 50%;
  color: var(--primary-color);
  background: #fff;
}

.pagination-ul li.prev a:hover,
.pagination-ul li.next a:hover {
  background: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
}

.pagination-ul li.disabled span {
  min-width: auto;
  color: #4b5563;
  cursor: default;
}

/* Material icons alignment */
.pagination-ul li a .material-icons {
  font-size: 20px;
  display: block;
}

@media (max-width: 767.98px) {
  .pagination-ul {
    gap: 8px;
  }

  .pagination-ul li a,
  .pagination-ul li span {
    min-width: 32px;
    height: 32px;
    font-size: 13px;
  }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1200px) {
  .blog-hero {
    padding: 6.65rem 0 5.25rem;
  }

  .post-title {
    font-size: 42px;
  }

  .post-header {
    padding: 4rem 0;
  }

  .post-content-wrap {
    margin-top: 0;
  }

  .post-layout {
    gap: 24px;
  }

  .post-content .post-cta-box-title {
    font-size: 30px;
  }

  .post-cta-box-features {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
  }

  .post-content .post-cta-box-subtitle {
    font-size: 17px;
  }

  .post-content p {
    font-size: 16px;
  }

  .sidebar-form-wrapper,
  .post-toc {
    padding: 15px;
  }
}

@media (max-width: 991px) {
  .blog-hero {
    padding: 5rem 0 3.5rem;
  }

  .insights-grid {
    gap: 1.5rem;
  }

  .post-content .post-quote-text {
    font-size: 1.25rem;
  }

  .post-header {
    padding: 3rem 0;
  }

  .post-title {
    font-size: 36px;
  }

  .post-content-heading {
    font-size: 32px;
  }

  .post-content p {
    font-size: 16px;
    margin-bottom: 1.25rem;
  }

  .section-box h2.section-title {
    font-size: 22px;
  }

  .section-box ol {
    font-size: 16px;
    margin-bottom: 1.25rem;
  }

  .post-figure,
  .post-cta-box {
    margin: 2rem 0;
  }

  .post-content .post-cta-box-title {
    font-size: 32px;
  }

  .post-content .post-cta-box-subtitle {
    font-size: 16px;
  }

  .post-detail {
    padding-bottom: 2rem;
  }

  .post-quote {
    margin: 2rem 0;
    padding: 0 0 0 1.5rem;
  }

  .post-layout {
    grid-template-columns: 1fr;
  }

  .post-toc,
  .post-sidebar-form {
    position: static;
    max-height: none;
  }

  .post-toc {
    order: -1;
  }

}

@media (max-width: 767.98px) {
  .blog-toolbar {
    justify-content: flex-end;
    margin-bottom: 1.75rem;
  }

  .blog-hero-title {
    font-size: 36px;
  }

  .blog-hero-desc {
    font-size: 16px;
    margin-bottom: 1.5rem;
  }
}

@media (max-width: 480px) {
  .blog-hero-title {
    font-size: 2rem;
  }

  .blog-toolbar {
    justify-content: stretch;
  }

  .blog-hero {
    padding: 3.5rem 0 3rem;
  }

  .blog-search-wrap {
    max-width: none;
  }
}

.search-results-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.search-results-term {
  color: var(--primary-color);
}

/* No Posts Found Section */
.no-posts-found {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  text-align: center;
  margin-top: 2rem;
  width: 100%;
}

.no-posts-icon {
  width: 64px;
  height: 64px;
  color: var(--primary-color);
  margin-bottom: 24px;
  opacity: 0.8;
}

.no-posts-icon svg {
  width: 100%;
  height: 100%;
}

.no-posts-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.no-posts-desc {
  font-size: 16px;
  color: var(--text-light);
  max-width: 440px;
  margin: 0 auto 32px;
  line-height: 1.5;
}

.no-posts-actions .btn-primary {
  min-width: 180px;
}

/* Blog detail responsive */

@media (max-width: 767.98px) {
  .post-cta-box-features {
    gap: 1rem;
  }

  .post-title {
    font-size: 34px;
  }

  .post-share-row-inner {
    padding-top: 8px;
    padding-bottom: 16px;
  }

  .post-content-heading {
    font-size: 28px;
  }

  .post-content .post-cta-box-title {
    font-size: 28px;
  }

  .post-content .post-quote-text {
    font-size: 18px;
  }
}

@media (max-width: 600px) {
  .post-cta-box-features {
    grid-template-columns: 1fr;
  }

  .post-share-row-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .post-author {
    flex-direction: row;
    align-items: flex-start;
    padding-bottom: 0;
    margin-top: 2rem;
  }

  .post-quote .post-author {
    flex-direction: row;
  }

  .post-author .post-share {
    width: 100%;
  }

  .post-title {
    font-size: 28px;
  }

  .post-header {
    padding: 2.5rem 0 2rem;
  }

  .post-content-heading {
    font-size: 24px;
    margin-bottom: 1.25rem;
  }

  .post-content p {
    font-size: 14px;
    margin-bottom: 1rem;
  }

  .post-content ol {
    font-size: 14px;
    margin-bottom: 1rem;
  }

  .post-cta-box {
    padding: 1.125rem;
  }

  .post-content .post-cta-box-title {
    font-size: 24px;
  }

  .post-cta-box-features {
    margin-bottom: 2rem;
  }

  .post-content .post-cta-box-subtitle,
  .post-cta-box-link {
    font-size: 14px;
  }

  .post-quote {
    margin: 1.5rem 0;
    padding: 0 0 0 1rem;
    border-width: 3px;
  }

  .post-content .post-quote-text {
    font-size: 16px;
  }

  .post-share-icons {
    width: 100%;
  }

  .section-box h2.section-title {
    font-size: 20px;
    margin-bottom: 1.25rem;
  }

  .sidebar-form-title {
    font-size: 16px;
  }

  .toc-title {
    font-size: 16px;
  }
}