/* ===== Esti Central — Custom Styles ===== */

/* --- CSS Custom Properties (Light Theme) --- */
:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;
  --bg-tertiary: #f3f4f6;
  --text-primary: #111827;
  --text-secondary: #374151;
  --text-tertiary: #6b7280;
  --border-primary: #e5e7eb;
  --border-secondary: #d1d5db;
  --brand-color: #E13F4E;
  --sidebar-width: 256px;
}

/* --- Dark Theme --- */
[data-theme="dark"] {
  --bg-primary: #2d2d2d;
  --bg-secondary: #383838;
  --bg-tertiary: #424242;
  --text-primary: #f9fafb;
  --text-secondary: #e5e7eb;
  --text-tertiary: #9ca3af;
  --border-primary: #525252;
  --border-secondary: #626262;
  --brand-color: #E13F4E;
}

/* --- Base --- */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  margin: 0;
  min-height: 100vh;
}

/* --- Sidebar --- */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  height: 100%;
  width: var(--sidebar-width);
  background-color: var(--bg-primary);
  border-right: 1px solid var(--border-primary);
  z-index: 40;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
}

.sidebar-logo {
  padding: 1.5rem;
  display: flex;
  justify-content: center;
}

.sidebar-logo img {
  height: 80px;
  width: auto;
}

.sidebar-nav {
  flex: 1;
  padding: 1rem 0;
  overflow-y: auto;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  margin: 0.125rem 0.75rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  transition: background-color 0.15s ease, color 0.15s ease;
  border-radius: 0.5rem;
}

.sidebar-nav a i,
.sidebar-nav a svg {
  color: var(--brand-color);
  width: 22px !important;
  height: 22px !important;
}

.sidebar-nav a:hover {
  background-color: rgba(225, 63, 78, 0.1);
  color: var(--brand-color);
}

.sidebar-nav a.active {
  background-color: rgba(225, 63, 78, 0.1);
  color: var(--brand-color);
  font-weight: 600;
}

.sidebar-nav a.active i,
.sidebar-nav a.active svg {
  color: var(--brand-color);
}

/* --- Sidebar Collapse Button --- */
.sidebar-collapse-btn {
  position: absolute;
  top: 1.25rem;
  right: 0.75rem;
  background: none;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 0.25rem;
  transition: color 0.15s ease;
}

.sidebar-collapse-btn:hover {
  color: var(--text-primary);
}

/* --- Collapsed Sidebar --- */
.sidebar.collapsed {
  transform: translateX(-100%);
}

.sidebar.collapsed ~ .main-header,
.sidebar.collapsed ~ .main-content {
  margin-left: 0;
}

.sidebar.collapsed ~ .main-header .hamburger {
  display: inline-flex;
}

.sidebar-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-primary);
}

/* --- Dark Mode Toggle --- */
.dark-mode-toggle {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: 'Poppins', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  width: 100%;
  transition: color 0.15s ease;
}

.dark-mode-toggle:hover {
  color: var(--text-primary);
}

.dark-mode-toggle .icon-sun,
.dark-mode-toggle .icon-moon {
  display: none;
}

:root .dark-mode-toggle .icon-sun {
  display: inline-flex;
}

[data-theme="dark"] .dark-mode-toggle .icon-moon {
  display: inline-flex;
}

[data-theme="dark"] .dark-mode-toggle .icon-sun {
  display: none;
}

/* --- Mobile Overlay --- */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 35;
}

.sidebar-overlay.active {
  display: block;
}

/* --- Header --- */
.main-header {
  background-color: var(--bg-primary);
  border-bottom: 1px solid var(--border-primary);
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-left: var(--sidebar-width);
}

.main-header .hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 0.5rem;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}

.main-header .page-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.header-dark-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.5rem;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}

/* --- Main Content --- */
.main-content {
  margin-left: var(--sidebar-width);
  padding: 2rem;
  min-height: calc(100vh - 57px);
}

/* --- Page Hero --- */
.page-hero {
  margin-bottom: 2.5rem;
}

.page-hero-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.page-hero-subtitle {
  font-size: 1rem;
  color: var(--text-tertiary);
  margin: 0;
  max-width: 560px;
  line-height: 1.6;
}

/* --- Accordion --- */
.accordion-item {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-primary);
  border-radius: 1rem;
  margin-bottom: 1.25rem;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.accordion-item:hover {
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.06);
  border-color: var(--border-secondary);
}

[data-theme="dark"] .accordion-item {
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

[data-theme="dark"] .accordion-item:hover {
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);
}

.accordion-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.75rem;
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  color: var(--text-primary);
  text-align: left;
  transition: background-color 0.15s ease;
  min-height: 44px;
}

.accordion-header:hover {
  background-color: var(--bg-tertiary);
}

.accordion-header .accordion-icon {
  color: var(--brand-color);
  flex-shrink: 0;
}

.accordion-header .accordion-title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text-primary);
}

.accordion-header .accordion-subtitle {
  font-size: 0.875rem;
  color: var(--text-tertiary);
  margin-top: 0.25rem;
}

.accordion-header .accordion-chevron {
  color: var(--text-tertiary);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.accordion-header.expanded .accordion-chevron {
  transform: rotate(180deg);
}

.accordion-content {
  padding: 0 1.25rem 1.25rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.6;
}

.accordion-content[hidden] {
  display: none;
}

/* --- Video Embed (16:9) --- */
.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0.5rem;
}

/* --- Coming Soon --- */
.coming-soon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  padding: 2rem;
}

.coming-soon-icon {
  color: var(--brand-color);
  margin-bottom: 1.5rem;
}

.coming-soon h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.5rem;
}

.coming-soon p {
  color: var(--text-tertiary);
  font-size: 0.9375rem;
  max-width: 400px;
  margin: 0;
}

/* --- Content Helpers --- */
.content-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.8125rem;
}

.content-table th,
.content-table td {
  border: 1px solid var(--border-primary);
  padding: 0.5rem 0.75rem;
  text-align: left;
}

.content-table th {
  background-color: var(--bg-tertiary);
  font-weight: 600;
  color: var(--text-primary);
}

.content-table td {
  color: var(--text-secondary);
}

.download-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-primary);
  border-radius: 0.5rem;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background-color 0.15s ease, border-color 0.15s ease;
  min-height: 44px;
}

.download-link:hover {
  background-color: var(--bg-secondary);
  border-color: var(--border-secondary);
}

.featured-card {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-primary);
  border-radius: 0.75rem;
  padding: 1.5rem;
  transition: border-color 0.15s ease;
}

.featured-card:hover {
  border-color: var(--brand-color);
}

/* --- Responsive (Mobile) --- */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-header {
    margin-left: 0;
  }

  .main-header .hamburger {
    display: inline-flex;
  }

  .header-dark-toggle {
    display: inline-flex;
  }

  .main-content {
    margin-left: 0;
    padding: 1.25rem;
  }
}

/* --- Accessibility --- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

:focus-visible {
  outline: 2px solid var(--brand-color);
  outline-offset: 2px;
}

/* --- Accordion Icon Circle --- */
.accordion-icon-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background-color: rgba(225, 63, 78, 0.1);
  color: var(--brand-color);
  flex-shrink: 0;
}

.accordion-icon--blue {
  background-color: #dbeafe;
}

.accordion-icon--purple {
  background-color: #ede9fe;
}

.accordion-icon--peach {
  background-color: #ffedd5;
}

.accordion-icon--green {
  background-color: #dcfce7;
}

[data-theme="dark"] .accordion-icon--blue {
  background-color: rgba(59, 130, 246, 0.15);
}

[data-theme="dark"] .accordion-icon--purple {
  background-color: rgba(139, 92, 246, 0.15);
}

[data-theme="dark"] .accordion-icon--peach {
  background-color: rgba(249, 115, 22, 0.15);
}

[data-theme="dark"] .accordion-icon--green {
  background-color: rgba(34, 197, 94, 0.15);
}

/* --- Callout Boxes --- */
.callout-warning {
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  border-left: 4px solid #ef4444;
  border-radius: 0.5rem;
  padding: 1rem 1.25rem;
  margin: 1rem 0;
  color: #991b1b;
  font-size: 0.8125rem;
  line-height: 1.6;
}

[data-theme="dark"] .callout-warning {
  background-color: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.25);
  border-left-color: #ef4444;
  color: #fca5a5;
}

.callout-warning strong {
  color: #b91c1c;
}

[data-theme="dark"] .callout-warning strong {
  color: #fca5a5;
}

.callout-info {
  background-color: #eff6ff;
  border: 1px solid #bfdbfe;
  border-left: 4px solid #3b82f6;
  border-radius: 0.5rem;
  padding: 1rem 1.25rem;
  margin: 1rem 0;
  color: #1e40af;
  font-size: 0.8125rem;
  line-height: 1.6;
}

[data-theme="dark"] .callout-info {
  background-color: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.25);
  border-left-color: #3b82f6;
  color: #93c5fd;
}

.callout-info strong {
  color: #1d4ed8;
}

[data-theme="dark"] .callout-info strong {
  color: #93c5fd;
}

.callout-important {
  background-color: rgba(225, 63, 78, 0.06);
  border: 1px solid rgba(225, 63, 78, 0.2);
  border-left: 4px solid var(--brand-color);
  border-radius: 0.5rem;
  padding: 1rem 1.25rem;
  margin: 1rem 0;
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.6;
}

[data-theme="dark"] .callout-important {
  background-color: rgba(225, 63, 78, 0.1);
  border-color: rgba(225, 63, 78, 0.25);
  border-left-color: var(--brand-color);
}

/* --- Step Cards (Calibration Flow) --- */
.step-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.step-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: 0.5rem;
  padding: 1.25rem;
}

.step-card-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: var(--brand-color);
  color: #ffffff;
  font-size: 0.8125rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.step-card-title {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.step-card ul {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* --- Striped Table Rows --- */
.content-table.striped tbody tr:nth-child(even) {
  background-color: var(--bg-secondary);
}

/* --- Section Divider --- */
.section-divider {
  border: none;
  border-top: 1px solid var(--border-primary);
  margin: 1.5rem 0;
}

/* --- Protocol Steps --- */
.protocol-step {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  align-items: flex-start;
}

.protocol-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  border-radius: 50%;
  background-color: var(--brand-color);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.protocol-step-text {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.protocol-step-text strong {
  color: var(--text-primary);
}

.protocol-step-sub {
  margin-top: 0.375rem;
  padding-left: 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  line-height: 1.6;
}

/* --- Expected Response Box --- */
.expected-response {
  background-color: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-left: 4px solid #22c55e;
  border-radius: 0.5rem;
  padding: 1rem 1.25rem;
  margin: 1rem 0;
  color: #166534;
  font-size: 0.8125rem;
  line-height: 1.6;
}

[data-theme="dark"] .expected-response {
  background-color: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.25);
  border-left-color: #22c55e;
  color: #86efac;
}

.expected-response strong {
  color: #15803d;
}

[data-theme="dark"] .expected-response strong {
  color: #86efac;
}

/* --- Subsection Title --- */
.subsection-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.75rem;
}

/* --- Callout Lists --- */
.callout-warning ul,
.callout-info ul,
.callout-important ul,
.expected-response ul {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
}

.callout-warning li,
.callout-info li,
.callout-important li,
.expected-response li {
  margin-bottom: 0.25rem;
}

/* --- PDF Embeds (displayed as images) --- */
.pdf-embed {
  width: 100%;
  height: auto;
  border: 1px solid var(--border-primary);
  border-radius: 0.5rem;
  display: block;
}

/* --- Mobile: Step Cards stack --- */
@media (max-width: 768px) {
  .step-cards {
    grid-template-columns: 1fr;
  }
}

/* ===== Pill Toggle ===== */
.pill-toggle-wrapper {
  margin-bottom: 1.5rem;
}

.pill-toggle-container {
  display: inline-flex;
  border-radius: 8px;
  padding: 3px;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-primary);
}

.pill-btn {
  padding: 0.5rem 1.25rem;
  border: none;
  border-radius: 6px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  background: transparent;
  color: var(--text-tertiary);
}

.pill-btn:hover {
  color: var(--text-primary);
}

.pill-btn--active {
  background-color: var(--text-primary);
  color: var(--bg-primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .pill-btn--active {
  background-color: var(--text-primary);
  color: var(--bg-primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* ===== Courses Grid ===== */
.course-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.course-card {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-primary);
  border-radius: 0.75rem;
  padding: 1.5rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.course-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .course-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.course-card-body {
  display: flex;
  flex-direction: column;
}

.course-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  width: fit-content;
}

.course-badge--new {
  background-color: rgba(225, 63, 78, 0.1);
  color: var(--brand-color);
}

.course-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.course-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.8125rem;
  color: var(--text-tertiary);
}

.course-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.course-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-primary);
  background: none;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.course-card:hover .course-arrow {
  background-color: var(--brand-color);
  border-color: var(--brand-color);
  color: #ffffff;
}

/* ===== Back to Courses ===== */
.back-to-courses {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-tertiary);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.5rem 1rem 0.75rem;
  margin-bottom: 0;
  cursor: pointer;
  transition: color 0.15s ease;
}

.back-to-courses:hover {
  color: var(--brand-color);
}

/* ===== Guide Sidebar ===== */
.guide-sidebar {
  position: fixed;
  top: 57px;
  left: var(--sidebar-width);
  width: 280px;
  height: calc(100vh - 57px);
  overflow-y: auto;
  background-color: var(--bg-primary);
  border-right: 1px solid var(--border-primary);
  padding: 1.25rem 0;
  z-index: 20;
}

.sidebar.collapsed ~ .main-content .guide-sidebar {
  left: 0;
}

.guide-sidebar-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
  padding: 0 1rem 0.75rem;
  text-transform: uppercase;
}

.guide-chapter {
  margin-bottom: 0.125rem;
}

.guide-chapter-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  border: none;
  background: none;
  color: var(--text-secondary);
  font-family: 'Poppins', sans-serif;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.guide-chapter-btn:hover {
  background-color: var(--bg-tertiary);
}

.guide-chapter-btn.active {
  background-color: var(--brand-color);
  color: #ffffff;
}

.guide-chapter-btn span {
  flex: 1;
}

.ch-chevron {
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.guide-chapter-btn.active .ch-chevron {
  transform: rotate(90deg);
}

.guide-subsections {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.guide-subsection-link {
  display: block;
  padding: 0.4rem 1rem 0.4rem 2.75rem;
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s ease;
}

.guide-subsection-link:hover {
  color: var(--text-primary);
}

.guide-subsection-link.active {
  color: var(--brand-color);
  font-weight: 600;
}

/* ===== Guide Layout ===== */
.guide-layout {
  margin-left: 280px;
  min-height: calc(100vh - 8rem);
}

.guide-content {
  max-width: 960px;
  padding: 2rem 2.5rem 4rem;
}

.chapter-section {
  border-bottom: 2px solid var(--border-primary);
  padding-bottom: 2rem;
  margin-bottom: 2rem;
  scroll-margin-top: 6rem;
}

.chapter-section:last-child {
  border-bottom: none;
}

.chapter-heading {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 1rem;
}

.sub-section {
  border-top: 1px solid var(--border-primary);
  margin-top: 2.5rem;
  padding-top: 2rem;
  scroll-margin-top: 6rem;
}

.sub-section:first-of-type {
  border-top: none;
  margin-top: 0;
  padding-top: 0;
}

.sub-heading {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 1rem;
}

.guide-subheading {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 1.25rem 0 0.5rem;
}

.guide-content p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0 0 0.75rem;
}

/* ===== Chapter Video (16:9) ===== */
.chapter-video {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 12px;
  max-width: 720px;
  margin-bottom: 1.25rem;
  background-color: var(--bg-tertiary);
}

.chapter-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 12px;
}

/* ===== Hidden utility ===== */
.hidden {
  display: none !important;
}

/* ===== Guide Responsive (<900px) ===== */
@media (max-width: 900px) {
  .guide-sidebar {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    height: auto;
    max-height: none;
    border-right: none;
    border-bottom: 1px solid var(--border-primary);
    padding: 1rem 0;
  }

  .guide-layout {
    margin-left: 0;
  }

  .guide-content {
    padding: 1.5rem 0 3rem;
  }

  .chapter-video {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .course-cards-grid {
    grid-template-columns: 1fr;
  }

  .sidebar.collapsed ~ .main-content .guide-sidebar {
    left: auto;
  }
}
