/* ============================================================
   GermanForLife — style-b1.css
   B1-specific additions. Load AFTER style.css.
   Every B1 page loads:
     style.css  +  style-b1.css
   ============================================================ */

/* ── B1 Color Palette (Deep Purple/Indigo — more serious/adult) ── */
:root {
  --b1: #4527a0;
  --b1-dark: #311b92;
  --b1-mid: #7c4dff;
  --b1-light: #ede7f6;
  --b1-accent: #aa00ff;
  --b1-border: #ce93d8;
}

/* ── B1 Badge ── */
.badge--b1 {
  background: var(--b1-light);
  color: var(--b1);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.level-pill--b1 {
  background: var(--b1-light);
  color: var(--b1);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.85rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ── B1 Hero ── */
.hero--b1 {
  background: linear-gradient(135deg, #ede7f6 0%, #f3e5f5 100%);
}
.hero--b1 .hero__eyebrow {
  background: var(--b1-light);
  color: var(--b1);
}
.hero--b1 .hero__title em { color: var(--b1); }

/* ── B1 Module card top stripe ── */
.module-card:has(.badge--b1) { border-top: 3px solid var(--b1); }

/* ── Grammar explanation boxes ── */
.grammar-box {
  background: var(--b1-light);
  border-left: 4px solid var(--b1);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.1rem 1.3rem;
  margin: 1.25rem 0;
}
.grammar-box h4 { color: var(--b1); margin-bottom: 0.5rem; }

.rule-box {
  background: #fff;
  border: 2px solid var(--b1);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  position: relative;
}
.rule-box__label {
  position: absolute;
  top: -0.65rem;
  left: 1rem;
  background: var(--b1);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.15rem 0.6rem;
  border-radius: 100px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ── Example sentences ── */
.example-de {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--b1-dark);
  margin-bottom: 0.15rem;
}
.example-en {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.example-block {
  background: var(--bg-alt);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  margin: 0.6rem 0;
}

/* ── Vocabulary table ── */
.vocab-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: 1.25rem 0;
}
.vocab-table th {
  background: var(--b1);
  color: #fff;
  padding: 0.6rem 0.85rem;
  text-align: left;
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.vocab-table td {
  padding: 0.55rem 0.85rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.vocab-table tr:nth-child(even) td { background: var(--bg-alt); }
.vocab-table .de { font-weight: 700; color: var(--b1-dark); }
.vocab-table .article { color: #e53935; font-weight: 600; font-size: 0.82rem; }
.vocab-table .en { color: var(--text-muted); }
.vocab-table .example { font-style: italic; font-size: 0.83rem; color: var(--text-muted); }
@media (max-width: 600px) {
  .vocab-table { font-size: 0.82rem; }
  .vocab-table th, .vocab-table td { padding: 0.45rem 0.55rem; }
  .vocab-table .example { display: none; }
}

/* ── Phrase cards ── */
.b1-phrase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 1.25rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}
.b1-phrase:last-child { border-bottom: none; }
.b1-phrase .de { font-weight: 600; color: var(--b1-dark); }
.b1-phrase .en { color: var(--text-muted); font-size: 0.9rem; }
@media (max-width: 500px) {
  .b1-phrase { grid-template-columns: 1fr; gap: 0.1rem; }
  .b1-phrase .en { font-size: 0.82rem; margin-bottom: 0.4rem; }
}

/* ── Dialogue ── */
.dialogue {
  background: var(--bg-alt);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}
.dialogue-line {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 0.5rem 1rem;
  padding: 0.4rem 0;
  border-bottom: 1px dashed var(--border);
  font-size: 0.9rem;
}
.dialogue-line:last-child { border-bottom: none; }
.dialogue-line .speaker {
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--b1);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding-top: 0.1rem;
}
.dialogue-line .speech { color: var(--text); }
.dialogue-line .translation { color: var(--text-muted); font-size: 0.82rem; font-style: italic; }
@media (max-width: 500px) {
  .dialogue-line { grid-template-columns: 70px 1fr; font-size: 0.85rem; }
}

/* ── Mistake box ── */
.mistake-box {
  background: #fff8e1;
  border-left: 4px solid #f57c00;
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 0.9rem 1.1rem;
  margin: 0.75rem 0;
}
.mistake-box .wrong { color: #c62828; font-weight: 600; }
.mistake-box .correct { color: #2e7d32; font-weight: 600; }

/* ── Progress tracker (B1 study plan) ── */
.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}
.plan-week {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.1rem;
  box-shadow: var(--shadow-card);
}
.plan-week__header {
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--b1);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--b1-light);
}
.plan-day {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}
.plan-day:last-child { border-bottom: none; }
.plan-day input[type="checkbox"] { margin-top: 0.2rem; flex-shrink: 0; accent-color: var(--b1); }
.plan-day label { cursor: pointer; line-height: 1.4; }
.plan-day.done label { text-decoration: line-through; color: var(--text-muted); }

/* ── B1 Quiz ── */
.b1-quiz-q {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin: 1rem 0;
  box-shadow: var(--shadow-card);
}
.b1-quiz-q h4 { margin-bottom: 0.85rem; font-size: 0.95rem; }
.b1-option {
  display: block;
  padding: 0.6rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  margin: 0.4rem 0;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all var(--transition);
  background: var(--bg);
}
.b1-option:hover { border-color: var(--b1); background: var(--b1-light); }
.b1-option.correct { border-color: var(--success); background: var(--success-bg); color: var(--success); font-weight: 700; }
.b1-option.wrong { border-color: var(--error); background: var(--error-bg); color: var(--error); }

/* ── Writing template ── */
.writing-template {
  background: #fffde7;
  border: 2px dashed #f9a825;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  font-family: 'Georgia', serif;
  font-size: 0.95rem;
  line-height: 1.8;
}
.writing-template .placeholder {
  background: #fff9c4;
  border-radius: 3px;
  padding: 0 0.2rem;
  color: #e65100;
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 700;
}

/* ── Citizenship highlight strip ── */
.citizenship-banner {
  background: linear-gradient(135deg, var(--b1) 0%, var(--b1-mid) 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
  margin: 2rem 0;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.citizenship-banner .icon { font-size: 2.5rem; flex-shrink: 0; }
.citizenship-banner h3 { color: #fff; margin-bottom: 0.3rem; }
.citizenship-banner p { color: rgba(255,255,255,0.88); font-size: 0.9rem; margin: 0; }

/* ── Streak banner ── */
.streak-banner {
  background: linear-gradient(90deg, #ff6f00, #ff8f00);
  color: #fff;
  padding: 0.65rem 1.1rem;
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

/* ── Weak words banner ── */
.weak-banner {
  background: #fff3e0;
  border: 1.5px solid #f57c00;
  color: #e65100;
  padding: 0.65rem 1.1rem;
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  text-decoration: none;
}
.weak-banner:hover { background: #ffe0b2; text-decoration: none; }

/* ── B1 Flashcard system ── */
.b1-fc-stage {
  max-width: 540px;
  margin: 0 auto;
}
.b1-fc-card {
  background: var(--bg-card);
  border: 2px solid var(--b1-light);
  border-radius: var(--radius-lg);
  min-height: 200px;
  padding: 2rem 1.75rem;
  text-align: center;
  cursor: pointer;
  transition: box-shadow var(--transition), transform var(--transition);
  box-shadow: var(--shadow-card);
  position: relative;
}
.b1-fc-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.b1-fc-card.flipped { border-color: var(--b1); }
.b1-fc-german { font-size: 1.8rem; font-weight: 800; color: var(--b1-dark); margin-bottom: 0.3rem; }
.b1-fc-article { font-size: 0.85rem; color: #e53935; font-weight: 600; margin-bottom: 0.25rem; }
.b1-fc-tier { position: absolute; top: 0.75rem; right: 0.75rem; }
.b1-fc-english { font-size: 1.25rem; font-weight: 700; color: var(--text); margin-bottom: 0.4rem; }
.b1-fc-example { font-size: 0.88rem; color: var(--text-muted); font-style: italic; }
.b1-fc-hint { font-size: 0.8rem; color: var(--text-light); margin-top: 0.75rem; }
.b1-fc-controls {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1rem;
  flex-wrap: wrap;
}
.b1-fc-progress {
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.tier-filter {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.tier-btn {
  padding: 0.35rem 0.85rem;
  border-radius: 100px;
  border: 1.5px solid var(--border);
  background: var(--bg);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  color: var(--text-muted);
}
.tier-btn.active, .tier-btn:hover {
  border-color: var(--b1);
  background: var(--b1-light);
  color: var(--b1);
}

/* ── FAQ ── */
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 0;
}
.faq-q {
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  font-size: 0.95rem;
  padding: 0.15rem 0;
}
.faq-q::after { content: '+'; font-size: 1.2rem; color: var(--b1); flex-shrink: 0; transition: transform 0.2s; }
.faq-item.open .faq-q::after { transform: rotate(45deg); }
.faq-a { display: none; padding-top: 0.6rem; font-size: 0.9rem; color: var(--text-muted); line-height: 1.65; }
.faq-item.open .faq-a { display: block; }
