/* ============================================================
   components.css — Cards, Boxes, Breadcrumbs, Buttons, Badges
   ============================================================ */

/* ============================================================
   Lesson Cards
   ============================================================ */
.lesson-card {
  position: relative;
  background: var(--bg-card);
  border-radius: 16px;
  padding: 24px 20px 20px;
  box-shadow: 0 2px 12px var(--shadow);
  cursor: pointer;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
  transition:
    transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.22s ease;
  border: 1.5px solid transparent;
}

.lesson-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 36px rgba(61, 40, 23, 0.14);
  border-color: rgba(224, 122, 95, 0.18);
  text-decoration: none;
}

/* Big lesson number watermark in background */
.lesson-card .card-num-bg {
  position: absolute;
  left: 12px;
  bottom: -8px;
  font-family: 'Heebo', sans-serif;
  font-size: 72px;
  font-weight: 800;
  color: var(--text-primary);
  opacity: 0.06;
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

/* Icon */
.lesson-card .card-icon {
  font-size: 48px;
  line-height: 1;
  display: block;
  margin-bottom: 4px;
}

/* Status badge */
.lesson-card .status-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
}

/* --- Completed --- */
.lesson-card[data-status="completed"] {
  border-color: rgba(129, 178, 154, 0.3);
  background: linear-gradient(135deg, #fff 80%, rgba(200, 224, 213, 0.3));
}

.lesson-card[data-status="completed"] .status-badge {
  background: var(--herb);
  color: #fff;
}

.lesson-card[data-status="completed"] .status-badge::after {
  content: '✓';
}

/* --- Active --- */
.lesson-card[data-status="active"] {
  border-color: rgba(224, 122, 95, 0.35);
  background: linear-gradient(135deg, #fff 80%, rgba(242, 204, 143, 0.18));
  box-shadow: 0 4px 20px rgba(224, 122, 95, 0.15);
}

.lesson-card[data-status="active"] .status-badge {
  background: var(--accent);
  color: #fff;
  animation: pulse-badge 2.2s ease-in-out infinite;
}

.lesson-card[data-status="active"] .status-badge::after {
  content: '●';
  font-size: 0.55rem;
}

@keyframes pulse-badge {
  0%, 100% { box-shadow: 0 0 0 0 rgba(224, 122, 95, 0.5); }
  50%       { box-shadow: 0 0 0 6px rgba(224, 122, 95, 0); }
}

/* --- Todo --- */
.lesson-card[data-status="todo"] {
  border-color: rgba(156, 132, 112, 0.12);
}

.lesson-card[data-status="todo"] .status-badge {
  background: rgba(156, 132, 112, 0.12);
  color: var(--text-muted);
  border: 1.5px solid rgba(156, 132, 112, 0.3);
}

.lesson-card[data-status="todo"] .status-badge::after {
  content: '○';
  font-size: 0.85rem;
}

.lesson-card[data-status="todo"] .card-icon {
  opacity: 0.5;
}

/* Card title */
.lesson-card .card-title {
  font-family: 'Heebo', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  margin: 0;
}

.lesson-card[data-status="todo"] .card-title {
  color: var(--text-soft);
}

/* Card description */
.lesson-card .card-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
  flex: 1;
}

/* Reading time on card */
.lesson-card .card-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

.lesson-card .card-time::before {
  content: '⏱';
  font-size: 0.8rem;
}

/* ============================================================
   Info / Warning / Safety Boxes
   ============================================================ */
.tip-box,
.warning-box,
.safety-box {
  border-radius: 8px;
  padding: 16px 18px;
  margin: 24px 0;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tip-box {
  background: var(--herb-light);
  border-right: 4px solid var(--herb);
}

.warning-box {
  background: var(--warning-light);
  border-right: 4px solid var(--warning);
}

.safety-box {
  background: var(--danger-light);
  border-right: 4px solid var(--danger);
}

/* Box icon + label */
.tip-box::before,
.warning-box::before,
.safety-box::before {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: block;
  margin-bottom: 2px;
}

.tip-box::before {
  content: '💡 טיפ';
  color: var(--herb);
}

.warning-box::before {
  content: '⚠️ שים לב';
  color: var(--warning);
}

.safety-box::before {
  content: '🔴 בטיחות';
  color: var(--danger);
}

.tip-box p,
.warning-box p,
.safety-box p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.6;
}

.tip-box p    { color: #3a5c4f; }
.warning-box p { color: #6a4a10; }
.safety-box p  { color: #6a1e1e; }

/* ============================================================
   Lesson Summary Block
   ============================================================ */
.lesson-summary {
  background: var(--bg-warm);
  border-radius: 12px;
  padding: 24px 28px;
  margin-top: 40px;
}

.lesson-summary h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.lesson-summary h3::before {
  content: '📋';
}

.lesson-summary ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lesson-summary ul li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.92rem;
  color: var(--text-soft);
  line-height: 1.5;
}

.lesson-summary ul li::before {
  content: '✓';
  color: var(--herb);
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ============================================================
   Breadcrumbs
   ============================================================ */
#breadcrumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 28px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

#breadcrumbs a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
}

#breadcrumbs a:hover {
  color: var(--accent);
}

#breadcrumbs .crumb-sep {
  color: var(--text-muted);
  opacity: 0.5;
  user-select: none;
}

#breadcrumbs .crumb-current {
  color: var(--text-soft);
  font-weight: 600;
}

/* ============================================================
   Badges (lesson meta)
   ============================================================ */
.lesson-num {
  font-family: 'Heebo', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--bg-warm);
  color: var(--text-muted);
  padding: 3px 10px;
  border-radius: 20px;
  display: inline-block;
}

.section-badge {
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(224, 122, 95, 0.12);
  color: var(--accent-dark);
  padding: 3px 10px;
  border-radius: 20px;
  display: inline-block;
}

.reading-badge {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.reading-badge::before {
  content: '⏱';
  font-size: 0.82rem;
}

/* ============================================================
   Navigation Buttons (prev / next)
   ============================================================ */
.nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px;
  border: 2px solid var(--accent);
  border-radius: 10px;
  font-family: 'Heebo', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent-dark);
  background: transparent;
  text-decoration: none;
  transition:
    background var(--transition),
    color var(--transition),
    transform 0.15s ease,
    box-shadow var(--transition);
}

.nav-btn:hover {
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(224, 122, 95, 0.3);
}

.nav-btn:active {
  transform: translateY(0);
}

.nav-prev {
  justify-self: start;
}

.nav-next {
  justify-self: end;
  background: var(--accent);
  color: #fff;
}

.nav-next:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

/* ============================================================
   Next Lesson Hint
   ============================================================ */
.next-hint {
  margin-top: 32px;
  padding: 16px 20px;
  background: rgba(129, 178, 154, 0.1);
  border-radius: 10px;
  border: 1px dashed rgba(129, 178, 154, 0.5);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--text-soft);
}

.next-hint::before {
  content: '👉';
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* ============================================================
   CTA Button (general)
   ============================================================ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  background: var(--accent);
  color: #fff;
  border-radius: 10px;
  font-family: 'Heebo', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition:
    background var(--transition),
    transform 0.15s ease,
    box-shadow var(--transition);
  box-shadow: 0 4px 14px rgba(224, 122, 95, 0.3);
}

.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(224, 122, 95, 0.4);
  color: #fff;
  text-decoration: none;
}

.btn-primary:active {
  transform: translateY(0);
}

/* ============================================================
   Mark-complete button (inside lesson)
   ============================================================ */
.mark-complete-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border: 2px solid var(--herb);
  border-radius: 10px;
  background: transparent;
  color: var(--herb);
  font-family: 'Heebo', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  margin-top: 24px;
}

.mark-complete-btn:hover,
.mark-complete-btn.done {
  background: var(--herb);
  color: #fff;
}

.mark-complete-btn.done::before {
  content: '✓ ';
}
