/* Home Sections Styles */

.home-section-highlight {
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.35);
  border-radius: 20px;
  transition: box-shadow 0.3s ease;
}

/* Hero Section Improvements */
.welcome-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: start;
  margin-bottom: 24px;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero-tagline {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1d4ed8;
  margin: 0;
}

.hero-description {
  font-size: 1rem;
  line-height: 1.6;
  color: #475569;
  margin: 0;
  max-width: 600px;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 220px;
}

.btn-hero-cta {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  padding: 14px 24px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 12px;
  transition: all 0.2s ease;
}

.btn-hero-cta.btn-primary {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-hero-cta.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
}

.btn-hero-cta.btn-secondary {
  background: white;
  color: #2563eb;
  border: 2px solid #2563eb;
}

.btn-hero-cta.btn-secondary:hover {
  background: #f8fafc;
  transform: translateY(-2px);
}

.btn-icon {
  font-size: 1.2rem;
}

/* Hero Progress */
.hero-progress {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 16px;
  border: 1px solid rgba(59, 130, 246, 0.2);
  margin-bottom: 24px;
}

.progress-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.progress-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.progress-bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.progress-bar-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.progress-level {
  font-weight: 600;
  color: #0f172a;
  min-width: 32px;
  font-size: 0.9rem;
}

.progress-bar-mini {
  flex: 1;
  height: 8px;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 4px;
  overflow: hidden;
  max-width: 120px;
}

.progress-fill-mini {
  height: 100%;
  background: linear-gradient(90deg, #2563eb 0%, #3b82f6 100%);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.progress-text {
  font-size: 0.875rem;
  font-weight: 600;
  color: #2563eb;
  min-width: 40px;
  text-align: right;
}

.streak-display-hero {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.25rem;
  font-weight: 600;
  color: #0f172a;
}

.streak-icon {
  font-size: 1.5rem;
}

/* Home Sections Container */
.home-sections {
  display: flex;
  flex-direction: column;
  gap: 48px;
  margin-top: 32px;
}

.home-sections.hidden {
  display: none;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 24px 0;
}

/* Learning Path Section */
.learning-path-section {
  padding: 32px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(14, 165, 233, 0.05) 100%);
  border-radius: 24px;
  border: 1px solid rgba(59, 130, 246, 0.15);
}

/* New Learning Path Tracks */
.learning-path-tracks {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Track container */
.learning-path-track {
  border-radius: 18px;
  padding: 12px 16px 16px;
  background: #e5f0ff; /* very light blue/gray */
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.learning-path-track-header {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.learning-path-track-icon {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  box-shadow: 0 6px 12px rgba(15, 23, 42, 0.12);
}

.learning-path-track-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #111827;
}

.learning-path-track-desc {
  font-size: 0.8rem;
  color: #4b5563;
}

/* Level row */
.learning-path-levels {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: stretch;
  gap: 10px;
  margin-top: 4px;
}

.learning-path-levels-single {
  grid-template-columns: minmax(0, 1fr);
}

/* Level card */
.learning-path-level-card {
  background: #ffffff;
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.4);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.learning-path-chip {
  align-self: flex-start;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid rgba(191, 219, 254, 0.9);
}

.learning-path-level-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #111827;
}

.learning-path-level-sub {
  font-size: 0.78rem;
  color: #6b7280;
}

.learning-path-progress {
  font-size: 0.75rem;
  color: #4b5563;
  margin-top: 2px;
  min-height: 1em;
}

/* Arrow between levels */
.learning-path-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #9ca3af;
}

/* Inline lesson list below level card */
.learning-path-lessons-list {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.3);
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 300px;
  overflow-y: auto;
}

.learning-path-lesson-item {
  padding: 10px 12px;
  background: #f9fafb;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  font-size: 0.85rem;
}

.learning-path-lesson-item:hover {
  background: #eff6ff;
  border-color: #3b82f6;
  transform: translateX(2px);
}

.learning-path-lesson-item-title {
  font-weight: 600;
  color: #111827;
  margin-bottom: 4px;
}

.learning-path-lesson-item-meta {
  font-size: 0.75rem;
  color: #6b7280;
}

.path-cards {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.path-card {
  flex: 1;
  min-width: 160px;
  max-width: 200px;
  padding: 20px;
  background: white;
  border-radius: 16px;
  border: 2px solid rgba(59, 130, 246, 0.2);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.2s ease;
}

.path-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(59, 130, 246, 0.2);
  border-color: #3b82f6;
}

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

.path-level {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
}

.path-progress-text {
  font-size: 0.875rem;
  font-weight: 600;
  color: #2563eb;
}

.path-progress-bar {
  height: 8px;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.path-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #2563eb 0%, #3b82f6 100%);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.path-card-btn {
  padding: 10px 16px;
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.path-card-btn:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

.path-arrow {
  font-size: 1.5rem;
  color: #94a3b8;
  font-weight: 300;
}

/* Situation Section */
.situation-section {
  padding: 32px;
  background: white;
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.situation-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
}

.situation-card {
  padding: 24px 16px;
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.8) 0%, rgba(241, 245, 249, 0.8) 100%);
  border: 2px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.situation-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.1);
  border-color: #3b82f6;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(14, 165, 233, 0.05) 100%);
}

.situation-icon {
  font-size: 2.5rem;
}

.situation-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: #0f172a;
}

.situation-card.is-selected {
  border-color: #2563eb;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.25);
}

/* Scenario Detail Panel */
.scenario-detail-empty {
  font-size: 0.84rem;
  color: #6b7280;
}

.scenario-detail-content {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.scenario-detail-header {
  display: flex;
  gap: 10px;
  align-items: center;
}

.scenario-detail-icon {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  background: #eff6ff;
  color: #1d4ed8;
}

.scenario-detail-title {
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
}

.scenario-detail-desc {
  font-size: 0.82rem;
  color: #4b5563;
}

/* Steps */
.scenario-steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.scenario-step-card {
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: #f9fafb;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.8rem;
}

.scenario-step-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7280;
}

.scenario-step-title {
  font-weight: 600;
  color: #111827;
}

.scenario-step-desc {
  font-size: 0.78rem;
  color: #4b5563;
}

.scenario-step-footer {
  margin-top: 4px;
  display: flex;
  justify-content: flex-end;
}

/* Featured Section */
.featured-section {
  padding: 32px;
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.05) 0%, rgba(251, 207, 232, 0.05) 100%);
  border-radius: 24px;
  border: 1px solid rgba(236, 72, 153, 0.15);
}

.featured-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.featured-card {
  padding: 24px;
  background: white;
  border-radius: 16px;
  border: 2px solid rgba(236, 72, 153, 0.2);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all 0.2s ease;
}

.featured-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(236, 72, 153, 0.2);
  border-color: #ec4899;
}

.featured-card-content {
  flex: 1;
}

.featured-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #0f172a;
  margin: 0 0 8px 0;
}

.featured-card-meta {
  font-size: 0.875rem;
  color: #64748b;
  margin: 0;
}

.featured-card-btn {
  padding: 10px 40px 10px 16px;
  background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  align-self: flex-start;
  position: relative;
}

.featured-card-btn:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3);
}

/* Dark Mode */
body.theme-dark .hero-tagline {
  color: #60a5fa;
}

body.theme-dark .hero-description {
  color: #cbd5e1;
}

body.theme-dark .hero-progress {
  background: rgba(30, 41, 59, 0.6);
  border-color: rgba(59, 130, 246, 0.3);
}

body.theme-dark .progress-level,
body.theme-dark .streak-display-hero {
  color: #f1f5f9;
}

body.theme-dark .path-card,
body.theme-dark .situation-card,
body.theme-dark .featured-card {
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(148, 163, 184, 0.3);
}

body.theme-dark .path-card:hover,
body.theme-dark .situation-card:hover,
body.theme-dark .featured-card:hover {
  background: rgba(30, 41, 59, 0.95);
}

body.theme-dark .section-title {
  color: #f1f5f9;
}

body.theme-dark .situation-name,
body.theme-dark .featured-card-title {
  color: #f1f5f9;
}

body.theme-dark .featured-card-meta {
  color: #94a3b8;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .welcome-hero {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hero-actions {
    min-width: 100%;
  }

  .hero-progress {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .path-cards {
    flex-direction: column;
  }

  .path-arrow {
    transform: rotate(90deg);
  }

  .path-card {
    max-width: 100%;
  }

  .learning-path-levels {
    grid-template-columns: minmax(0, 1fr);
  }

  .learning-path-arrow {
    display: none;
  }

  .scenario-steps-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .situation-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .featured-cards {
    grid-template-columns: 1fr;
  }

  .section-title {
    font-size: 1.5rem;
  }
}

/* Featured Lessons - Carousel */
.home-section-featured {
  padding: 18px 20px 14px;
}

.home-featured-carousel {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.home-featured-viewport {
  overflow: hidden;
}

.home-featured-track {
  display: flex;
  transition: transform 0.35s ease;
}

/* Each slide is itself a flex container of 1 or 2 cards */
.home-featured-slide {
  display: flex;
  gap: 10px;
  min-width: 100%;
  flex-shrink: 0;
}

.home-featured-card {
  flex: 1;
  border-radius: 16px;
  background: #fef2f2;
  border: 1px solid rgba(251, 113, 133, 0.35);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.84rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.home-featured-card:hover {
  background: #fee2e2;
  border-color: rgba(251, 113, 133, 0.5);
  transform: translateY(-1px);
}

.home-featured-arrow {
  border: none;
  background: transparent;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #6b7280;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}

.home-featured-arrow:hover {
  background: rgba(209, 213, 219, 0.7);
  color: #111827;
}

/* Dots */
.home-featured-dots {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 6px;
  margin-bottom: 6px;
}

.home-featured-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #e5e7eb;
  cursor: pointer;
  transition: background 0.2s ease;
}

.home-featured-dot:hover {
  background: #d1d5db;
}

.home-featured-dot.is-active {
  background: #2563eb;
  width: 20px;
}

.home-featured-title {
  font-weight: 600;
  color: #111827;
  font-size: 0.9rem;
}

.home-featured-meta {
  font-size: 0.78rem;
  color: #6b7280;
}

.home-featured-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 2px;
}

.home-featured-tag {
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 999px;
  background: #fee2e2;
  color: #b91c1c;
}

.home-featured-footer {
  margin-top: 4px;
  display: flex;
  justify-content: flex-end;
}

.home-featured-footer .home-btn {
  font-size: 0.78rem;
  padding: 4px 10px;
}

.home-section-footer {
  margin-top: 8px;
  text-align: center;
}

.home-link-button {
  background: transparent;
  border: none;
  color: #2563eb;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.2s ease;
}

.home-link-button:hover {
  background: rgba(37, 99, 235, 0.1);
}

/* Recent Added Lessons */
.home-recent-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.82rem;
}

.home-recent-item {
  padding: 6px 8px;
  border-radius: 10px;
  background: #f9fafb;
  border: 1px solid rgba(209, 213, 219, 0.7);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.home-recent-item:hover {
  background: #f3f4f6;
  border-color: rgba(209, 213, 219, 1);
}

.home-recent-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.home-recent-title {
  font-weight: 600;
  color: #111827;
}

.home-recent-meta {
  font-size: 0.75rem;
  color: #6b7280;
}

.home-recent-badge {
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 999px;
  background: #ecfeff;
  color: #0e7490;
  margin-left: 8px;
}

/* Daily Proverb */
.home-card-proverb {
  padding: 10px 12px;
  border-radius: 16px;
  background: #fefce8;
  border: 1px solid rgba(250, 204, 21, 0.45);
  font-size: 0.85rem;
}

.home-proverb-text {
  font-weight: 600;
  color: #854d0e;
  margin-bottom: 4px;
  font-size: 0.9rem;
}

.home-proverb-meaning {
  font-size: 0.8rem;
  color: #92400e;
  font-style: italic;
}

/* Study History */
.home-history-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.8rem;
}

.home-history-item {
  padding: 6px 8px;
  border-radius: 10px;
  background: #f9fafb;
  border: 1px solid rgba(209, 213, 219, 0.7);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 6px;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.home-history-item:hover {
  background: #f3f4f6;
  border-color: rgba(209, 213, 219, 1);
}

.home-history-icon {
  font-size: 1rem;
  line-height: 1;
}

.home-history-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.home-history-title {
  font-weight: 600;
  color: #111827;
  font-size: 0.85rem;
}

.home-history-meta {
  font-size: 0.74rem;
  color: #6b7280;
}

.home-history-time {
  font-size: 0.75rem;
  color: #9ca3af;
  white-space: nowrap;
}

/* Hide streak card on desktop */
@media (min-width: 769px) {
  .home-card-streak {
    display: none;
  }
}

@media (max-width: 768px) {
  .home-card-streak {
    display: block;
  }
  
  .home-featured-slide {
    flex-direction: column;
  }
}

/* Quick Review Empty Message */
.quick-review-empty {
  font-size: 0.8rem;
  color: #6b7280;
  margin-bottom: 6px;
  line-height: 1.4;
}

.home-btn.is-disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

