/* Light & Dark Mode Styling */
body.dark-mode .lesson-content {
    background-color: #0f172a;
    border-color: #334155;
    color: #e2e8f0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  }

  body.dark-mode .lesson-content h1,
  body.dark-mode .lesson-content h2,
  body.dark-mode .lesson-content h3,
  body.dark-mode .lesson-content h4,
  body.dark-mode .lesson-content h5,
  body.dark-mode .lesson-content h6,
  body.dark-mode .lesson-content strong {
    color: #f1f5f9;
  }

  body.dark-mode .lesson-content .wp-caption-text {
    color: #94a3b8;
  }

  body.dark-mode .lesson-content p,
  body.dark-mode .lesson-content li,
  body.dark-mode .lesson-content blockquote {
    color: #cbd5e1;
  }

  body.dark-mode .lesson-content a {
    color: #60a5fa;
  }

  body.dark-mode .lesson-content a:hover {
    color: #93c5fd;
  }

  body.dark-mode .lesson-content img {
    opacity: 0.9;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  }

  body.dark-mode .lesson-content img:hover {
    opacity: 1;
  }

  body.dark-mode .lesson-content .callout {
    background-color: #1e293b;
    border-left: 6px solid #3b82f6;
    color: #cbd5e1;
  }

  body.dark-mode .lesson-content blockquote {
    background-color: #1e293b;
    border-left-color: #3b82f6;
    color: #cbd5e1;
  }

  body.dark-mode .lesson-content .button {
    background-color: #3b82f6;
    color: #f1f5f9;
  }

  body.dark-mode .lesson-content .button:hover {
    background-color: #2563eb;
  }

  body.dark-mode .lesson-table {
    background-color: #1e293b;
    color: #e2e8f0;
  }

  body.dark-mode .lesson-table tr:nth-child(even) {
    background-color: #334155;
  }

  body.dark-mode .lesson-table tr:hover {
    background-color: #475569;
  }

  body.dark-mode .lesson-table th {
    background-color: #0e7490;
    color: #f1f5f9;
  }
  
  /* Base Styling */
  .lesson-content {
    max-width: 800px;
    margin: 40px auto;
    font-size: 1.125rem;
    line-height: 1.8;
    background-color: #ffffff;
    border: 1px solid #eaeaea;
    padding: 3rem 2.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
  }

  .lesson-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    margin-top: 0.5rem;
    color: #1e293b;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
  }

  .lesson-content h2 {
    font-size: 2rem;
    margin-top: 3rem;
    margin-bottom: 1.25rem;
    color: #334155;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.01em;
  }

  .lesson-content h3 {
    font-size: 1.5rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: #475569;
    font-weight: 600;
    line-height: 1.4;
  }

  .lesson-content h4 {
    font-size: 1.25rem;
    margin-top: 2rem;
    margin-bottom: 0.875rem;
    color: #64748b;
    font-weight: 600;
  }

  .lesson-content p {
    margin-bottom: 1.75rem;
    color: #334155;
    animation: fadeIn 0.4s ease-in;
  }

  .lesson-content p:last-child {
    margin-bottom: 0;
  }

  .lesson-content ul, .lesson-content ol {
    margin-bottom: 1.75rem;
    padding-left: 1.75rem;
  }

  .lesson-content li {
    margin-bottom: 0.5rem;
    line-height: 1.8;
  }
  
  @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }
  
  .lesson-content figure {
    margin: 3rem auto;
    text-align: center;
    max-width: 100%;
    background: linear-gradient(to bottom, transparent 0%, rgba(241, 245, 249, 0.3) 100%);
    border-radius: 12px;
    padding: 1.5rem 1rem 1rem;
  }

  body.dark-mode .lesson-content figure {
    background: linear-gradient(to bottom, transparent 0%, rgba(15, 23, 42, 0.5) 100%);
  }

  .lesson-content .wp-caption-text {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    color: #64748b;
    text-align: center;
    line-height: 1.6;
    font-style: italic;
    border-top: 2px solid #e2e8f0;
  }

  body.dark-mode .lesson-content .wp-caption-text {
    color: #94a3b8;
    border-top-color: #334155;
  }

  .lesson-content .wp-caption-text strong {
    font-weight: 600;
    font-style: normal;
    color: #475569;
    display: inline-block;
    margin-right: 0.25rem;
  }

  body.dark-mode .lesson-content .wp-caption-text strong {
    color: #cbd5e1;
  }

  .lesson-content img.responsive-img {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    width: auto;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
  }

  .lesson-content .responsive-img:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
  }

  body.dark-mode .lesson-content img.responsive-img {
    border-color: rgba(255, 255, 255, 0.1);
  }

  /* Responsive image sizing */
  @media (min-width: 768px) {
    .lesson-content img.responsive-img {
      max-width: 85%;
    }
  }

  @media (min-width: 1024px) {
    .lesson-content img.responsive-img {
      max-width: 75%;
    }
  }

  @media (min-width: 1440px) {
    .lesson-content img.responsive-img {
      max-width: 70%;
    }
  }
  
  .lesson-content a {
    color: #e74c3c;
    text-decoration: none;
  }
  
  .lesson-content a:hover {
    text-decoration: underline;
    color: #c0392b;
  }
  
  .lesson-content .wp-caption {
    text-align: center;
    margin: 20px 0;
  }
  
  .lesson-content strong {
    color: #2c3e50;
  }
  
  .lesson-content .callout {
    background-color: #e8f0fe;
    border-left: 5px solid #4a90e2;
    padding: 15px;
    margin: 20px 0;
    border-radius: 5px;
  }
  
  .lesson-content blockquote {
    border-left: 5px solid #2c3e50;
    padding: 10px 20px;
    margin: 20px 0;
    background-color: #f9f9f9;
    font-style: italic;
    color: #555;
  }
  
  .lesson-content .button {
    background-color: #4a90e2;
    color: #fff;
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    border-radius: 5px;
    display: inline-block;
    transition: background-color 0.3s ease;
  }
  
  .lesson-content .button:hover {
    background-color: #357ab8;
  }
  
  .lesson-table {
    font-family: Arial, Helvetica, sans-serif;
    border-collapse: collapse;
    width: 75%;
    margin-left: auto;
    margin-right: auto;
  }
  
  .lesson-table td, .lesson-table th {
    border: 1px solid #ddd;
    padding: 8px;
  }
  
  .lesson-table tr:nth-child(even) {
    background-color: #f2f2f2;
  }
  
  .lesson-table tr:hover {
    background-color: #ddd;
  }
  
  .lesson-table th {
    padding-top: 12px;
    padding-bottom: 12px;
    text-align: left;
    background-color: #26a69a;
    color: white;
  }

  /* Responsive Typography */
  @media (max-width: 768px) {
    .lesson-content {
      font-size: 1rem;
      padding: 1.5rem 1.25rem;
      margin: 20px auto;
      max-width: 100%;
    }

    .lesson-content h1 {
      font-size: 1.875rem;
      margin-bottom: 1.25rem;
    }

    .lesson-content h2 {
      font-size: 1.5rem;
      margin-top: 2rem;
      margin-bottom: 1rem;
    }

    .lesson-content h3 {
      font-size: 1.25rem;
      margin-top: 1.75rem;
    }

    .lesson-content h4 {
      font-size: 1.125rem;
      margin-top: 1.5rem;
    }

    .lesson-content p {
      margin-bottom: 1.5rem;
    }

    .lesson-content ul, .lesson-content ol {
      padding-left: 1.25rem;
    }
  }

  @media (min-width: 769px) and (max-width: 1024px) {
    .lesson-content {
      max-width: 720px;
      padding: 2.5rem 2rem;
    }

    .lesson-content h1 {
      font-size: 2.25rem;
    }

    .lesson-content h2 {
      font-size: 1.875rem;
    }

    .lesson-content h3 {
      font-size: 1.375rem;
    }
  }
