/*
  Stylesheet for the ISTQB CTFL v4.0 "learn" content section
  (pages/istqb-ctfl4/learn/*.php). Deliberately separate from css/style.css
  per this section's own nav/footer/css/js requirement - built on the same
  Tailwind CDN utility classes for layout, with the brand teal palette/
  shadow tokens duplicated here to match the rest of the site.
*/

/* ============================================================
   Syllabus timeline (learn home page)
   ============================================================ */
.learn-timeline {
  position: relative;
}

.learn-timeline-line {
  position: absolute;
  left: 23px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, #5eead4 0%, #e2e8f0 100%);
}

.learn-timeline-node {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 9999px;
  background: #0d9488;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.28);
}

.learn-topic-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border-radius: 0.65rem;
  padding: 0.6rem 0.85rem;
  font-size: 0.85rem;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.learn-topic-row--linked {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #334155;
  cursor: pointer;
}

.learn-topic-row--linked:hover {
  border-color: #5eead4;
  background: #f0fdfa;
}

.learn-topic-row--soon {
  background: transparent;
  border: 1px dashed #e2e8f0;
  color: #94a3b8;
  cursor: default;
}

.learn-coming-soon-badge {
  flex: 0 0 auto;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #94a3b8;
  background: #f1f5f9;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
}

.learn-new-badge {
  flex: 0 0 auto;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #ffffff;
  background: linear-gradient(135deg, #2dd4bf 0%, #0d9488 100%);
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  box-shadow: 0 2px 6px rgba(13, 148, 136, 0.3);
}

/* ============================================================
   Fact cards (learn home "About the exam" grid)
   ============================================================ */
.learn-fact-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 1.1rem 1.25rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.learn-fact-value {
  font-size: 1.4rem;
  font-weight: 800;
  color: #0f766e;
  line-height: 1.2;
}

/* ============================================================
   Concept cards (numbered principle / concept blocks)
   ============================================================ */
.learn-concept-card {
  display: flex;
  gap: 1rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 1.25rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.learn-concept-number {
  flex: 0 0 auto;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  background: #f0fdfa;
  color: #0d9488;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
}

/* ============================================================
   Example callouts (visually distinct from concept cards)
   ============================================================ */
.learn-example-card {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 0.85rem;
  padding: 1rem 1.15rem;
}

.learn-example-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #0d9488;
  margin-bottom: 0.4rem;
}

/* ============================================================
   Key points to remember callout
   ============================================================ */
.learn-keypoints-box {
  background: #f0fdfa;
  border-left: 4px solid #14b8a6;
  border-radius: 0.65rem;
  padding: 1.25rem 1.5rem;
}

.learn-keypoints-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.65rem 0;
  line-height: 1.55;
  border-bottom: 1px solid rgba(13, 148, 136, 0.14);
}

.learn-keypoints-list li:first-child {
  padding-top: 0;
}

.learn-keypoints-list li:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.learn-keypoints-list li i {
  flex: 0 0 auto;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 9999px;
  background: #0d9488;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  margin-top: 0.15rem;
}

/* ============================================================
   Summary table
   ============================================================ */
.learn-summary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.learn-summary-table th,
.learn-summary-table td {
  text-align: left;
  padding: 0.6rem 0.85rem;
  border-bottom: 1px solid #e2e8f0;
}

.learn-summary-table thead th {
  background: #f8fafc;
  font-weight: 700;
  color: #334155;
}

/* ============================================================
   Code / pseudocode block (concept cards + quiz questions)
   ============================================================ */
.learn-code-block {
  display: block;
  background: #0f172a;
  color: #e2e8f0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.8rem;
  line-height: 1.65;
  padding: 0.9rem 1.1rem;
  border-radius: 0.65rem;
  overflow-x: auto;
  white-space: pre;
  tab-size: 2;
}

/* ============================================================
   Practice quiz (rendered by js/learn.js)
   ============================================================ */
.learn-quiz-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  padding: 1.25rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.learn-quiz-option {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  text-align: left;
  border: 1.5px solid #e2e8f0;
  background: #ffffff;
  border-radius: 0.65rem;
  padding: 0.6rem 0.8rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: #334155;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.learn-quiz-option:hover {
  border-color: #5eead4;
  background: #f0fdfa;
}

.learn-quiz-option:disabled {
  cursor: default;
}

.learn-quiz-option.is-correct {
  border-color: #10b981;
  background: #ecfdf5;
  color: #047857;
}

.learn-quiz-option.is-incorrect {
  border-color: #f43f5e;
  background: #fff1f2;
  color: #be123c;
}

.learn-quiz-explanation {
  margin-top: 0.75rem;
  background: #f8fafc;
  border-radius: 0.65rem;
  padding: 0.75rem 0.9rem;
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.55;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.learn-quiz-explanation li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.learn-quiz-explanation-letter {
  flex-shrink: 0;
  font-weight: 700;
  color: #94a3b8;
}

.learn-quiz-explanation li.is-correct-option {
  color: #334155;
}

.learn-quiz-explanation li.is-correct-option .learn-quiz-explanation-letter {
  color: #10b981;
}

/* ============================================================
   Subject card (category page - one full-width card per subject)
   ============================================================ */
.learn-subject-card {
  position: relative;
  overflow: hidden;
  border-color: #5eead4;
}

.learn-subject-card-glow {
  position: absolute;
  top: -120px;
  right: -120px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle at center, rgba(20, 184, 166, 0.22), rgba(20, 184, 166, 0) 70%);
  pointer-events: none;
}

.learn-subject-card-glow--left {
  right: auto;
  left: -120px;
}

.learn-subject-card-icon-bg {
  position: absolute;
  right: 0.5rem;
  top: 0.5rem;
  font-size: 9rem;
  line-height: 1;
  color: rgba(13, 148, 136, 0.06);
  pointer-events: none;
}

.learn-subject-card-icon-bg img {
  width: 9rem;
  height: 9rem;
  object-fit: contain;
  opacity: 0.22;
}

.learn-subject-card--soon .learn-subject-card-glow {
  background: radial-gradient(circle at center, rgba(148, 163, 184, 0.18), rgba(148, 163, 184, 0) 70%);
}

.learn-subject-card--soon .learn-subject-card-icon-bg {
  color: rgba(100, 116, 139, 0.06);
}

.learn-subject-card-offer-heading {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #0d9488;
  margin-bottom: 0.6rem;
}

.learn-subject-card--soon .learn-subject-card-offer-heading {
  color: #94a3b8;
}

.learn-subject-card-offer-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #475569;
  line-height: 1.5;
  margin-bottom: 0.4rem;
}

.learn-subject-card-offer-list li:last-child {
  margin-bottom: 0;
}

.learn-subject-card-offer-list li i {
  margin-top: 0.3rem;
  font-size: 0.65rem;
  color: #0d9488;
  flex: 0 0 auto;
}

.learn-subject-card--soon .learn-subject-card-offer-list li {
  color: #94a3b8;
}

.learn-subject-card--soon .learn-subject-card-offer-list li i {
  color: #94a3b8;
}

.learn-subject-card-offer-list--green li i {
  color: #10b981;
}

/* ============================================================
   Reveal-on-scroll (powered by js/learn.js IntersectionObserver)
   ============================================================ */
.learn-reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.learn-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
