/* ── QUIZ · ESTILOS COMPLETOS ── */
/* Complementa marca.css y global.css */

/* ── NAVEGACIÓN QUIZ ── */
.quiz-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 48px;
  border-bottom: 1px solid var(--border-soft);
  flex-wrap: wrap;
  gap: 8px;
}

.quiz-logo {
  font-size: 15px;
  font-weight: 700;
  color: var(--brand);
  font-family: var(--sans);
}

.quiz-badge {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border-soft);
  padding: 4px 12px;
  border-radius: 20px;
}

/* ── CATÁLOGO DE QUIZZES ── */
.quiz-catalog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin: 32px 0;
}

.quiz-catalog-card {
  display: flex;
  flex-direction: column;
  padding: 28px;
  border: 1px solid var(--border);
  background: var(--white);
  text-decoration: none;
  transition: all .2s ease;
  border-radius: 20px;
  cursor: pointer;
}

.quiz-catalog-card:hover:not(.disabled) {
  border-color: var(--brand);
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.05);
}

.quiz-catalog-card.disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: var(--surface);
}

.quiz-catalog-tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 12px;
}

.quiz-catalog-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 12px;
}

.quiz-catalog-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 20px;
}

.quiz-catalog-status {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-top: auto;
}

.quiz-catalog-card:not(.disabled) .quiz-catalog-status {
  color: var(--brand);
}

.coming-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  background: var(--faint);
  color: white;
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 12px;
  align-self: flex-start;
}

/* ── TEMA ÚNICO (para quizzes específicos) ── */
.quiz-topic-single {
  display: flex;
  padding: 24px;
  border: 1px solid var(--brand);
  background: var(--brand-light);
  border-radius: 16px;
  margin-bottom: 24px;
}

.quiz-topic-single .qtc-check {
  background: var(--brand);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-right: 18px;
  flex-shrink: 0;
}

.quiz-topic-single .qtc-title {
  font-size: 22px;
}

/* ── GRID TEMAS (selector múltiple) ── */
.quiz-topic-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}

.quiz-topic-card {
  display: flex;
  flex-direction: column;
  padding: 20px 22px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  transition: all .2s ease;
  position: relative;
  text-align: left;
  font-family: var(--sans);
  border-radius: 16px;
}

.quiz-topic-card:hover:not(.disabled) {
  border-color: var(--brand);
  background: var(--brand-light);
}

.quiz-topic-card.active {
  border-color: var(--brand);
  background: var(--brand);
}

.quiz-topic-card.active .qtc-tag,
.quiz-topic-card.active .qtc-title,
.quiz-topic-card.active .qtc-desc {
  color: #fff;
}

.quiz-topic-card.active .qtc-check {
  opacity: 1;
}

.quiz-topic-card.disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(0.15);
}

.quiz-topic-card.disabled:hover {
  border-color: var(--border);
  background: var(--surface);
}

.quiz-topic-card .coming-badge {
  position: absolute;
  top: 12px;
  right: 16px;
}

.qtc-tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 6px;
}

.qtc-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
  margin-bottom: 6px;
}

.qtc-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.qtc-check {
  position: absolute;
  top: 14px;
  right: 16px;
  font-size: 16px;
  opacity: 0;
  transition: opacity .15s;
}

/* ── PANTALLAS ── */
.screen {
  display: none;
}

.screen.active {
  display: block;
}

/* ── PROGRESO ── */
.q-counter {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 10px;
}

.progress-wrap {
  height: 3px;
  background: var(--border-soft);
  margin-bottom: 24px;
  overflow: hidden;
  border-radius: 3px;
}

.progress-bar {
  height: 100%;
  background: var(--brand);
  transition: width .4s ease;
}

/* ── TAGS PREGUNTA ── */
.q-tags {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.q-tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 20px;
}

.q-tag.topic {
  background: var(--brand-light);
  color: var(--brand);
  border: 1px solid var(--brand-mid);
}

/* ── PREGUNTA ── */
.q-text {
  font-size: 21px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.4;
  margin-bottom: 24px;
}

/* ── OPCIONES ── */
.opt-btn {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
  padding: 14px 18px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  text-align: left;
  cursor: pointer;
  margin-bottom: 8px;
  transition: border-color .13s, background .13s;
  border-radius: 12px;
}

.opt-btn:last-child {
  margin-bottom: 0;
}

.opt-btn:hover:not(:disabled) {
  border-color: var(--brand);
  background: var(--brand-light);
}

.opt-btn:disabled {
  cursor: default;
}

.opt-btn.correct {
  border-color: #2d8a4e;
  background: #eaf6ee;
  color: #1a5c33;
  font-weight: 600;
}

.opt-btn.wrong {
  border-color: #c0392b;
  background: #fdecea;
  color: #7b1d1d;
  font-weight: 600;
}

.opt-btn.dimmed {
  opacity: .38;
}

.opt-letter {
  min-width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 8px;
  color: var(--muted);
}

.opt-btn.correct .opt-letter {
  background: #2d8a4e;
  border-color: #2d8a4e;
  color: #fff;
}

.opt-btn.wrong .opt-letter {
  background: #c0392b;
  border-color: #c0392b;
  color: #fff;
}

/* ── EXPLICACIÓN ── */
.explain-block {
  border-left: 3px solid #2d8a4e;
  background: #eaf6ee;
  padding: 16px 20px;
  margin: 18px 0 0;
  font-size: 15px;
  line-height: 1.75;
  color: #1a5c33;
  border-radius: 0 12px 12px 0;
}

.explain-block.wrong-explain {
  border-left-color: #c0392b;
  background: #fdecea;
  color: #7b1d1d;
}

.explain-label {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

/* ── BOTONES ── */
.cta-quiz {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #fff;
  background: var(--brand);
  border: none;
  padding: 15px 28px;
  cursor: pointer;
  text-align: center;
  width: 100%;
  transition: background .2s;
  margin-top: 8px;
  border-radius: 40px;
}

.cta-quiz:hover {
  background: var(--brand-dark);
}

.cta-quiz.secondary {
  background: var(--white);
  color: var(--brand);
  border: 1px solid var(--brand);
}

.cta-quiz.secondary:hover {
  background: var(--brand-light);
}

.btn-row {
  display: flex;
  gap: 10px;
}

.btn-row .cta-quiz {
  margin-top: 0;
}

/* ── RESULTADO ── */
.score-badge {
  text-align: center;
  padding: 28px 0 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  margin-bottom: 28px;
  border-radius: 20px;
}

.score-number {
  font-size: 68px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
  letter-spacing: -2px;
}

.score-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--faint);
  margin-top: 10px;
}

.score-pct {
  font-size: 20px;
  color: var(--brand);
  font-weight: 700;
  margin-top: 6px;
}

/* ── HISTORIAL ── */
.history-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-soft);
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

.history-icon {
  font-size: 14px;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ── ANIMACIONES ── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.fade-up {
  animation: fadeUp .28s ease forwards;
}

/* ── RESPONSIVE ── */
@media (max-width: 680px) {
  .quiz-catalog-grid {
    grid-template-columns: 1fr;
  }
  
  .quiz-topic-grid {
    grid-template-columns: 1fr;
  }
  
  .quiz-nav {
    padding: 12px 24px;
  }
  
  .q-text {
    font-size: 18px;
  }
  
  .opt-btn {
    font-size: 14px;
  }
  
  .score-number {
    font-size: 52px;
  }
  
  .quiz-topic-single {
    flex-direction: column;
    text-align: center;
  }
  
  .quiz-topic-single .qtc-check {
    margin: 0 auto 16px auto;
  }
}