/* ========================================================================
   OPUS 4.5 DARK MODE - Single Source of Truth
   Consolidated from style.css scattered blocks
   ======================================================================== */

/* ========================================================================
   1. CSS VARIABLE OVERRIDES
   Auto-detect system preference + manual toggle support
   ======================================================================== */

@media (prefers-color-scheme: dark) {
  :root {
    /* Base Colors */
    --color-bg-primary: #111827;
    --color-bg-secondary: #1F2937;
    --color-bg-tertiary: #374151;

    /* Text Colors */
    --color-text-primary: #F9FAFB;
    --color-text-secondary: #F3F4F6;
    --color-text-tertiary: #D1D5DB;

    /* Burgundy - Adjusted for dark contrast */
    --color-burgundy: #DC2626;
    --color-burgundy-dark: #B91C1C;
    --color-burgundy-light: #F87171;

    /* Cream - Dark equivalents */
    --color-cream: #374151;
    --color-cream-light: #4B5563;
    --color-cream-dark: #1F2937;

    /* Charcoal - Inverted */
    --color-charcoal: #F9FAFB;
    --color-charcoal-light: #F3F4F6;

    /* Borders */
    --color-border: #374151;
    --color-border-light: #4B5563;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);

    /* Design system overrides */
    --color-ivory: #1F2937;
    --color-graphite: #F9FAFB;
    --color-slate: #9CA3AF;
    --color-sky: #60A5FA;
  }
}

/* Manual toggle fallback */
body.dark-mode {
  --color-bg-primary: #111827;
  --color-bg-secondary: #1F2937;
  --color-bg-tertiary: #374151;
  --color-text-primary: #F9FAFB;
  --color-text-secondary: #F3F4F6;
  --color-text-tertiary: #D1D5DB;
  --color-burgundy: #DC2626;
  --color-burgundy-dark: #B91C1C;
  --color-burgundy-light: #F87171;
  --color-cream: #374151;
  --color-cream-light: #4B5563;
  --color-cream-dark: #1F2937;
  --color-charcoal: #F9FAFB;
  --color-charcoal-light: #F3F4F6;
  --color-border: #374151;
  --color-border-light: #4B5563;
  --color-ivory: #1F2937;
  --color-graphite: #F9FAFB;
  --color-slate: #9CA3AF;
  --color-sky: #60A5FA;
}

body.light-mode {
  --color-bg-primary: #FFFFFF;
  --color-bg-secondary: #F9FAFB;
  --color-bg-tertiary: #F3F4F6;
  --color-text-primary: #111827;
  --color-text-secondary: #374151;
  --color-text-tertiary: #6B7280;
  --color-burgundy: #8B1538;
  --color-burgundy-dark: #6B0F2B;
  --color-burgundy-light: #C41E3A;
  --color-cream: #F8F4EF;
  --color-cream-light: #FAF7F3;
  --color-cream-dark: #E8E4DF;
  --color-charcoal: #1F2937;
  --color-charcoal-light: #374151;
  --color-border: #E5E7EB;
  --color-border-light: #F3F4F6;
  --color-ivory: #F6F3ED;
  --color-graphite: #1E1E1E;
  --color-slate: #6B6B6B;
  --color-sky: #4DA3FF;
}


/* ========================================================================
   2. BASE ELEMENTS
   body, headings, paragraphs, links, strong/em
   ======================================================================== */

@media (prefers-color-scheme: dark) {

  /* Body */
  body {
    background-color: #111827 !important;
    color: #F3F4F6 !important;
  }

  /* Main containers */
  .site,
  .site-content,
  .entry-content,
  .post-content,
  main,
  article,
  .inside-article,
  .content-area,
  .type-page,
  .hentry,
  .entry,
  .page-content {
    background-color: #111827 !important;
    color: #F3F4F6 !important;
  }

  /* Headings */
  h1, h2, h3, h4, h5, h6,
  .post-title,
  .entry-title,
  .widget-title {
    color: #F9FAFB !important;
  }

  /* Body text */
  p, li {
    color: #F3F4F6 !important;
  }

  /* Links */
  a,
  a:link,
  a:visited {
    color: #F87171 !important;
  }

  a:hover,
  a:focus {
    color: #FCA5A5 !important;
  }

  /* Strong/Bold */
  strong, b {
    color: #F9FAFB !important;
  }

  /* Borders */
  hr {
    border-color: #374151 !important;
  }

  /* Focus ring */
  input:focus,
  textarea:focus,
  select:focus {
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2);
  }

  /* Placeholders */
  input::placeholder,
  textarea::placeholder {
    color: #9CA3AF !important;
  }

  /* Buttons */
  .button,
  button,
  input[type="submit"],
  .wp-block-button__link {
    background-color: #DC2626 !important;
    color: #FFFFFF !important;
    border-color: #DC2626 !important;
  }

  .button:hover,
  button:hover,
  input[type="submit"]:hover {
    background-color: #B91C1C !important;
    color: #FFFFFF !important;
  }

}


/* ========================================================================
   3. SITE HEADER & NAVIGATION
   ======================================================================== */

@media (prefers-color-scheme: dark) {

  .site-header {
    background-color: #1F2937 !important;
    border-bottom-color: #374151 !important;
  }

  /* Navigation links */
  .main-navigation a,
  .main-navigation .main-nav ul li a,
  .main-navigation .menu a,
  #primary-menu li a,
  .main-navigation .menu-toggle,
  .main-navigation .menu-bar-items {
    color: #F9FAFB !important;
  }

  .main-navigation a:hover,
  .main-navigation .main-nav ul li:hover > a,
  #primary-menu li a:hover {
    color: #F87171 !important;
  }

  .main-navigation {
    background-color: #1F2937 !important;
  }

  /* Mobile menu background */
  .main-navigation.active {
    background: #1F2937 !important;
  }

  /* Subscribe bar in header */
  .header-widget,
  .header-newsletter {
    background-color: #7C2D12 !important;
  }

  .header-newsletter input[type="email"] {
    background-color: #374151 !important;
    border-color: #4B5563 !important;
    color: #F9FAFB !important;
  }

  .header-newsletter input[type="email"]::placeholder {
    color: #9CA3AF !important;
  }

  .header-newsletter button {
    background-color: #DC2626 !important;
  }

  .header-newsletter button:hover {
    background-color: #B91C1C !important;
  }

  /* Hamburger menu icon — white bars on dark background */
  .mobile-menu-toggle .hamburger,
  .mobile-menu-toggle .hamburger::before,
  .mobile-menu-toggle .hamburger::after {
    background-color: #F9FAFB !important;
  }

  /* Logo — invert for dark background */
  .custom-logo {
    filter: brightness(0) invert(1);
  }

  /* Site title text if no logo */
  .site-branding .site-title a {
    color: #F9FAFB !important;
  }

  .site-branding .site-description {
    color: #9CA3AF !important;
  }

  /* Announcement bar */
  .announcement-bar {
    background: linear-gradient(135deg, #7C2D12 0%, #92400E 100%) !important;
  }

}


/* ========================================================================
   4. POST CONTENT
   blockquotes, code, lists, images
   ======================================================================== */

@media (prefers-color-scheme: dark) {

  /* Post content text */
  .post-content,
  .entry-content,
  .post-content p,
  .entry-content p,
  .post-content li,
  .entry-content li,
  .post-content ul,
  .post-content ol,
  .entry-content ul,
  .entry-content ol {
    color: #F3F4F6 !important;
  }

  /* Post content headings */
  .post-content h1,
  .post-content h2,
  .post-content h3,
  .post-content h4,
  .post-content h5,
  .post-content h6,
  .entry-content h1,
  .entry-content h2,
  .entry-content h3,
  .entry-content h4,
  .entry-content h5,
  .entry-content h6,
  .single-post .entry-content h2,
  .single-post .post-content h2,
  .single-post .entry-content h3,
  .single-post .post-content h3 {
    color: #F9FAFB !important;
  }

  .single-post .entry-content h4,
  .single-post .post-content h4,
  .single-post .entry-content h5,
  .single-post .post-content h5,
  .single-post .entry-content h6,
  .single-post .post-content h6 {
    color: #D1D5DB !important;
  }

  /* Content links */
  .post-content a,
  .entry-content a {
    color: #F87171 !important;
  }

  .post-content a:hover,
  .entry-content a:hover {
    color: #FCA5A5 !important;
  }

  /* Blockquotes */
  blockquote,
  .post-content blockquote,
  .entry-content blockquote,
  .single-post .entry-content blockquote,
  .single-post .post-content blockquote {
    background: #1F2937 !important;
    border-left-color: #F87171 !important;
    color: #F3F4F6 !important;
  }

  .post-content blockquote::before,
  .entry-content blockquote::before {
    color: rgba(248, 113, 113, 0.2) !important;
  }

  .post-content blockquote p,
  .entry-content blockquote p,
  .single-post .entry-content blockquote p,
  .single-post .post-content blockquote p {
    color: #F3F4F6 !important;
  }

  .post-content blockquote cite,
  .entry-content blockquote cite,
  .post-content blockquote strong,
  .entry-content blockquote strong {
    color: #F87171 !important;
  }

  /* Code blocks */
  .post-content pre {
    background-color: #1F2937 !important;
    color: #F9FAFB !important;
  }

  .post-content code {
    background-color: #374151 !important;
    color: #F87171 !important;
  }

  /* Post meta */
  .post-meta,
  .entry-meta,
  .post-meta-top {
    color: #9CA3AF !important;
  }

  /* Drop cap color */
  .post-content > p:first-of-type::first-letter {
    color: #F87171 !important;
  }

}


/* ========================================================================
   5. INLINE NEWSLETTER CTA
   Keep white text on red/dark background
   ======================================================================== */

@media (prefers-color-scheme: dark) {

  .inline-newsletter-cta {
    background: linear-gradient(135deg, #991B1B 0%, #7F1D1D 100%) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
  }

  .inline-newsletter-cta h3 {
    color: #FEE2E2 !important;
  }

  .inline-newsletter-cta p {
    color: rgba(254, 226, 226, 0.9) !important;
  }

  .inline-newsletter-cta input[type="email"] {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(254, 226, 226, 0.3) !important;
    color: white !important;
  }

  .inline-newsletter-cta input[type="email"]::placeholder {
    color: rgba(254, 226, 226, 0.7) !important;
  }

  .inline-newsletter-cta .social-proof {
    color: rgba(254, 226, 226, 0.8) !important;
  }

}


/* ========================================================================
   6. POST CARDS & GRIDS
   ======================================================================== */

@media (prefers-color-scheme: dark) {

  /* Cards */
  .post-card,
  .recommended-post-card,
  .related-post-card,
  .sidebar-widget {
    background-color: #1F2937 !important;
    border-color: #374151 !important;
    color: #F3F4F6 !important;
  }

  .post-card:hover {
    border-color: #4B5563 !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4) !important;
  }

  .post-card-title,
  .post-card-title a {
    color: #F9FAFB !important;
  }

  .post-card-title a:hover {
    color: #F87171 !important;
  }

  .post-card-excerpt {
    color: #D1D5DB !important;
  }

  .audience-tag,
  .meta-separator {
    color: #9CA3AF !important;
  }

  .read-more-link {
    color: #F87171 !important;
  }

  .read-more-link:hover {
    color: #FCA5A5 !important;
  }

  .view-all-link {
    color: #F87171 !important;
  }

  .view-all-link:hover {
    color: #FCA5A5 !important;
  }

  /* Content type badges */
  .content-type-badge {
    background-color: #374151 !important;
    color: #F9FAFB !important;
    border: 1px solid #4B5563 !important;
  }

  .content-type-badge.teaching {
    background-color: #7C2D12 !important;
    color: #FED7AA !important;
  }

  .content-type-badge.reflection {
    background-color: #1E3A8A !important;
    color: #DBEAFE !important;
  }

  .content-type-badge.current-events {
    background-color: #831843 !important;
    color: #FBCFE8 !important;
  }

  /* Post card image placeholder */
  .post-card-placeholder {
    background: linear-gradient(135deg, #374151 0%, #4B5563 100%) !important;
    color: #6B7280 !important;
  }

  .post-card-image {
    background-color: #374151 !important;
  }

}


/* ========================================================================
   7. SIDEBAR & WIDGETS
   ======================================================================== */

@media (prefers-color-scheme: dark) {

  .sidebar,
  .widget-area,
  aside,
  .widget,
  .search-form,
  .sidebar .widget,
  .widget-area .widget {
    background-color: #1F2937 !important;
    color: #F3F4F6 !important;
  }

  .sidebar .widget-title,
  .sidebar h2,
  .widget-area h2 {
    color: #F9FAFB !important;
  }

  .sidebar a,
  .widget-area a {
    color: #F87171 !important;
  }

  .sidebar p {
    color: #F3F4F6 !important;
  }

  .post-sidebar {
    border-top-color: #374151 !important;
  }

  /* Search box */
  input[type="search"],
  .search-form input {
    background-color: #374151 !important;
    color: #F3F4F6 !important;
    border-color: #4B5563 !important;
  }

  .search-form button,
  button[type="submit"] {
    background-color: #8B0E17 !important;
    color: #F9FAFB !important;
  }

  /* Newsletter widget */
  .widget.newsletter-widget {
    background: #1F2937 !important;
    border-color: #D7B25A !important;
  }

}


/* ========================================================================
   8. HOMEPAGE SECTIONS
   hero, demographics, testimonials, recommended
   ======================================================================== */

@media (prefers-color-scheme: dark) {

  .latest-posts-section,
  .demographics-section {
    background-color: #111827 !important;
    color: #F9FAFB !important;
  }

  .section-title,
  .section-subtitle {
    color: #F9FAFB !important;
  }

  /* Demographics grid */
  .demographics-grid .demo-card {
    background-color: #1F2937 !important;
    border-color: #374151 !important;
    color: #F3F4F6 !important;
  }

  .demographics-grid .demo-card:hover {
    border-color: #F87171 !important;
    box-shadow: 0 10px 25px rgba(220, 38, 38, 0.2) !important;
  }

  .demographics-grid .demo-card h3 {
    color: #F9FAFB !important;
  }

  .demographics-grid .demo-card p {
    color: #D1D5DB !important;
  }

  /* Announcement bar */
  .announcement-bar a {
    color: #FFFFFF !important;
  }

  /* Wave dividers */
  .wave-divider svg path {
    fill: #1F2937 !important;
    opacity: 0.3 !important;
  }

  /* Scroll indicator */
  .scroll-indicator {
    color: #9CA3AF !important;
    border-color: #4B5563 !important;
  }

  .scroll-indicator:hover {
    color: #F9FAFB !important;
    border-color: #F87171 !important;
  }

  /* Recommended section */
  .recommended-section {
    background: linear-gradient(135deg, rgba(31, 41, 55, 0.5) 0%, rgba(17, 24, 39, 0.3) 100%) !important;
  }

  .recommended-section .recommended-title {
    color: #F9FAFB !important;
  }

  /* Continue reading */
  .continue-reading-card h4 a {
    color: #FFFFFF !important;
  }

  .continue-reading-card h4 a:hover {
    color: #F87171 !important;
  }

  .continue-reading-card .excerpt {
    color: #F3F4F6 !important;
  }

  /* Archive header */
  .archive-header {
    background-color: #1F2937 !important;
  }

  .post-header {
    background-color: #1F2937 !important;
  }

}


/* ========================================================================
   9. FOOTER
   newsletter, widgets, copyright
   ======================================================================== */

@media (prefers-color-scheme: dark) {

  .site-footer,
  .footer-widgets,
  .footer-widgets-container {
    background-color: #1F2937 !important;
    color: #F3F4F6 !important;
  }

  .footer-newsletter {
    background-color: #1F2937 !important;
    border-bottom: 1px solid #374151 !important;
  }

  .footer-newsletter h3 {
    color: #F9FAFB !important;
  }

  .footer-newsletter p,
  .footer-form-privacy {
    color: #D1D5DB !important;
  }

  /* Footer widgets */
  .footer-widgets .widget,
  .site-footer .widget {
    background-color: transparent !important;
    color: #F3F4F6 !important;
  }

  .footer-widgets .widget-title,
  .site-footer .widget-title,
  .footer-widget h4,
  .footer-widget .widget-title,
  .footer-widgets h1,
  .footer-widgets h2,
  .footer-widgets h3,
  .footer-widgets h4 {
    color: #F9FAFB !important;
  }

  .footer-widgets p,
  .site-footer p,
  .footer-widget p,
  .footer-widgets li,
  .site-footer li,
  .footer-widget ul li {
    color: #D1D5DB !important;
  }

  .footer-widgets a,
  .site-footer a,
  .footer-widget ul li a,
  .social-links li a {
    color: #F9FAFB !important;
    text-decoration: none !important;
  }

  .footer-widgets a:hover,
  .site-footer a:hover,
  .footer-widget ul li a:hover,
  .social-links li a:hover {
    color: #F87171 !important;
  }

  /* Copyright bar */
  .copyright-bar,
  .site-info,
  .inside-site-info {
    background-color: #111827 !important;
    color: #9CA3AF !important;
    border-top: 1px solid #374151 !important;
  }

  .site-info p,
  .site-info a,
  .copyright {
    color: #9CA3AF !important;
  }

  .site-info a:hover {
    color: #F87171 !important;
  }

  /* Footer bottom */
  .footer-bottom {
    background-color: #111827 !important;
    border-top: 1px solid #374151 !important;
  }

  .footer-legal-nav,
  .footer-legal-nav a {
    color: #9CA3AF !important;
  }

  .footer-legal-nav a:hover {
    color: #F87171 !important;
  }

  .footer-legal-nav span {
    color: #6B7280 !important;
  }

  /* Newsletter forms in footer/homepage */
  .newsletter-form input,
  .newsletter-input {
    background-color: #374151 !important;
    border-color: #4B5563 !important;
    color: #F9FAFB !important;
  }

  .newsletter-form input::placeholder {
    color: #9CA3AF !important;
  }

  .newsletter-button,
  .newsletter-form button {
    background-color: #DC2626 !important;
    color: #FFFFFF !important;
  }

  .newsletter-button:hover,
  .newsletter-form button:hover {
    background-color: #B91C1C !important;
  }

  .form-privacy {
    color: #9CA3AF !important;
  }

}


/* ========================================================================
   10. FORMS & INPUTS
   ======================================================================== */

@media (prefers-color-scheme: dark) {

  input[type="text"],
  input[type="email"],
  input[type="search"],
  input[type="url"],
  textarea,
  select,
  .newsletter-input {
    background-color: #374151 !important;
    border-color: #4B5563 !important;
    color: #F9FAFB !important;
  }

  /* Newsletter/contact form boxes */
  .newsletter-signup-box,
  .contact-form-box {
    background: #1F2937 !important;
    border-color: #D7B25A !important;
  }

  .newsletter-form input[type="email"],
  .contact-form input[type="email"],
  .contact-form textarea {
    background: #111827 !important;
    color: #F3F4F6 !important;
    border-color: #4B5563 !important;
  }

  .newsletter-form input[type="email"]::placeholder,
  .contact-form input[type="email"]::placeholder,
  .contact-form textarea::placeholder {
    color: #9CA3AF !important;
  }

  .newsletter-form input[type="email"]:focus,
  .contact-form input[type="email"]:focus,
  .contact-form textarea:focus {
    border-color: #F87171 !important;
    box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.1) !important;
  }

  /* Form messages */
  .form-message-success {
    background-color: #064E3B !important;
    color: #D1FAE5 !important;
    border-color: #047857 !important;
  }

  .form-message-error {
    background-color: #7F1D1D !important;
    color: #FEE2E2 !important;
    border-color: #DC2626 !important;
  }

  /* Archive filters */
  .filter-group select,
  .filter-group input[type="search"] {
    background-color: #374151 !important;
    border-color: #4B5563 !important;
    color: #F9FAFB !important;
  }

  .filter-group label {
    color: #9CA3AF !important;
  }

  /* Pagination */
  .archive-pagination a,
  .archive-pagination span {
    border-color: #4B5563 !important;
    background-color: #374151 !important;
    color: #F9FAFB !important;
  }

  .archive-pagination .current {
    background-color: #8B0E17 !important;
    border-color: #8B0E17 !important;
  }

}


/* ========================================================================
   11. UTILITY COMPONENTS
   badges, reading progress, share buttons, callouts, scripture refs
   ======================================================================== */

@media (prefers-color-scheme: dark) {

  /* Reading progress bar */
  #reading-progress {
    background: rgba(248, 113, 113, 0.1);
  }

  #reading-progress .progress-bar {
    background: #F87171;
  }

  /* Social share buttons */
  .social-share-wrapper {
    border-color: #374151 !important;
  }

  .social-share-button {
    background: #1F2937 !important;
    border-color: #374151 !important;
    color: #F3F4F6 !important;
  }

  .social-share-button.threads {
    border-color: #FFFFFF !important;
    color: #FFFFFF !important;
  }

  .social-share-button.threads:hover {
    background: #FFFFFF !important;
    color: #000000 !important;
  }

  /* Callouts */
  .callout,
  .wp-block-quote.is-style-large,
  .info-box,
  .key-point {
    background: linear-gradient(135deg, #1F2937 0%, #111827 100%) !important;
    color: #F3F4F6 !important;
  }

  .callout-warning {
    background-color: #78350F !important;
    color: #FEF3C7 !important;
  }

  .callout-info {
    background-color: #1E3A8A !important;
    color: #DBEAFE !important;
  }

  .callout-success {
    background-color: #064E3B !important;
    color: #D1FAE5 !important;
  }

  .callout-danger {
    background-color: #7F1D1D !important;
    color: #FEE2E2 !important;
  }

  /* Scripture references */
  .scripture-reference,
  .bible-verse {
    background: linear-gradient(135deg, #374151 0%, #4B5563 100%) !important;
    color: #F3F4F6 !important;
  }

  .scripture-reference cite,
  .bible-verse cite {
    color: #F87171 !important;
  }

  /* Pull quotes */
  .pullquote,
  .wp-block-pullquote {
    color: #F87171 !important;
    border-color: #F87171 !important;
  }

  /* Tweet quotes */
  .tweet-quote {
    background: linear-gradient(135deg, #1F2937 0%, #111827 100%) !important;
  }

  /* Ticker bar */
  .ticker-bar {
    background-color: #1F2937 !important;
    color: #F9FAFB !important;
    border-color: #374151 !important;
  }

  /* Copyright & Site Info */
  .copyright-bar {
    background-color: #111827 !important;
    color: #9CA3AF !important;
  }

  /* Scrollbar styling */
  .posts-scroll-container::-webkit-scrollbar-track {
    background: #374151 !important;
  }

  .posts-scroll-container::-webkit-scrollbar-thumb {
    background: #4B5563 !important;
  }

  .posts-scroll-container::-webkit-scrollbar-thumb:hover {
    background: #6B7280 !important;
  }

}


/* ========================================================================
   12. LOGO SWITCHING
   ======================================================================== */

@media (prefers-color-scheme: dark) {
  .custom-logo-light {
    display: none !important;
  }

  .custom-logo-dark {
    display: block !important;
  }

  /* Single logo filter fallback */
  .custom-logo-single {
    filter: invert(1) brightness(1.1);
  }
}

body.dark-mode .custom-logo-light {
  display: none !important;
}

body.dark-mode .custom-logo-dark {
  display: block !important;
}

body.light-mode .custom-logo-light {
  display: block !important;
}

body.light-mode .custom-logo-dark {
  display: none !important;
}


/* ========================================================================
   13. MANUAL DARK MODE TOGGLE OVERRIDES (body.dark-mode class)
   ======================================================================== */

body.dark-mode {
  background-color: #111827 !important;
  color: #E5E7EB !important;
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6 {
  color: #F9FAFB !important;
}

body.dark-mode a {
  color: #F87171 !important;
}

body.dark-mode a:hover {
  color: #FCA5A5 !important;
}

body.dark-mode strong,
body.dark-mode b {
  color: #F9FAFB !important;
}

body.dark-mode blockquote {
  background: #1F2937 !important;
  border-left-color: #F87171 !important;
  color: #E5E7EB !important;
}

body.dark-mode .site-header,
body.dark-mode .site-footer,
body.dark-mode .main-navigation {
  background-color: #1F2937 !important;
  color: #F9FAFB !important;
}

body.dark-mode .main-navigation a,
body.dark-mode .site-footer a {
  color: #F9FAFB !important;
}

body.dark-mode .site,
body.dark-mode .site-content,
body.dark-mode .entry-content,
body.dark-mode .post-content,
body.dark-mode main,
body.dark-mode article {
  background-color: #111827 !important;
  color: #E5E7EB !important;
}

/* ========================================================================
   13. CONTENT GATE (Bible Deep Dives Paywall)
   ======================================================================== */

@media (prefers-color-scheme: dark) {
  .content-gate-overlay {
    background: linear-gradient(to bottom, transparent, #111827) !important;
  }

  .content-gate-cta {
    background: #1F2937 !important;
    border-color: #374151 !important;
  }

  .content-gate-cta h3 {
    color: #F9FAFB !important;
  }

  .content-gate-cta p,
  .gate-privacy {
    color: #D1D5DB !important;
  }

  .gate-login-link {
    color: #D1D5DB !important;
  }

  .content-gate-cta .newsletter-input {
    background: #374151 !important;
    border-color: #4B5563 !important;
    color: #F3F4F6 !important;
  }
}

/* ========================================================================
   14. SUPPORT / DONATE CTA
   ======================================================================== */

@media (prefers-color-scheme: dark) {

  .post-support-cta {
    border-top-color: #374151 !important;
  }

  .post-support-cta p {
    color: #D1D5DB !important;
  }

  .post-support-cta .donate-button {
    background: #991B1B !important;
  }

  .post-support-cta .donate-button:hover {
    background: #B91C1C !important;
  }

  /* Support Modal */
  .support-modal {
    background: #1F2937 !important;
  }

  .support-modal-close {
    background: rgba(31, 41, 55, 0.85) !important;
    color: #9CA3AF !important;
  }

  .support-modal-close:hover {
    background: #374151 !important;
    color: #F3F4F6 !important;
  }

  .support-modal-banner {
    background: linear-gradient(135deg, #B45309 0%, #92400E 50%, #78350F 100%) !important;
  }

  .support-modal-body h3 {
    color: #F9FAFB !important;
  }

  .support-modal-body > p:first-of-type {
    color: #D1D5DB !important;
  }

  .amount-pill {
    background: #374151 !important;
    border-color: #4B5563 !important;
  }

  .pill-label {
    color: #F3F4F6 !important;
  }

  .pill-desc {
    color: #9CA3AF !important;
  }

  .amount-pill:hover {
    border-color: #F59E0B !important;
    background: #4B5563 !important;
  }

  .amount-pill.active {
    background: #451a03 !important;
    border-color: #F59E0B !important;
  }

  .amount-pill.active .pill-label {
    color: #FBBF24 !important;
  }

  .custom-label {
    color: #9CA3AF !important;
  }

  .custom-input-wrap {
    background: #374151 !important;
    border-color: #4B5563 !important;
  }

  .custom-input-wrap:focus-within {
    border-color: #F59E0B !important;
  }

  .custom-dollar {
    color: #6B7280 !important;
  }

  .custom-input-wrap input {
    color: #F3F4F6 !important;
  }

  .support-modal-pay {
    background: #991B1B !important;
  }

  .support-modal-pay:hover {
    background: #B91C1C !important;
  }

  .support-modal-note {
    color: #9CA3AF !important;
  }

  .support-modal-disclaimer {
    color: #6B7280 !important;
  }

  /* PayPal link — dark mode */
  .support-modal-paypal-link {
    color: #9CA3AF !important;
  }

  .support-modal-paypal-link:hover {
    color: #60A5FA !important; /* Lighter blue for dark mode */
  }

  /* Thank-you banner — dark mode */
  .support-thank-you-banner {
    background: linear-gradient(135deg, #065F46, #047857) !important;
  }

  /* ========================================================================
     Bible Deep Dives - Dark Mode
     ======================================================================== */

  .bdd-book-card {
    background: #1F2937 !important;
    border-color: #374151 !important;
  }

  .bdd-book-card:hover {
    border-color: var(--color-gold) !important;
  }

  .bdd-book-name {
    color: #F9FAFB !important;
  }

  .bdd-book-progress {
    background: #374151 !important;
  }

  .bbg-pillar-card,
  .bbg-satellite-card {
    background: #1F2937 !important;
    border-color: #374151 !important;
  }

  .bbg-pillar-title a,
  .bbg-satellite-title a {
    color: #F9FAFB !important;
  }

  .bbg-type-greek_vocabulary {
    background: #312E81 !important;
    color: #C7D2FE !important;
  }

  .bbg-type-historical_context {
    background: #78350F !important;
    color: #FDE68A !important;
  }

  .bbg-type-theology {
    background: #14532D !important;
    color: #BBF7D0 !important;
  }

  .bbg-type-application {
    background: #881337 !important;
    color: #FECDD3 !important;
  }

  .bbg-type-cross_references {
    background: #0C4A6E !important;
    color: #BAE6FD !important;
  }

  .chapter-nav-widget {
    background: #1F2937 !important;
    border-color: #374151 !important;
  }

  .chapter-nav-list a {
    color: #F3F4F6 !important;
  }

  .chapter-nav-book-link {
    border-top-color: #374151 !important;
  }

  .bbg-chapter-divider {
    background: linear-gradient(to right, transparent, #D7B25A66, transparent) !important;
  }

  /* ========================================================================
     Deep Dive Premium Features - Dark Mode
     ======================================================================== */

  /* TOC */
  .toc-header {
    border-bottom-color: #374151 !important;
  }

  .toc-link {
    color: #9CA3AF !important;
  }

  .toc-link:hover {
    color: #F3F4F6 !important;
    background: rgba(255,255,255,0.04) !important;
  }

  .toc-link.toc-active {
    color: #F87171 !important;
    border-left-color: #F87171 !important;
    background: rgba(248, 113, 113, 0.06) !important;
  }

  .toc-progress {
    background: #374151 !important;
  }

  .toc-mobile-panel {
    background: #1F2937 !important;
  }

  .toc-mobile-header {
    border-bottom-color: #374151 !important;
  }

  .toc-mobile-header h4 {
    color: #F9FAFB !important;
  }

  .toc-mobile-list .toc-link:hover,
  .toc-mobile-list .toc-link.toc-active {
    background: rgba(255,255,255,0.06) !important;
  }

  /* Greek/Hebrew Tooltips - already dark by default */

  .lang-greek {
    color: #818CF8 !important;
  }

  .lang-hebrew {
    color: #FDBA74 !important;
  }

  /* Pull Quotes */
  .pullquote {
    border-color: var(--color-gold) !important;
  }

  .pullquote-mark {
    background: #111827 !important;
  }

  .pullquote-text {
    color: #F3F4F6 !important;
  }

  /* Key Takeaway */
  .key-takeaway {
    background: linear-gradient(135deg, #451a03, #78350F) !important;
    border-color: #92400E !important;
  }

  .key-takeaway-header {
    border-bottom-color: rgba(146, 64, 14, 0.4) !important;
  }

  .key-takeaway-title {
    color: #FBBF24 !important;
  }

  .key-takeaway-body p {
    color: #FDE68A !important;
  }

  /* Scripture Blockquotes */
  .deep-dive-article .post-content blockquote {
    background: #1F2937 !important;
    border-left-color: var(--color-gold) !important;
  }

  .deep-dive-article .post-content blockquote p {
    color: #F3F4F6 !important;
  }

  /* Footnotes */
  .footnote-trigger sup {
    color: #F87171 !important;
  }

  .footnote-content {
    background: #1F2937 !important;
    border-color: #374151 !important;
    color: #F3F4F6 !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4) !important;
  }

  .footnote-number {
    color: #F87171 !important;
  }

  /* Toolbar */
  .deep-dive-toolbar {
    border-color: #374151 !important;
  }

  .toolbar-btn {
    background: #1F2937 !important;
    border-color: #374151 !important;
    color: #F3F4F6 !important;
  }

  .toolbar-btn:hover {
    background: #374151 !important;
    border-color: #4B5563 !important;
  }

  /* Resume Banner */
  .reading-resume-banner {
    background: #1F2937 !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5) !important;
  }

  /* Mobile TOC button */
  .toc-mobile-btn {
    background: #F9FAFB !important;
    color: #111827 !important;
  }

  .toc-mobile-btn:hover {
    background: #F87171 !important;
    color: #fff !important;
  }

  /* ========================================================================
     Bible Deep Dives Landing Page - Dark Mode
     ======================================================================== */

  /* Hero section — background uses var(--color-graphite) which inverts to white */
  .bdd-hero {
    background-color: #1F2937 !important;
  }

  .bdd-hero-title {
    color: #FFFFFF !important;
  }

  .bdd-hero-subtitle {
    color: #D1D5DB !important;
  }

  .bdd-stat-number {
    color: #D7B25A !important;
  }

  .bdd-stat-label {
    color: #9CA3AF !important;
  }

  .bdd-stat-divider {
    background: #4B5563 !important;
  }

  /* How It Works section */
  .bdd-how-it-works {
    background: #1F2937 !important;
    border-bottom-color: #374151 !important;
  }

  .bdd-section-title {
    color: #F9FAFB !important;
  }

  .bdd-hiw-step h3 {
    color: #F9FAFB !important;
  }

  .bdd-hiw-step p {
    color: #D1D5DB !important;
  }

  .bdd-hiw-number {
    color: #111827 !important;
  }

  /* Featured Book */
  .bdd-featured-header {
    border-bottom-color: #D7B25A !important;
  }

  .bdd-featured-book-title {
    color: #F9FAFB !important;
  }

  .bdd-featured-description {
    color: #D1D5DB !important;
  }

  .bdd-featured-stats {
    color: #9CA3AF !important;
  }

  .bdd-book-progress {
    background: #374151 !important;
  }

  /* Pillar Card */
  .bdd-pillar-card {
    background: #1F2937 !important;
    border-color: #374151 !important;
  }

  .bdd-pillar-card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5) !important;
  }

  .bdd-premium-badge {
    background: #111827 !important;
    color: #D7B25A !important;
  }

  .bdd-pillar-title a {
    color: #F9FAFB !important;
  }

  .bdd-pillar-title a:hover {
    color: #F87171 !important;
  }

  .bdd-pillar-excerpt {
    color: #D1D5DB !important;
  }

  .bdd-pillar-meta {
    color: #9CA3AF !important;
  }

  .bdd-read-premium {
    background: #DC2626 !important;
    color: #FFFFFF !important;
  }

  .bdd-read-premium:hover {
    background: #B91C1C !important;
    color: #FFFFFF !important;
  }

  /* Satellite Cards */
  .bdd-satellites-label {
    color: #9CA3AF !important;
  }

  .bdd-satellite-card {
    background: #1F2937 !important;
    border-color: #374151 !important;
    color: #F3F4F6 !important;
  }

  .bdd-satellite-card:hover {
    border-color: #D7B25A !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4) !important;
  }

  .bdd-satellite-title {
    color: #F9FAFB !important;
  }

  .bdd-satellite-excerpt {
    color: #D1D5DB !important;
  }

  .bdd-satellite-meta {
    color: #F87171 !important;
  }

  .bdd-free-badge {
    background: #064E3B !important;
    color: #D1FAE5 !important;
  }

  /* Book CTA */
  .bdd-book-cta {
    border-top-color: #374151 !important;
  }

  .bdd-view-all-btn {
    color: #F87171 !important;
    border-color: #F87171 !important;
  }

  .bdd-view-all-btn:hover {
    background: #DC2626 !important;
    color: #FFFFFF !important;
    border-color: #DC2626 !important;
  }

  /* Subscribe CTA - already dark-ish but variable inversion breaks it */
  .bdd-subscribe-cta {
    background: #111827 !important;
    border-top: 1px solid #374151;
  }

  .bdd-subscribe-cta h2 {
    color: #F9FAFB !important;
  }

  .bdd-subscribe-cta p {
    color: #D1D5DB !important;
  }

  /* Role badges on landing page */
  .bbg-role-badge.bbg-role-pillar {
    background: #451a03 !important;
    color: #FBBF24 !important;
  }

  /* Type badges */
  .bbg-type-badge {
    opacity: 1 !important;
  }
}
