/* =====================================================================
   CODESENZE – Blog Detail Page Extension
   Extends: assets/css/about-modern.css
   ===================================================================== */

.blog-hero-sec {
  padding-bottom: clamp(60px, 7vw, 90px);
}

.blog-hero-meta {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 20px;
}

.blog-hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.blog-hero-meta svg {
  width: 16px;
  height: 16px;
  stroke: var(--ab-cyan);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.blog-details-title {
  font-size: clamp(28px, 4vw, 46px) !important;
  line-height: 1.15 !important;
}

/* Layout Grid */
.bd-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 48px;
  align-items: start;
}

/* Ensure content body is always fully visible (bypassing reveal opacity issues) */
.bd-main-article,
.bd-content-body, 
.bd-content-body * {
  opacity: 1 !important;
  transform: none !important;
}

/* Main Article Thumb */
.bd-featured-thumb {
  border-radius: var(--ab-r);
  overflow: hidden;
  margin-bottom: 36px;
  border: 1px solid var(--ab-line);
  background: var(--ab-soft);
  max-height: 520px;
}

.bd-featured-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Typography and High-Readability Content Body */
.bd-content-body {
  color: #233446;
  font-size: 16.5px;
  line-height: 1.8;
}

.bd-content-body p {
  margin-bottom: 22px;
  color: #33445c; /* Higher contrast for effortless reading */
}

.bd-content-body h2 {
  font-size: clamp(22px, 2.4vw, 26px) !important;
  font-weight: 600;
  margin: 32px 0 14px 0 !important; /* Tightened gap between heading and content/tables */
  color: var(--ab-ink);
  letter-spacing: -0.02em;
}

.bd-content-body h3 {
  font-size: clamp(18px, 2vw, 24px) !important;
  font-weight: 600;
  margin: 26px 0 12px 0 !important;
  color: var(--ab-ink);
}

/* List Styling: Added right & left margins + clear readability */
.bd-content-body ul, 
.bd-content-body ol {
  margin: 16px 24px 24px 20px;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bd-content-body ul {
  list-style: disc;
}

.bd-content-body ol {
  list-style: decimal;
}

.bd-content-body li {
  font-size: 16px;
  color: #33445c;
  line-height: 1.6;
}

.bd-content-body a {
  color: var(--ab-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.bd-content-body a:hover {
  color: var(--ab-navy);
}

/* Modernized Tables with Correct Spacing */
.bd-content-body table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 18px 0 28px 0; /* Tightened top margin to eliminate wide gap */
  border-radius: 14px;
  /*overflow: hidden;*/
  border: 1px solid rgba(11, 27, 46, 0.1);
  background: #fff;
  box-shadow: 0 10px 30px -10px rgba(11, 27, 46, 0.04);
}

.bd-content-body th, 
.bd-content-body td {
  padding: 15px 18px;
  border-bottom: 1px solid rgba(11, 27, 46, 0.08);
  text-align: left;
  font-size: 14.5px;
  color: #233446;
}

.bd-content-body tr:last-child td {
  border-bottom: none;
}

.bd-content-body th {
  background: #f4f8fc;
  font-weight: 600;
  color: var(--ab-ink);
  border-bottom: 2px solid rgba(11, 27, 46, 0.12);
}

/* Sidebar Styling */
.bd-sidebar {
  position: sticky;
  top: 40px;
}

.bd-widget {
  background: #fff;
  border: 1px solid var(--ab-line);
  border-radius: var(--ab-r);
  padding: 32px 28px;
  box-shadow: 0 16px 36px -12px rgba(11, 27, 46, 0.05);
}

.bd-widget-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 24px;
  color: var(--ab-ink);
  padding-bottom: 12px;
  border-bottom: 2px solid var(--ab-soft);
}

.bd-recent-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.bd-sidebar-item {
  display: flex;
  gap: 16px;
  align-items: center;
}

.bd-sidebar-thumb {
  flex: 0 0 80px;
  height: 70px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--ab-soft);
  border: 1px solid var(--ab-line);
}

.bd-sidebar-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.bd-sidebar-item:hover .bd-sidebar-thumb img {
  transform: scale(1.08);
}

.bd-thumb-fallback {
  width: 100%;
  height: 100%;
  background: var(--ab-navy);
}

.bd-sidebar-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bd-date {
  font-size: 12px;
  color: var(--ab-muted);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.bd-date svg {
  width: 13px;
  height: 13px;
  stroke: var(--ab-blue);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bd-sidebar-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  margin: 0;
}

.bd-sidebar-title a {
  color: var(--ab-ink);
  text-decoration: none;
  transition: color 0.3s ease;
}

.bd-sidebar-title a:hover {
  color: var(--ab-blue);
}

/* Responsive Media Queries */
@media (max-width: 991.98px) {
  .bd-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .bd-sidebar {
    position: static;
  }
}

/* FAQ CTA spacing and alignment */
.blog-details-page .ab-cta-sec {
    padding-top: 80px !important;
    padding-bottom: 80px !important;
}

.blog-details-page .ab-cta-sec .small-container {
    width: 100%;
    margin-left: auto !important;
    margin-right: auto !important;
}

.blog-details-page .ab-cta-sec .ab-cta {
    width: 100%;
    margin: 0 auto !important;
    text-align: center !important;
}

.blog-details-page .ab-cta-sec .ab-cta .ab-h2 {
    max-width: 860px;
    margin: 0 auto 20px !important;
    text-align: center !important;
}

.blog-details-page .ab-cta-sec .ab-cta p {
    max-width: 660px;
    margin: 0 auto 36px !important;
    text-align: center !important;
}

.blog-details-page .ab-cta-sec .ab-actions {
    justify-content: center !important;
}

@media (max-width: 767px) {
    .blog-details-page .ab-cta-sec {
        padding-top: 50px !important;
        padding-bottom: 50px !important;
    }
}