/* =============================================================
   Course landing-page extras (audit phase 1.3)
   - Instructor card
   - Learning outcomes
   - Target audience
   - Prerequisites
   - Testimonials grid
   - FAQ accordion (uses native <details>)
   Aligned with Collector Academy design system: Heebo, indigo
   (#7B61FF) accents, soft rounded corners, plenty of whitespace.
   Mobile-first: stacked → tablet 2-col grid for testimonials.
   ============================================================= */

.cd-extras {
  padding: 60px 0 40px;
  background: linear-gradient(180deg, #ffffff 0%, #faf8ff 100%);
  font-family: 'Heebo', system-ui, -apple-system, Segoe UI, sans-serif;
  direction: rtl;
  text-align: right; /* Override theme's text-align:left default */
}

/* Force RTL alignment on EVERY descendant element. The theme's
   bootstrap.css ships with `text-align: left` on .container/.row,
   which inherits down and overrides the natural RTL default. We
   need to be explicit on each element type so the cascade can't
   leak left-alignment back in. */
.cd-extras,
.cd-extras .cd-block,
.cd-extras h2,
.cd-extras h3,
.cd-extras h4,
.cd-extras p,
.cd-extras li,
.cd-extras label,
.cd-extras small,
.cd-extras span,
.cd-extras div,
.cd-extras summary,
.cd-extras strong {
  text-align: right;
  direction: rtl;
}

.cd-block {
  background: #fff;
  border: 1px solid #f0ecff;
  border-radius: 20px;
  padding: 32px 28px;
  margin-bottom: 28px;
  box-shadow: 0 6px 24px rgba(123, 97, 255, 0.05);
  text-align: right;
}

.cd-block__title {
  font-size: 24px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: right;
  justify-content: flex-start; /* In RTL, flex-start = right side */
}

.cd-example-label {
  display: block;
  margin-top: 16px;
  padding: 6px 12px;
  background: #fff8e0;
  border-right: 3px solid #f5b800;
  color: #8a6d00;
  font-size: 12px;
  border-radius: 4px;
}

/* ----------------------------- INSTRUCTOR ----------------------------- */
.cd-instructor__inner {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  flex-wrap: wrap;
  /* In RTL, default flex-direction:row already lays items from right to left.
     Photo is first in source order, so it lands on the right. */
}
.cd-instructor__photo {
  flex-shrink: 0;
}
.cd-instructor__photo img,
.cd-instructor__photo-placeholder {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #7B61FF;
  background: #f5f2ff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  color: #7B61FF;
}
.cd-instructor__text {
  flex: 1;
  min-width: 240px;
}
.cd-instructor__text h3 {
  margin: 0 0 6px;
  font-size: 22px;
  color: #1a1a1a;
}
.cd-instructor__role {
  margin: 0 0 12px;
  color: #7B61FF;
  font-weight: 600;
}
.cd-instructor__bio {
  margin: 0;
  color: #555;
  line-height: 1.7;
  font-size: 16px;
}

/* ----------------------------- OUTCOMES ----------------------------- */
.cd-outcomes__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 768px) {
  .cd-outcomes__list { grid-template-columns: 1fr 1fr; gap: 14px 28px; }
}
.cd-outcomes__list li {
  position: relative;
  padding-right: 32px;
  color: #333;
  font-size: 16px;
  line-height: 1.6;
}
.cd-outcomes__list li::before {
  content: "✓";
  position: absolute;
  right: 0;
  top: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7B61FF, #6c5dd3);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ----------------------------- AUDIENCE / PREREQ ----------------------------- */
.cd-audience p,
.cd-prereq p {
  margin: 0;
  color: #444;
  font-size: 16px;
  line-height: 1.8;
}

/* ----------------------------- TESTIMONIALS ----------------------------- */
.cd-testimonials__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
@media (min-width: 768px) {
  .cd-testimonials__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1100px) {
  .cd-testimonials__grid { grid-template-columns: repeat(3, 1fr); }
}
.cd-testimonial {
  background: linear-gradient(135deg, #faf8ff 0%, #f5f2ff 100%);
  border-radius: 14px;
  padding: 22px 20px;
  border: 1px solid #ece6ff;
  position: relative;
}
.cd-testimonial::before {
  content: "“";
  position: absolute;
  top: -12px;
  right: 16px;
  font-size: 56px;
  font-weight: 700;
  color: #7B61FF;
  line-height: 1;
  font-family: Georgia, serif;
}
.cd-testimonial__rating {
  font-size: 14px;
  margin-bottom: 8px;
  letter-spacing: 1px;
}
.cd-testimonial__text {
  color: #333;
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 14px;
}
.cd-testimonial__meta {
  font-size: 13px;
  color: #666;
}
.cd-testimonial__meta strong {
  color: #1a1a1a;
}

/* ----------------------------- FAQ ----------------------------- */
.cd-faq__list { display: flex; flex-direction: column; gap: 10px; }
.cd-faq__item {
  border: 1px solid #ece6ff;
  border-radius: 12px;
  background: #faf8ff;
  overflow: hidden;
  transition: border-color 0.2s, background 0.2s;
}
.cd-faq__item[open] {
  border-color: #7B61FF;
  background: #fff;
  box-shadow: 0 4px 14px rgba(123, 97, 255, 0.08);
}
.cd-faq__item summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 20px;
  font-weight: 600;
  color: #1a1a1a;
  font-size: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  text-align: right;
  direction: rtl;
}
.cd-faq__item summary::-webkit-details-marker { display: none; }
.cd-faq__item summary::after {
  content: "+";
  font-size: 22px;
  color: #7B61FF;
  font-weight: 400;
  transition: transform 0.2s;
}
.cd-faq__item[open] summary::after { content: "−"; }
.cd-faq__answer {
  padding: 0 20px 18px;
  color: #555;
  font-size: 15px;
  line-height: 1.7;
}

/* ----------------------------- MOBILE TWEAKS ----------------------------- */
@media (max-width: 575px) {
  .cd-extras { padding: 36px 0 24px; }
  .cd-block { padding: 24px 18px; }
  .cd-block__title { font-size: 20px; }
  .cd-instructor__photo img,
  .cd-instructor__photo-placeholder { width: 100px; height: 100px; font-size: 44px; }
}
