/* ===================================
   BLOG PAGE STYLES — Light Theme
   Matches the main site style.css
   =================================== */

/* Blog Header */
.blog-header {
  background: var(--bg-accent);
  border-bottom: 2px solid var(--border-color);
  padding: 4rem 0 3rem;
}

.blog-header .badge {
  padding: 0.4rem 0.9rem;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.8125rem;
  background: rgba(78, 205, 196, 0.12) !important;
  color: var(--primary-dark) !important;
  border: 1px solid rgba(78, 205, 196, 0.3);
}

.blog-header h1 {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(1.75rem, 4.5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

.blog-header .lead {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Author Avatar */
.author-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
  box-shadow: var(--shadow-light);
}

.author-avatar-large {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary);
  box-shadow: var(--shadow-medium);
  flex-shrink: 0;
}

/* ===================================
   Blog Content Wrapper
   =================================== */
.blog-content {
  max-width: 860px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-secondary);
  background: var(--bg-secondary);
}

/* Headings */
.blog-content h2 {
  font-family: 'Poppins', sans-serif;
  color: var(--text-primary);
  margin-top: 3rem;
  margin-bottom: 1.25rem;
  font-weight: 700;
  font-size: 1.875rem;
  scroll-margin-top: 80px;
}

.blog-content h3 {
  font-family: 'Poppins', sans-serif;
  color: var(--text-primary);
  margin-top: 2rem;
  margin-bottom: 0.875rem;
  font-weight: 600;
  font-size: 1.375rem;
  scroll-margin-top: 80px;
}

.blog-content h4 {
  font-family: 'Poppins', sans-serif;
  color: var(--text-primary);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
  font-size: 1.125rem;
}

.blog-content h5 {
  font-family: 'Poppins', sans-serif;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  font-weight: 600;
  font-size: 1rem;
}

.blog-content p {
  margin-bottom: 1.25rem;
  color: var(--text-secondary);
}

.blog-content ul,
.blog-content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.blog-content li {
  margin-bottom: 0.625rem;
  color: var(--text-secondary);
}

.blog-content strong {
  color: var(--text-primary);
  font-weight: 600;
}

.blog-content code {
  background: var(--bg-accent);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 0.15em 0.45em;
  font-size: 0.875em;
  color: var(--primary-dark);
}

/* Author Box */
.author-box {
  background: var(--bg-accent);
  border-left: 4px solid var(--primary);
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  border-radius: 0 12px 12px 0;
  border-top: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.author-box p {
  margin: 0;
  color: var(--text-secondary);
}

/* Table of Contents */
.table-of-contents {
  background: var(--bg-accent);
  padding: 1.5rem;
  border-radius: 12px;
  margin: 2rem 0;
  border: 2px solid var(--border-color);
}

.table-of-contents h4 {
  color: var(--text-primary);
  margin-bottom: 1rem;
  font-weight: 600;
  font-size: 1rem;
}

.table-of-contents ul {
  margin-bottom: 0;
  padding-left: 0;
  list-style: none;
}

.table-of-contents ul li {
  margin-bottom: 0.5rem;
  padding-left: 1.25rem;
  position: relative;
}

.table-of-contents ul li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: bold;
}

.table-of-contents a {
  color: var(--primary-dark);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.table-of-contents a:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* Key Takeaway Box */
.key-takeaway {
  background: rgba(78, 205, 196, 0.08);
  border-left: 4px solid var(--primary);
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  border-radius: 0 12px 12px 0;
  border-top: 1px solid rgba(78, 205, 196, 0.25);
  border-right: 1px solid rgba(78, 205, 196, 0.25);
  border-bottom: 1px solid rgba(78, 205, 196, 0.25);
}

.key-takeaway h5 {
  color: var(--primary-dark);
  margin-bottom: 0.625rem;
}

.key-takeaway p,
.key-takeaway ul {
  color: var(--text-secondary);
  margin-bottom: 0;
}

.key-takeaway ul {
  padding-left: 1.5rem;
  margin-top: 0.625rem;
}

.key-takeaway li {
  margin-bottom: 0.4rem;
}

/* Section Divider */
.section-divider {
  border: 0;
  height: 2px;
  background: var(--border-color);
  margin: 3rem 0;
}

/* Chart / Info Container */
.chart-container {
  margin: 2rem 0;
  padding: 1.5rem;
  background: var(--bg-accent);
  border-radius: 12px;
  border: 2px solid var(--border-color);
}

.chart-container h5 {
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  font-weight: 600;
}

/* External Links */
.external-link {
  color: var(--primary-dark);
  text-decoration: none;
  border-bottom: 1px dotted var(--primary);
  transition: all 0.2s ease;
}

.external-link:hover {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* ===================================
   TABLE STYLES
   =================================== */

.blog-content .table {
  width: 100%;
  margin: 1.5rem 0;
  border-collapse: collapse;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-light);
  border: 2px solid var(--border-color);
}

.table-responsive {
  border-radius: 12px;
  overflow: hidden;
  margin: 1.5rem 0;
  border: 2px solid var(--border-color);
  box-shadow: var(--shadow-light);
}

.table-responsive .table {
  margin: 0;
  border-radius: 0;
  box-shadow: none;
  border: none;
}

/* Table Headers */
.blog-content .table thead th {
  background: var(--bg-accent);
  color: var(--text-primary);
  font-weight: 700;
  border-bottom: 2px solid var(--border-color);
  padding: 0.875rem 1rem;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  vertical-align: middle;
}

.blog-content .table-dark thead th,
.blog-content .table thead.table-dark th {
  background: var(--text-primary);
  color: #fff;
  border-bottom: 2px solid var(--primary);
}

/* Table Body */
.blog-content .table tbody td {
  border-bottom: 1px solid var(--border-color);
  padding: 0.875rem 1rem;
  vertical-align: middle;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.blog-content .table tbody tr:last-child td {
  border-bottom: none;
}

.blog-content .table tbody tr:hover td {
  background: rgba(78, 205, 196, 0.06);
  color: var(--text-primary);
}

/* Striped */
.blog-content .table-striped tbody tr:nth-of-type(odd) td {
  background: var(--bg-accent);
}

/* Bordered */
.blog-content .table-bordered td,
.blog-content .table-bordered th {
  border: 1px solid var(--border-color);
}

/* Comparison Table */
.comparison-table {
  margin: 2rem 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-medium);
  border: 2px solid var(--border-color);
}

.comparison-table .table {
  margin: 0;
  border: none;
  box-shadow: none;
}

.comparison-table .table tbody td strong {
  color: var(--text-primary);
  font-weight: 600;
  display: block;
}

.comparison-table .table tbody td small {
  color: var(--text-light);
  font-size: 0.8125rem;
  display: block;
  font-style: italic;
}

/* ===================================
   ACCORDION (FAQ)
   =================================== */

.accordion {
  --bs-accordion-bg: var(--bg-secondary);
  --bs-accordion-border-color: var(--border-color);
  --bs-accordion-btn-bg: var(--bg-secondary);
  --bs-accordion-active-bg: rgba(78, 205, 196, 0.06);
  --bs-accordion-btn-color: var(--text-primary);
  --bs-accordion-active-color: var(--text-primary);
}

.accordion-item {
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  margin-bottom: 0.75rem;
  border-radius: 12px !important;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.accordion-item:hover {
  border-color: var(--primary);
}

.accordion-button {
  color: var(--text-primary);
  font-weight: 600;
  padding: 1.125rem 1.25rem;
  font-size: 0.9375rem;
  background: var(--bg-secondary);
}

.accordion-button:not(.collapsed) {
  background: rgba(78, 205, 196, 0.06);
  color: var(--text-primary);
  box-shadow: none;
  border-bottom: 1px solid var(--border-color);
}

.accordion-button:focus {
  box-shadow: 0 0 0 0.2rem rgba(78, 205, 196, 0.2);
  border-color: var(--primary);
}

.accordion-button::after {
  filter: none;
}

.accordion-body {
  color: var(--text-secondary);
  padding: 1.125rem 1.25rem;
  background: var(--bg-secondary);
  line-height: 1.7;
}

/* ===================================
   BUTTONS
   =================================== */

.blog-content .btn-primary {
  background: var(--gradient-primary);
  border: none;
  padding: 0.75rem 1.75rem;
  font-weight: 600;
  border-radius: 12px;
  box-shadow: var(--shadow-medium);
  transition: all 0.3s ease;
  color: #fff;
}

.blog-content .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  color: #fff;
}

.blog-content .btn-outline-primary {
  border: 2px solid var(--primary);
  color: var(--primary-dark);
  background: transparent;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.blog-content .btn-outline-primary:hover {
  background: rgba(78, 205, 196, 0.1);
  border-color: var(--primary-dark);
  color: var(--primary-dark);
  transform: translateY(-2px);
}

.blog-content .btn-outline-secondary {
  border: 2px solid var(--border-color);
  color: var(--text-secondary);
  background: transparent;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.blog-content .btn-outline-secondary:hover {
  background: var(--bg-accent);
  border-color: var(--primary);
  color: var(--text-primary);
  transform: translateY(-2px);
}

/* ===================================
   UTILITY
   =================================== */

.border-top {
  border-top: 2px solid var(--border-color) !important;
}

.text-muted {
  color: var(--text-light) !important;
}

/* Concept cards grid */
.blog-content .row.g-3 .chart-container {
  margin: 0;
}

/* ===================================
   RESPONSIVE
   =================================== */

@media (max-width: 768px) {
  .blog-header {
    padding: 2.5rem 0 2rem;
  }

  .blog-header h1 {
    font-size: 1.625rem;
  }

  .blog-content {
    padding: 2rem 1rem 3rem;
    font-size: 0.9375rem;
  }

  .blog-content h2 {
    font-size: 1.5rem;
    margin-top: 2rem;
  }

  .blog-content h3 {
    font-size: 1.25rem;
  }

  .blog-content .table thead th,
  .blog-content .table tbody td {
    padding: 0.625rem 0.75rem;
    font-size: 0.875rem;
  }

  .author-box,
  .table-of-contents,
  .key-takeaway,
  .chart-container {
    padding: 1rem 1.125rem;
  }

  .author-avatar { width: 40px; height: 40px; }
  .author-avatar-large { width: 64px; height: 64px; }
}

@media (max-width: 576px) {
  .blog-content .table thead th,
  .blog-content .table tbody td {
    padding: 0.5rem 0.625rem;
    font-size: 0.8125rem;
  }

  .author-avatar { width: 36px; height: 36px; }
  .author-avatar-large { width: 56px; height: 56px; }
}
