/*
 * Landing page of the free course "فك الشيفرة: الأكسنت الأمريكي" (Views/Decode/Index.cshtml).
 * Builds on home-ar.css (ar-* classes and brand tokens: olive #2E321B, red #A30B00, grey #7F7F7F, white).
 * Mobile first: one column by default, more columns on wider screens.
 */

/* English version: English brand font instead of the Arabic one set by home-ar.css. */
html[lang="en"] body.dc-page,
html[lang="en"] .dc-page h1,
html[lang="en"] .dc-page h2,
html[lang="en"] .dc-page h3 {
  font-family: var(--font-en);
}

/* Header: keep the language switch compact next to the button. */
.dc-page .ar-header .lang-switcher { margin-inline-end: 0; }

/* Hero: the start button and the small sign-in note under it. */
.dc-hero { padding: 40px 0 56px; }
.dc-start-form { margin: 0; display: contents; }
.dc-start { gap: 0.6rem; width: 100%; }
.dc-google { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #fff; }
.dc-note { color: #7f7f7f; font-size: 0.95rem; margin: 0.9rem 0 0; }
.dc-stats { margin-top: 2.25rem; }

/* Weeks: one card per week. */
.dc-weeks {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
.dc-week {
  padding: 1.35rem 1.5rem;
  background: #fff;
  border: 2px solid var(--ar-line);
  border-radius: 18px;
}
.dc-week-num {
  display: inline-block;
  margin-bottom: 0.5rem;
  padding: 0.15rem 0.7rem;
  border-radius: 999px;
  background: var(--ar-olive);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
}
.dc-week h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 0.35rem; color: var(--ar-olive); }
.dc-week p { margin: 0; color: #7f7f7f; line-height: 1.8; }

/* How a week works: 5 steps (home-ar.css lays out 4). One column on phones. */
.dc-steps { grid-template-columns: 1fr; }

/* Daily goal and streak. */
.dc-daily {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.25rem;
  padding: 1.75rem;
  border: 2px solid var(--ar-line);
  border-radius: 28px;
  background: linear-gradient(135deg, #fff 0%, var(--ar-olive-soft) 100%);
}
.dc-daily-icon {
  flex: 0 0 auto;
  width: 84px;
  height: 84px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  font-size: 2.6rem;
  background: rgba(163, 11, 0, 0.1);
}

/* Taste: the no-sign-in week-1 mini lesson (js/decode-taste.js). One card, one step at a time. */
/* Steps the script hides must stay hidden even when a class (e.g. .ar-btn) sets display. */
.dc-taste [hidden] { display: none !important; }
.dc-taste-link { color: var(--ar-red); font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.dc-taste {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.25rem;
  background: #fff;
  border: 2px solid var(--ar-line);
  border-radius: 22px;
  scroll-margin-top: 1rem;
}
.dc-taste-bar { height: 8px; border-radius: 999px; background: var(--ar-olive-soft); overflow: hidden; margin-bottom: 1.1rem; }
.dc-taste-bar i { display: block; height: 100%; width: 0; background: var(--ar-red); transition: width 0.3s ease; }
.dc-q, .dc-decode, .dc-result { scroll-margin-top: 1rem; }
.dc-q-count { color: #7f7f7f; font-size: 0.9rem; font-weight: 700; margin: 0 0 0.35rem; }
.dc-q-text { font-size: 1.15rem; font-weight: 700; color: var(--ar-olive); line-height: 1.7; margin-bottom: 1rem; }
.dc-muted { color: #7f7f7f; line-height: 1.8; }
.dc-small { font-size: 0.9rem; }

/* Answer options: big tap targets, full width on phones. */
.dc-options { display: grid; gap: 0.6rem; }
.dc-option {
  min-height: 48px;
  padding: 0.75rem 1rem;
  text-align: start;
  font: inherit;
  font-weight: 600;
  color: var(--ar-olive);
  background: #fff;
  border: 2px solid var(--ar-line);
  border-radius: 14px;
  cursor: pointer;
}
.dc-option:hover:not(:disabled) { border-color: var(--ar-olive); }
.dc-option:focus-visible { outline: 3px solid var(--ar-red); outline-offset: 2px; }
.dc-option:disabled { cursor: default; opacity: 0.7; }
/* Right answer in olive, the visitor's wrong pick in red (both stay fully visible). */
.dc-option.is-right { background: var(--ar-olive); border-color: var(--ar-olive); color: #fff; opacity: 1; }
.dc-option.is-wrong { background: #fff; border-color: var(--ar-red); color: var(--ar-red); opacity: 1; }

/* Feedback under the options: only the matching headline is shown. */
.dc-feedback { margin-top: 1rem; padding: 0.9rem 1rem; border-radius: 14px; background: var(--ar-olive-soft); line-height: 1.8; }
.dc-feedback p { margin: 0.35rem 0 0; color: var(--ar-ink); }
.dc-feedback strong { display: none; }
.dc-feedback.is-right strong.dc-feedback-ok { display: block; color: var(--ar-olive); }
.dc-feedback.is-wrong { background: rgba(163, 11, 0, 0.07); }
.dc-feedback.is-wrong strong.dc-feedback-bad { display: block; color: var(--ar-red); }
.dc-next { margin-top: 1rem; width: 100%; }

/* Decode step: sentence (stress in bold), reveal button, then how it sounds. */
.dc-lines { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: 0.75rem; }
.dc-line { padding: 0.9rem 1rem; border: 2px solid var(--ar-line); border-radius: 14px; }
.dc-line-en { font-family: var(--font-en, inherit); font-size: 1.15rem; margin: 0 0 0.5rem; color: var(--ar-ink); text-align: left; }
.dc-line-en b { color: var(--ar-red); }
.dc-line-ar { font-size: 1.2rem; font-weight: 700; color: var(--ar-olive); margin: 0 0 0.25rem; }
.dc-reveal {
  min-height: 44px;
  padding: 0.4rem 1.1rem;
  font: inherit;
  font-weight: 700;
  color: var(--ar-olive);
  background: var(--ar-olive-soft);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}
.dc-reveal:focus-visible { outline: 3px solid var(--ar-red); outline-offset: 2px; }

/* Result: score, message, start button, and a quiet "try again" link. */
.dc-result { text-align: center; }
.dc-score { font-size: 3rem; font-weight: 800; color: var(--ar-red); line-height: 1.2; direction: ltr; }
.dc-result-msg { font-size: 1.15rem; font-weight: 700; color: var(--ar-olive); margin: 0.5rem 0; }
.dc-taste-actions { display: flex; justify-content: center; margin-top: 1rem; }
.dc-taste-actions .ar-btn { width: 100%; }
.dc-again { margin-top: 1rem; background: none; border: 0; color: #7f7f7f; font: inherit; text-decoration: underline; cursor: pointer; min-height: 44px; }

/* Small tablets and up: buttons size to their text, weeks in two columns. */
@media (min-width: 576px) {
  .dc-start { width: auto; }
  .dc-weeks { grid-template-columns: repeat(2, 1fr); }
  .dc-steps { grid-template-columns: repeat(2, 1fr); }
  .dc-daily { flex-direction: row; text-align: start; padding: 2.5rem; }
  .dc-taste { padding: 2rem; }
  .dc-next, .dc-taste-actions .ar-btn { width: auto; }
}

/* Desktop: four weeks per row, the five steps on one line. */
@media (min-width: 992px) {
  .dc-hero { padding: 70px 0 80px; }
  .dc-weeks { grid-template-columns: repeat(4, 1fr); }
  .dc-steps { grid-template-columns: repeat(5, 1fr); }
}
