/* ==========================================================================
   BLOG.CSS — Self-contained stylesheet for all blog/resource pages
   Includes: CSS variables, reset, header, nav, footer, share bar,
             scroll-to-top, breadcrumb, TOC, article, dark mode
   ========================================================================== */

/* ==========================================================================
   1. CSS Variables & Reset
   ========================================================================== */
:root {
  --primary-color:    #E1306C;
  --secondary-color:  #5851DB;
  --accent-color:     #405DE6;
  --background-color: #f5f5f5;
  --text-color:       #333;
  --light-text-color: #fff;
}

@font-face { font-display: swap; }
*, body, html { padding: 0; margin: 0; }
* { box-sizing: border-box; font-display: swap; }
html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f5f5f5;
  color: var(--text-color);
  line-height: 1.6;
}

/* ==========================================================================
   2. Scroll Progress Bar
   ========================================================================== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: transparent;
  z-index: 9999;
  pointer-events: none;
}
.scroll-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--accent-color));
  transition: width 0.1s linear;
}

/* ==========================================================================
   3. Announcement Bar
   ========================================================================== */
.top-announcement-bar {
  background-color: #fff;
  color: #1a1a1a;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  padding: 8px 15px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  z-index: 1001;
  letter-spacing: 0.5px;
}
.static-flag {
  width: 16px;
  height: auto;
  border-radius: 2px;
}

/* ==========================================================================
   4. Header & Navigation
   ========================================================================== */
header {
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color), var(--accent-color));
  background-size: 400% 400%;
  padding: 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  text-align: center;
  animation: gradientShift 10s infinite ease;
}

.header-container {
  max-width: 900px; /* Changed from 1200px to match homepage */
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 20px;
  background-color: #fff;
  position: relative;
  z-index: 100;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.logo {
  font-size: 1.75rem;
  font-weight: 700;
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color), var(--accent-color));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-decoration: none;
  white-space: nowrap;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Main nav */
nav#main-nav a {
  font-weight: 600;
  color: var(--text-color);
  text-decoration: none;
}
nav#main-nav ul {
  list-style: none;
  display: flex;
  gap: 1rem;
  margin: 0;
  padding: 0;
  flex-wrap: nowrap;
  align-items: center;
}
nav#main-nav ul li { margin: 0; }
nav#main-nav ul li a:not(.fb-chat-btn) {
  white-space: nowrap;
  font-size: 0.9rem;
}

/* CTA pill button in nav */
.fb-chat-btn {
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color), var(--accent-color));
  color: #fff !important;
  padding: 10px 20px;
  border-radius: 50px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  display: inline-block;
  font-size: 0.9rem;
}

/* Dark mode toggle */
.dark-mode-toggle {
  background: transparent;
  border: none;
  color: var(--text-color);
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  transition: color 0.2s, transform 0.3s;
}
.dark-mode-toggle:hover { transform: scale(1.1); color: var(--primary-color); }

/* Hamburger toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  padding: 0;
  cursor: pointer;
}
.menu-toggle span {
  display: block;
  height: 3px;
  background: var(--text-color);
  border-radius: 2px;
  transition: background 0.2s, transform 0.3s, opacity 0.3s;
}
.menu-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ==========================================================================
   5. Breadcrumb
   ========================================================================== */
.breadcrumb {
  max-width: 1200px;
  margin: 1rem auto;
  padding: 0 1.5rem;
  font-size: 0.875rem;
  font-family: Roboto, sans-serif;
}
.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  padding: 0;
  margin: 0;
}
.breadcrumb li {
  display: flex;
  align-items: center;
  color: #737373;
}
.breadcrumb li + li::before {
  content: '›';
  margin: 0 0.4rem;
  color: #b0b0b0;
}
.breadcrumb a {
  color: var(--primary-color);
  text-decoration: none;
}
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb li[aria-current="page"] {
  color: #333;
  font-weight: 500;
}

/* ==========================================================================
   6. Blog Two-Column Layout
   ========================================================================== */
.blog-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 3rem;
  align-items: start;
}

/* ==========================================================================
   7. Article
   ========================================================================== */
.blog-article {
  min-width: 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
  overflow: hidden;
}

.article-header {
  background: #fff !important; /* Forces the background to white, overriding the global header gradient */
  padding: 2rem 2rem 1.5rem;
  border-bottom: 1px solid #f0f0f0;
  text-align: left; /* Ensures title stays left-aligned even if global header is centered */
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
  color: #737373 !important; /* Ensures the text color is gray and readable */
}

.article-meta .meta-item,
.article-meta .meta-item span {
  color: #737373 !important; /* Forces individual items to stay gray */
}

.article-title {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.25;
  color: #1a1a1a !important; /* Ensures the main title is dark black */
  margin: 0.75rem 0 1rem;
  font-family: Roboto, sans-serif;
}
.article-excerpt {
  font-size: 1.1rem;
  line-height: 1.75;
  color: #555;
  margin: 0;
  padding: 1rem 1.25rem;
  background: #f8f8f8;
  border-left: 4px solid var(--primary-color);
  border-radius: 0 8px 8px 0;
}

/* Article body */
.article-content {
  padding: 2rem;
  font-size: 1rem;
  line-height: 1.8;
  color: #2c2c2c;
}
.article-content p { margin: 0 0 1.25rem; }
.article-content h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #f0f0f0;
  text-align: left;
  font-family: Roboto, sans-serif;
  scroll-margin-top: 80px;
}
.article-content h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-color);
  margin: 2rem 0 0.75rem;
  text-align: left;
  font-family: Roboto, sans-serif;
  scroll-margin-top: 80px;
}
.article-content h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #333;
  margin: 1.5rem 0 0.5rem;
  font-family: Roboto, sans-serif;
}
.article-content ul,
.article-content ol {
  margin: 0 0 1.25rem 1.5rem;
  padding: 0;
}
.article-content li { margin-bottom: 0.5rem; line-height: 1.7; }
.article-content ul li { list-style-type: disc; }
.article-content ol li { list-style-type: decimal; }
.article-content a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid rgba(225, 48, 108, 0.3);
  transition: border-color 0.2s;
}
.article-content a:hover { border-bottom-color: var(--primary-color); }
.article-content strong { font-weight: 700; color: #1a1a1a; }

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.article-content table th {
  background: #f5f5f5;
  padding: 12px 14px;
  text-align: left;
  font-weight: 700;
  color: #333;
  border: 1px solid #e0e0e0;
  font-size: 0.9rem;
}
.article-content table td {
  padding: 10px 14px;
  border: 1px solid #e0e0e0;
  vertical-align: top;
  line-height: 1.5;
}
.article-content table tr:nth-child(even) td { background: #fafafa; }

.article-content figure { margin: 1.5rem 0; text-align: center; }
.article-content figure img {
  max-width: 100%;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}
.article-content figcaption {
  font-size: 0.85rem;
  color: #737373;
  margin-top: 0.5rem;
  font-style: italic;
}

/* FAQ accordion */
.article-content details {
  background: #f9f9f9;
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  border: 1px solid #ebebeb;
  transition: background 0.2s;
}
.article-content details[open] { background: #fff; }
.article-content summary {
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  list-style: none;
  color: #1a1a1a;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.article-content summary::-webkit-details-marker { display: none; }
.article-content summary::before {
  content: '▶';
  font-size: 0.75rem;
  color: var(--primary-color);
  transition: transform 0.2s;
  flex-shrink: 0;
}
.article-content details[open] summary::before { transform: rotate(90deg); }
.article-content details p { margin-top: 1rem; margin-bottom: 0; }

/* ==========================================================================
   8. Table of Contents — Desktop Sidebar
   ========================================================================== */
.toc-sidebar {
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}
.toc-sidebar::-webkit-scrollbar { width: 4px; }
.toc-sidebar::-webkit-scrollbar-track { background: transparent; }
.toc-sidebar::-webkit-scrollbar-thumb { background: #e0e0e0; border-radius: 2px; }

.toc-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
  padding: 1.25rem;
}
.toc-title {
  font-size: 1rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #f0f0f0;
  font-family: Roboto, sans-serif;
  text-align: left;
}
.toc-list { list-style: none; padding: 0; margin: 0; }
.toc-item { margin: 0; }
.toc-item.h2 { margin-top: 0.25rem; }
.toc-item.h3 { padding-left: 0.875rem; }
.toc-item.h4 { padding-left: 1.75rem; }
.toc-link {
  display: block;
  padding: 0.35rem 0.5rem;
  font-size: 0.875rem;
  color: #555;
  text-decoration: none;
  border-radius: 4px;
  line-height: 1.4;
  border-left: 2px solid transparent;
  transition: all 0.2s;
}
.toc-link:hover { color: var(--primary-color); background: #fef0f4; }
.toc-link.active {
  color: var(--primary-color);
  font-weight: 600;
  border-left-color: var(--primary-color);
  background: #fef0f4;
}

/* ==========================================================================
   9. Mobile TOC Button & Panel
   ========================================================================== */
.mobile-toc-toggle {
  display: none;
  position: fixed;
  bottom: 5rem;
  right: 1rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
  color: #fff;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  z-index: 900;
  box-shadow: 0 4px 12px rgba(225, 48, 108, 0.4);
  align-items: center;
  justify-content: center;
}
.mobile-toc-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 950;
  backdrop-filter: blur(4px);
}
.mobile-toc-overlay.active { display: block; }
.mobile-toc-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 20px 20px 0 0;
  max-height: 70vh;
  overflow-y: auto;
  z-index: 951;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 -4px 24px rgba(0,0,0,0.15);
}
.mobile-toc-panel.active { transform: translateY(0); }
.mobile-toc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem 0.75rem;
  border-bottom: 1px solid #f0f0f0;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}
.mobile-toc-title {
  font-size: 1rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: Roboto, sans-serif;
  text-align: left;
}
.mobile-toc-close {
  background: none;
  border: none;
  font-size: 1.1rem;
  color: #737373;
  cursor: pointer;
  padding: 4px 8px;
}
.mobile-toc-content { padding: 0.75rem 1.5rem 2rem; }
.mobile-toc-list { list-style: none; padding: 0; margin: 0; }
.mobile-toc-link {
  display: block;
  padding: 0.6rem 0.5rem;
  font-size: 0.95rem;
  color: #333;
  text-decoration: none;
  border-bottom: 1px solid #f5f5f5;
  transition: color 0.2s;
}
.mobile-toc-link:hover,
.mobile-toc-link.active { color: var(--primary-color); font-weight: 600; }

/* ==========================================================================
   10. Scroll-to-top Button
   ========================================================================== */
#scroll-to-top {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(225, 48, 108, 0.3);
  transition: transform 0.3s, opacity 0.3s;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 800;
}
#scroll-to-top:hover { transform: scale(1.1); }

/* ==========================================================================
   11. Floating Share Bar
   ========================================================================== */
.floating-share {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 999;
}
.share-bar {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 30px 12px;
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(12px);
  border-radius: 0 30px 30px 0;
  box-shadow: 4px 8px 25px rgba(0,0,0,.18);
  transform: translateX(-100%);
  transition: transform 0.35s cubic-bezier(.25, .46, .45, .94);
}
.floating-share.open .share-bar { transform: translateX(0); }
.share-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 22px;
  box-shadow: 0 3px 12px rgba(0,0,0,.15);
  transition: transform 0.2s;
  text-decoration: none !important;
}
.share-btn:hover { transform: scale(1.1); }
.share-btn.whatsapp  { background: #25D366; }
.share-btn.facebook  { background: #1877F2; }
.share-btn.twitter   { background: #000; }
.share-btn.telegram  { background: #0088cc; }
.share-btn.pinterest { background: #E60023; }
.share-btn.copy      { background: linear-gradient(45deg, var(--primary-color), var(--secondary-color)); }

.share-toggle {
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  width: 45px;
  height: 45px;
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(12px);
  border-radius: 50%;
  box-shadow: 4px 8px 25px rgba(0,0,0,.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #333;
  cursor: pointer;
  border: none;
  transition: all 0.3s;
}
.share-toggle:hover { transform: translateY(-50%) scale(1.1); }
.share-toggle i { transition: transform 0.35s; }
.floating-share.open .share-toggle i { transform: rotate(180deg); }

/* ==========================================================================
   12. Copy Indicator Toast
   ========================================================================== */
.copy-indicator {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  z-index: 99999;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.copy-indicator.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   13. Bookmark Banner
   ========================================================================== */
.bookmark-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  backdrop-filter: blur(4px);
}
.bookmark-overlay.show { display: block; }
.bookmark-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 20px 20px 0 0;
  padding: 2rem 1.5rem 2.5rem;
  z-index: 1001;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.15);
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.bookmark-banner.show { transform: translateY(0); }
.bookmark-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: #f0f0f0;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
}
.bookmark-btn-secondary {
  background: none;
  border: 1px solid #ddd;
  padding: 0.6rem 1.25rem;
  border-radius: 8px;
  font-size: 0.9rem;
  cursor: pointer;
  color: #555;
  margin-top: 0.75rem;
}

/* ==========================================================================
   14. Footer
   ========================================================================== */
footer {
  background: #333;
  color: #fff;
  margin-top: 2rem;
  border-top: 4px solid transparent;
  border-image: linear-gradient(45deg, var(--primary-color), var(--secondary-color)) 1;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}
.footer-about .footer-logo {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-decoration: none;
  margin-bottom: 0.5rem;
  display: inline-block;
}
.footer-about p { font-size: 0.9rem; line-height: 1.4; color: #fff; margin: 0; }
.footer-col h3 { font-size: 1.1rem; margin-bottom: 0.75rem; color: #fff; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 0.5rem; }
.footer-col a { color: #fff; text-decoration: none; font-size: 0.95rem; opacity: 0.9; transition: opacity 0.2s; }
.footer-col a:hover { opacity: 1; text-decoration: underline; }
.footer-bottom {
  border-top: 1px solid #444;
  text-align: center;
  padding: 1rem;
  font-size: 0.85rem;
  color: #bbb;
}
.footer-bottom a { color: #bbb; }

footer .social-icons {
  display: flex;
  gap: 1.2rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}
footer .social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
  color: #fff;
  text-decoration: none;
  transition: all 0.3s;
  opacity: 0.9;
}
footer .social-icon:hover {
  opacity: 1;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(225, 48, 108, 0.3);
}

/* ==========================================================================
   15. Skip Link (accessibility)
   ========================================================================== */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary-color);
  color: #fff;
  padding: 8px;
  z-index: 10000;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* ==========================================================================
   16. Animations
   ========================================================================== */
@keyframes gradientShift {
  0%, 100% { background-position: 0 50%; }
  50%       { background-position: 100% 50%; }
}

/* ==========================================================================
   17. Dark Mode
   ========================================================================== */
body.dark-mode {
  --background-color: #121212;
  --text-color: #e0e0e0;
  background: #121212;
}
body.dark-mode header,
body.dark-mode .header-container,
body.dark-mode .top-announcement-bar {
  background-color: #1e1e1e;
  color: #e0e0e0;
  border-color: #333;
}
body.dark-mode .menu-toggle span { background: #e0e0e0; }
body.dark-mode .dark-mode-toggle { color: #e0e0e0; }
body.dark-mode .breadcrumb li { color: #888; }
body.dark-mode .breadcrumb li[aria-current="page"] { color: #ddd; }
body.dark-mode .blog-article,
body.dark-mode .toc-card { background: #1e1e1e; box-shadow: 0 2px 12px rgba(0,0,0,0.3); }
body.dark-mode .article-header { border-bottom-color: #333; }
body.dark-mode .article-title,
body.dark-mode .article-content h2,
body.dark-mode .article-content h4,
body.dark-mode .article-content strong { color: #f0f0f0; }
body.dark-mode .article-content { color: #ccc; }
body.dark-mode .article-content h3 { color: #f06090; }
body.dark-mode .article-content h2 { border-bottom-color: #333; }
body.dark-mode .article-excerpt { background: #252525; color: #ccc; }
body.dark-mode .article-content table th { background: #2a2a2a; color: #ddd; border-color: #333; }
body.dark-mode .article-content table td { border-color: #333; color: #ccc; }
body.dark-mode .article-content table tr:nth-child(even) td { background: #222; }
body.dark-mode .article-content details { background: #252525; border-color: #333; }
body.dark-mode .article-content details[open] { background: #1e1e1e; }
body.dark-mode .article-content summary { color: #f0f0f0; }
body.dark-mode .meta-item { color: #888; }
body.dark-mode .toc-link { color: #aaa; }
body.dark-mode .toc-link:hover,
body.dark-mode .toc-link.active { background: #2a1520; color: #f06090; }
body.dark-mode .toc-title { color: #f0f0f0; border-bottom-color: #333; }
body.dark-mode .mobile-toc-panel,
body.dark-mode .mobile-toc-header { background: #1e1e1e; }
body.dark-mode .mobile-toc-link { color: #ccc; border-bottom-color: #333; }
body.dark-mode .bookmark-banner { background: #1e1e1e; }
body.dark-mode footer { background: #0a0a0a; }
body.dark-mode .share-bar,
body.dark-mode .share-toggle { background: rgba(30,30,30,0.95); color: #e0e0e0; }
body.dark-mode nav#main-nav { background-color: #1e1e1e; }
body.dark-mode nav#main-nav a { color: #e0e0e0; }

/* ==========================================================================
   18. Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .blog-layout { grid-template-columns: 1fr; }
  .toc-sidebar { display: none; }
  .mobile-toc-toggle { display: flex; }
  .menu-toggle { display: flex; }
  nav#main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    flex-direction: column;
    padding: 1rem 0;
    z-index: 100;
    border-radius: 0 0 12px 12px;
  }
  nav#main-nav.open { display: flex; }
  nav#main-nav ul { flex-direction: column; gap: 1rem; padding: 0 1.5rem; }
  body.dark-mode nav#main-nav { background-color: #1e1e1e; }
}
@media (max-width: 768px) {
  .blog-layout { padding: 1rem; }
  .article-header { padding: 1.25rem; }
  .article-content { padding: 1.25rem; }
  .article-title { font-size: 1.5rem; }
  .article-content h2 { font-size: 1.3rem; }
  .footer-container { grid-template-columns: 1fr; text-align: center; padding: 1.5rem 1rem; }
  footer .social-icons { justify-content: center; }
  .dark-mode-toggle { width: 32px; height: 32px; font-size: 1.25rem; }
  .header-actions { gap: 12px; }
}
@media (max-width: 480px) {
  .article-content table { font-size: 0.8rem; }
  .article-content table th,
  .article-content table td { padding: 8px; }
  .share-btn { width: 40px; height: 40px; font-size: 18px; }
  .share-bar { padding: 25px 10px; }
}