/*
Theme Name: CryptoKnowledge
Theme URI: https://cryptoknowledge.net
Author: Your Name
Author URI: https://cryptoknowledge.net
Description: A custom WordPress theme for CryptoKnowledge, an educational platform focused on teaching cryptocurrency concepts.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cryptoknowledge
Tags: education, cryptocurrency, bitcoin, e-learning, learnash

This theme is designed for the CryptoKnowledge educational platform.
*/

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600&family=Roboto+Mono:wght@300&display=swap');
/* Note: Hedvig Letters Serif will need to be added separately as it may not be available on Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Hedvig+Letters+Serif:opsz@12..24&display=swap');
/* CSS Variables */
:root {
  /* Base Sizes */
  --base-font-size: 12px;  /* Reduced from 16px by 10% */
  
  /* Type Scale */
  --scale-xs: 0.75;   /* 10.8px */
  --scale-sm: 0.87;   /* 12.5px */
  --scale-base: 1;    /* 14.4px */
  --scale-md: 1.125;  /* 16.2px */
  --scale-lg: 1.25;   /* 18px */
  --scale-xl: 1.5;    /* 21.6px */
  --scale-2xl: 2;     /* 28.8px */
  --scale-3xl: 3;     /* 43.2px */

  /* Colors */
  --background-color: #FFF9F2;
  --text-color: #61778C;
  --primary-color: #61778C;
  --secondary-color: #E8EDF2;
  --accent-color: #61778C;
  --footer-color: #6480A0;
  --white: #FFFFFF;
  --black: #333333;
  --border-color: #E5E5E5;
  
  /* Fonts */
  --logo-font: 'Hedvig Letters Serif', serif;
  --header-font: 'Inter', sans-serif;
  --metadata-font: 'Roboto Mono', monospace;
  --body-font: 'Inter', sans-serif;

  /* Component Specific */
  --font-size-h1: calc(var(--base-font-size) * 2); /* Reduced from 2.4 */
  --font-size-h2: calc(var(--base-font-size) * 3.2);
  --font-size-h3: calc(var(--base-font-size) * 2.4);
  --font-size-h4: calc(var(--base-font-size) * 1.4);
  --font-size-body: var(--base-font-size);
  --font-size-body-lg: calc(var(--base-font-size) * var(--scale-lg));
  --font-size-meta: calc(var(--base-font-size) * var(--scale-xs));
  --font-size-small: calc(var(--base-font-size) * var(--scale-sm));

  --sidebar-bg: #FFF9F2;
  --sidebar-text: #61778C;
  --sidebar-width: 320px;
  --main-bg: #fdf8f2;
  --main-text: #61778C;
  --primary: #61778C;
  --primary-light: #b3c6d9;
  --footer-bg: #6480A0;
  --footer-text: #fff;
  --cta-bg: #4F85B5;
  --cta-text: #fff;
  --cta-hover: #3E5F81;
  --ghost-bg: transparent;
  --ghost-border: #4F85B5;
  --ghost-text: #4F85B5;
  --ghost-hover-bg: #4F85B5;
  --ghost-hover-text: #fff;
  --border: #e5e5e5;
  --font-logo: 'Hedvig Letters Serif', serif;
  --font-header: 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'Roboto Mono', monospace;
}

/* Base Styling */
body {
  background: var(--main-bg);
  color: var(--main-text);
  font-family: var(--font-body);
  font-size: 14px;
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-header);
  font-weight: 600;
  color: var(--main-text);
}

h1, h2, h4, h5, h6 {
  color: var(--main-text);
}

h3 {
  color: var(--secondary-color);
}

h1 {
  font-size: var(--font-size-h1);
  color: var(--main-text);
}

h2 {
  font-size: var(--font-size-h2);
}

a {
  color: var(--main-text);
  text-decoration: none;
  transition: color 0.3s;
}

a:hover {
  color: var(--primary-light);
}

.container {
  width: 90%;
  /* max-width: 1200px; */
  margin: 0 auto;
  padding: 20px 0;
}

/* Header Styling */
.site-header {
  border-bottom: 1px solid var(--border-color);
  padding: 20px 0;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-branding {
  border-top: 2px solid var(--primary-color);
  padding-top: 1.2rem;
  margin-bottom: 1.2rem;
  display: flex;
  flex-direction: column;
  align-items: left;
}

.site-logo {
  /* max-height: 50px;
  margin-right: 5px; */
}

.site-title {
  font-family: var(--font-logo);
  font-size: 1.8rem; /* Increased by 50% from 1.2rem */
  font-weight: normal;
  margin: 0;
  color: var(--sidebar-text);
  transition: font-size 0.3s ease;
}

.site-description {
  font-family: var(--font-body);
  font-size: var(--font-size-body);
  margin: 5px 0 0 0;
}

.site-url {
  font-family: var(--font-mono);
  font-size: var(--font-size-meta);
  color: var(--main-text);
  opacity: 0.8;
}

/* Promo Banner */
.promo-banner {
  background-color: var(--white);
  padding: 15px 0;
  text-align: center;
}

.promo-text {
  font-family: var(--font-header);
  font-weight: 600;
  color: var(--main-text);
}

.promo-code {
  font-family: var(--font-mono);
  color: var(--accent-color);
}

/* Main Content Area */
.site-content {
  display: flex;
  flex-wrap: wrap;
  margin: 40px 0;
}

.content-area {
  flex: 1;
  min-width: 65%;
  padding-right: 40px;
}

.widget-area {
  flex: 0 0 30%;
  background-color: var(--white);
  padding: 20px;
  border-radius: 5px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Store Items */
.store-heading {
  margin-bottom: 30px;
  font-size: var(--font-size-h2);
}

.store-subheading {
  color: var(--main-text);
  font-size: var(--font-size-small);
  font-family: var(--font-mono);
  margin-top: 5px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
}

.product-card {
  background-color: var(--white);
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.product-image {
  width: 100%;
  height: auto;
}

.product-info {
  padding: 20px;
}

.product-title {
  font-size: var(--font-size-h4);
  margin: 0 0 10px 0;
}

.product-description {
  font-size: var(--font-size-small);
  margin-bottom: 15px;
  color: var(--main-text);
  opacity: 0.8;
}

.product-price {
  font-size: var(--font-size-h4);
  font-weight: 600;
  color: var(--accent-color);
  text-align: center;
}

/* Course Layout */
.course-title {
  font-size: var(--font-size-h2);
  margin-bottom: 10px;
}

.course-description {
  font-size: var(--font-size-body);
  margin-bottom: 30px;
  color: var(--main-text);
  opacity: 0.9;
}

.lessons-list {
  margin-top: 30px;
}

.lesson-item {
  margin-bottom: 30px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 30px;
}

.lesson-item:last-child {
  border-bottom: none;
}

.lesson-header {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

.lesson-title {
  font-size: var(--font-size-h3);
  margin: 0;
  flex: 1;
}

.lesson-meta {
  font-family: var(--font-mono);
  font-size: var(--font-size-small);
  color: var(--main-text);
  opacity: 0.8;
}

.lesson-content {
  display: flex;
  gap: 20px;
}

.lesson-thumbnail {
  flex: 0 0 240px;
}

.lesson-description {
  flex: 1;
}

.read-more {
  display: inline-block;
  color: var(--primary-color);
  margin-top: 10px;
  font-weight: 600;
}

/* Single Lesson Page */
.lesson-video-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  max-width: 100%;
  background-color: #f0f0f0;
  margin-bottom: 30px;
}

.lesson-video-container iframe,
.lesson-video-container video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.lesson-actions {
  display: flex;
  gap: 15px;
  margin-bottom: 30px;
}

.download-transcript {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--primary-color);
  font-weight: 600;
}

.lesson-views {
  font-family: var(--font-mono);
  font-size: var(--font-size-small);
  color: var(--main-text);
  opacity: 0.8;
}

/* Footer */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 3.5rem;
  margin-top: 3rem;
  border-radius: 0 0 12px 12px;
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  box-sizing: border-box;
}

.footer-container {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3rem;
}

.footer-column {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.footer-column h4 {
  color: var(--footer-text);
  font-size: 1.2rem;
  margin-bottom: 1rem;
  font-family: var(--font-header);
}

.footer-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-column ul li {
  margin-bottom: 0.75rem;
}

.footer-column a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  transition: color 0.3s;
}

.footer-column a:hover {
  color: #fff;
}

.footer-quote {
  grid-column: 1 / -1;
  font-style: italic;
  color: rgba(255,255,255,0.85);
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
}

.footer-quote-source {
  display: block;
  margin-top: 1rem;
  font-size: 0.9rem;
  opacity: 0.7;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 20px;
  background-color: var(--primary-color);
  color: var(--white);
  border-radius: 5px;
  font-weight: 600;
  text-align: center;
  transition: background-color 0.3s ease, transform 0.3s ease;
  border: none;
  cursor: pointer;
}

.btn:hover {
  background-color: var(--accent-color);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-ghost {
  background-color: transparent;
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
}

.btn-ghost:hover {
  background-color: var(--primary-color);
  color: var(--white);
}

.btn-large {
  padding: 15px 30px;
  font-size: var(--font-size-h4);
}

/* Checkout Page */
.checkout-container {
  background-color: var(--white);
  border-radius: 5px;
  padding: 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.product-summary {
  display: flex;
  gap: 30px;
  margin-bottom: 30px;
}

.product-image-container {
  flex: 0 0 240px;
}

.product-details {
  flex: 1;
}

.original-price {
  text-decoration: line-through;
  color: #999;
  margin-right: 5px;
}

.current-price {
  font-size: var(--font-size-h3);
  font-weight: 600;
  color: var(--accent-color);
}

.product-description {
  margin: 15px 0;
}

.checkout-summary {
  border-top: 1px solid var(--border-color);
  margin-top: 30px;
  padding-top: 20px;
}

.checkout-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
}

.total-row {
  font-size: var(--font-size-h3);
  font-weight: 600;
  border-top: 1px solid var(--border-color);
  padding-top: 15px;
  margin-top: 15px;
}

.checkout-actions {
  display: flex;
  gap: 15px;
  margin-top: 30px;
}

.btn-pay {
  flex: 1;
  background-color: var(--accent-color);
}

.btn-decline {
  flex: 1;
}

/* Responsive Design */
@media (max-width: 992px) {
  .homepage-container {
    flex-direction: column;
  }
  .sidebar {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    z-index: auto !important;
  }
  .sidebar-nav {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    box-shadow: none !important;
    z-index: auto !important;
    display: block !important;
  }

  .sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
  }

  .site-branding {
    flex: 1;
    padding-top: 0;
    border-top: none;
  }

  .site-branding > div {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .site-logo {
    height: 32px !important;
    width: auto !important;
  }

  .site-title {
    font-size: 1.5rem; /* Increased by 50% from 1rem */
    margin: 0;
  }

  .site-description,
  .site-url {
    display: block !important;
  }

  .menu-toggle {
    display: block;
  }

  .sidebar-cta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0;
    margin-top: 1rem;
  }

  .main-content {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .footer-container {
    grid-template-columns: repeat(2, 1fr);
    padding: 0 1rem;
  }
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 1.5rem;
  }

  .category-grid {
    grid-template-columns: 1fr;
  }

  .footer-container {
    grid-template-columns: 1fr;
    padding: 0 1rem;
  }

  .footer-column {
    text-align: center;
  }

  .products-grid {
    grid-template-columns: 1fr;
  }

  .lesson-content {
    flex-direction: column;
  }

  .lesson-thumbnail {
    width: 100%;
    margin-bottom: 1rem;
  }

  .checkout-actions {
    flex-direction: column;
  }
}

@media (max-width: 576px) {
  .homepage-container {
    flex-direction: column;
  }
  .sidebar {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    z-index: auto !important;
  }
  .sidebar-nav {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    box-shadow: none !important;
    z-index: auto !important;
    display: block !important;
  }

  .sidebar {
    padding: 0.75rem;
  }

  .site-branding > div {
    gap: 0.25rem;
  }

  .site-logo {
    height: 24px !important;
  }

  .site-title {
    font-size: 1.3125rem; /* Increased by 50% from 0.875rem */
  }

  .main-content {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .hero {
    margin-bottom: 1.5rem;
  }

  .hero h1 {
    font-size: 1.25rem;
  }

  .subtitle {
    font-size: 12px;
    margin-bottom: 1rem;
  }

  .hero-desc {
    font-size: 0.875rem;
    margin-bottom: 1rem;
  }

  .video-wrapper {
    margin-bottom: 1.5rem;
  }

  .category-card {
    padding: 1rem;
  }

  .category-card h3 {
    font-size: 1.1rem;
  }

  .category-card li {
    font-size: 0.875rem;
  }

  .quote {
    font-size: 1rem;
    padding: 1rem;
    margin-top: 1.5rem;
  }

  .quote cite {
    font-size: 0.875rem;
  }

  .site-description,
  .site-url {
    display: block !important;
  }
}

/* Update main content styles */
.main-content {
  flex: 1;
  width: calc(100% - var(--sidebar-width));
  transition: margin-left 0.3s ease, width 0.3s ease;
  border-top: 2px solid var(--primary-color);
  padding: 2rem 2.5rem;
  margin-left: 2rem;
  background-color: #FFFBF5;
}

@media (min-width: 993px) {
  .sidebar {
    position: fixed;
    height: 100vh;
    width: var(--sidebar-width);
  }

  .main-content {
    margin-left: calc(var(--sidebar-width) + 2rem);
    width: calc(100% - var(--sidebar-width) - 2rem);
  }
}

.site-branding .site-logo {
  /* border-top removed */
  display: flex;
  flex-direction: column;
  align-items: center;
}

.site-branding .site-title,
.site-branding .site-description {
  line-height: 2.2;
}

/* Sidebar Header */
.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

/* Hamburger Menu */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  z-index: 1000;
  width: 32px;
  height: 32px;
  position: relative;
}

.hamburger-icon {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--sidebar-text);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: background-color 0.3s;
}

.hamburger-icon::before,
.hamburger-icon::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 2px;
  background-color: var(--sidebar-text);
  transition: transform 0.3s;
  left: 0;
}

.hamburger-icon::before {
  top: -8px;
}

.hamburger-icon::after {
  bottom: -8px;
}

.menu-toggle[aria-expanded="true"] .hamburger-icon {
  background-color: transparent;
}

.menu-toggle[aria-expanded="true"] .hamburger-icon::before {
  transform: translateY(8px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .hamburger-icon::after {
  transform: translateY(-8px) rotate(-45deg);
}

/* Fix overflow issues */
html, body {
  overflow-x: hidden;
  width: 100%;
  position: relative;
}

.homepage-container {
  display: flex;
  min-height: 100vh;
  margin: 2rem;
  background: var(--background-color);
  border-radius: 12px;
  overflow-x: hidden;
  width: calc(100% - 4rem); /* Account for margins */
}

@media (max-width: 992px) {
  .homepage-container {
    margin: 1rem;
    width: calc(100% - 2rem);
  }

  .menu-toggle {
    display: block;
  }

  .sidebar-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--sidebar-bg);
    padding: 4rem 1rem 1rem 1rem;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 999;
  }

  .sidebar-nav.active {
    transform: translateX(0);
  }
}

@media (max-width: 576px) {
  .homepage-container {
    margin: 0.5rem;
    width: calc(100% - 1rem);
  }
}

/* Screen Reader Text */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

/* Branding Content */
.branding-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.site-logo {
  height: 50px;
  width: auto;
  transition: height 0.3s ease;
}

/* Update responsive styles */
@media (max-width: 992px) {
  .branding-content {
    gap: 0.5rem;
  }

  .site-logo {
    height: 40px;
  }

  .site-title {
    font-size: 1.5rem; /* Increased by 50% from 1rem */
  }

  .sidebar-nav {
    border-top: 1px solid var(--border-color);
  }

  .sidebar-cta {
    padding: 1rem 0;
  }

  .sidebar-cta .btn {
    margin: 0.25rem 0;
  }
}

@media (max-width: 576px) {
  .branding-content {
    gap: 0.25rem;
  }

  .site-logo {
    height: 32px;
  }

  .site-title {
    font-size: 1.3125rem; /* Increased by 50% from 0.875rem */
  }

  .sidebar {
    padding: 0.5rem;
  }

  .sidebar-nav {
    padding: 0.5rem;
  }

  .sidebar-cta {
    padding: 0.5rem 0;
  }
}

/* Ensure smooth transitions */
.sidebar,
.main-content,
.site-logo,
.site-title,
.sidebar-nav {
  transition: all 0.3s ease;
}

/* Improve button styles for mobile */
.btn {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0.75rem 1rem;
}

@media (max-width: 576px) {
  .btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
  }
}

/* Category Grid */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  background-color: #fffbf5;
}

.category-card {
  border-top: 1px solid var(--primary-color);
  background: #fffbf5;
  font-family: var(--font-mono);
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: none;
}

.category-card:hover {
  transform: translateY(-2px);
  box-shadow: none;
}

.category-card h3 {
  font-size: var(--font-size-h4);
  color: var(--primary);
  margin-bottom: 0.75rem;
  font-family: var(--font-header);
  font-weight: 600;
}

.category-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
}

.category-card li {
  font-size: var(--font-size-small);
  color: var(--main-text);
  margin-bottom: 0.25rem;
  padding: 0.25rem 0;
  border-bottom: 1px solid var(--border-color);
}

.category-card li:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

/* Responsive Category Grid */
@media (max-width: 1200px) {
  .category-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 992px) {
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .category-grid {
    grid-template-columns: 1fr;
  }
  
  .category-card {
    padding: 1rem;
  }
}

/* Hero Video */
.video-wrapper {
  position: relative;
  width: 100%;
  max-width: 1280px;
  margin: 2rem auto 3.5rem auto;
  padding: 0 2rem;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: none;
  aspect-ratio: 16/9;
}

.hero-video-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 992px) {
  .video-wrapper {
    padding: 0 1rem;
    margin: 1.5rem auto 2.5rem auto;
  }

  .sidebar {
    position: relative;
    height: auto;
    width: 100%;
  }

  .sidebar-cta {
    position: relative;
    padding: 1.5rem 0;
    margin-top: 1rem;
  }
}

@media (max-width: 576px) {
  .video-wrapper {
    padding: 0 0.75rem;
    margin: 1rem auto 2rem auto;
  }

  .subtitle {
    font-size: 12px;
  }
}

/* Update subtitle font */
.subtitle {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--main-text);
  margin-bottom: 1.5rem;
  opacity: 0.9;
}

/* Update sidebar CTA positioning */
.sidebar {
  position: fixed;
  height: 100vh;
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
}

.sidebar-content {
  flex: 1;
  overflow-y: auto;
}

.sidebar-cta {
  margin-top: auto;
  padding: 1.5rem;
  background: var(--sidebar-bg);
  text-align: center;
}

.sidebar-cta .trial-text {
  font-family: var(--font-mono);
  font-size: var(--font-size-small);
  color: var(--main-text);
  padding: 1rem;
  border-top: 1px solid var(--border-color);
}

.sidebar-cta .cta-buttons {
  display: flex;
  gap: 0.5rem;
  padding: 0 1rem;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-cta .btn {
  flex: 1;
  border: none;
  border-top: 1px solid var(--border-color);
  border-radius: 0;
  margin: 0;
  padding: 0.75rem;
  text-align: center;
}

@media (max-width: 992px) {
  .sidebar-cta {
    position: relative;
    padding: 0;
    margin-top: 1rem;
  }
  
  .sidebar-cta .cta-buttons {
    padding: 0;
  }
  
  .sidebar-cta .btn {
    margin: 0;
  }
}

@media (max-width: 576px) {
  .video-wrapper {
    padding: 0 0.75rem;
    margin: 1rem auto 2rem auto;
  }

  .subtitle {
    font-size: 12px;
  }
}

/* Mobile top logo: hidden by default */
.mobile-top-logo {
  display: none;
}

@media (max-width: 576px) {
  .mobile-top-logo {
    display: block;
    width: 100%;
    text-align: center;
    padding: 1.5rem 0 0.5rem 0;
    background: var(--sidebar-bg, #FFF9F2);
    z-index: 2000;
    position: relative;
  }
  .mobile-top-logo .site-logo {
    height: 40px !important;
    margin: 0 auto;
    display: inline-block;
  }
  /* Hide sidebar logo on mobile */
  .sidebar .site-logo {
    display: none !important;
  }
  /* Add top margin to homepage-container to avoid overlap */
  .homepage-container {
    margin-top: 60px;
  }
}

.quote-text {
  font-family: 'Hedvig Letters Serif', serif;
  font-size: 1.25rem;
  display: block;
  margin-bottom: 3rem;
}

.quote-cite {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 0.875rem;
  display: block;
  margin-top: 0.5rem;
  font-style: normal;
  text-align: right;
}

/* Lesson Grid Layout */
.lesson-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.lesson-card {
    background-color: var(--white);
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.lesson-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.lesson-card .lesson-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.lesson-card .lesson-meta {
    margin-bottom: 10px;
}

.lesson-card .lesson-date-views {
    font-family: var(--font-mono);
    font-size: var(--font-size-small);
    color: var(--main-text);
    opacity: 0.8;
}

.lesson-card .lesson-title {
    font-size: var(--font-size-h4);
    margin: 0;
}

.lesson-card .lesson-title a {
    color: var(--heading-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.lesson-card .lesson-title a:hover {
    color: var(--primary-color);
}

.lesson-card .lesson-content {
    padding: 20px;
}

.lesson-card .lesson-thumbnail {
    margin-bottom: 15px;
}

.lesson-card .lesson-thumbnail img {
    width: 100%;
    height: auto;
    border-radius: 3px;
}

.lesson-card .lesson-excerpt {
    font-size: var(--font-size-small);
    color: var(--main-text);
    margin-bottom: 15px;
    line-height: 1.6;
}

.lesson-card .read-more {
    display: inline-block;
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.lesson-card .read-more:hover {
    color: var(--accent-color);
}