/* ==========================================================================
   CeroFaltas & AprobarTodo - CSS Oficial de Páginas de Gancho Ortográfico
   Optimizada para CTR en Google España, Posición Cero y Conversión a la App
   ========================================================================== */

:root {
  --bg-main: #070a12;
  --bg-card: #0f1524;
  --bg-elevated: #161f36;
  --border-subtle: #1e2942;
  --border-accent: #3b82f6;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --cerofaltas-blue: #60a5fa;
  --cerofaltas-indigo: #818cf8;
  --cerofaltas-amber: #fcd34d;
  --accent-volt: #ccff00;
  --accent-emerald: #10b981;
  --accent-rose: #f43f5e;
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--cerofaltas-blue);
  text-decoration: none;
  transition: all 0.15s ease;
}

a:hover {
  color: #93c5fd;
  text-decoration: underline;
}

/* Header & Navbar */
.site-header {
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(11, 15, 25, 0.92);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 0.75rem 1rem;
}

.header-inner {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-badge-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.brand-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.brand-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.25rem;
  background: linear-gradient(135deg, #60a5fa 0%, #a5b4fc 50%, #fcd34d 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: block;
  line-height: 1.1;
}

.brand-sub {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #60a5fa;
  display: block;
}

.header-btn {
  background: #ccff00;
  color: #000;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.8rem;
  padding: 0.45rem 0.9rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.header-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(204, 255, 0, 0.4);
  text-decoration: none;
  color: #000;
}

/* Container & Breadcrumbs */
.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 2rem 1.2rem 4rem;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 1.25rem;
}

.breadcrumbs a {
  color: var(--text-muted);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tag {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tag-category {
  background: rgba(96, 165, 250, 0.12);
  color: #93c5fd;
  border: 1px solid rgba(96, 165, 250, 0.3);
}

.tag-rae {
  background: rgba(204, 255, 0, 0.1);
  color: #ccff00;
  border: 1px solid rgba(204, 255, 0, 0.3);
}

.page-title {
  font-family: var(--font-display);
  font-size: 2.25rem;
  line-height: 1.2;
  font-weight: 900;
  color: #fff;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

@media (max-width: 640px) {
  .page-title {
    font-size: 1.7rem;
  }
}

/* ==========================================================================
   Answer-First Card (Posición Cero & Google AI Overviews)
   ========================================================================== */
.answer-first-box {
  background: linear-gradient(145deg, #10182b 0%, #0a0f1d 100%);
  border: 1px solid #253352;
  border-left: 4px solid #ccff00;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
}

.answer-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 800;
  color: #ccff00;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.65rem;
}

.answer-text {
  font-size: 1.15rem;
  line-height: 1.65;
  color: #e2e8f0;
}

.answer-text strong {
  color: #fff;
  font-weight: 800;
}

/* Explicación y Reglas */
.section-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1.75rem;
  margin-bottom: 2rem;
}

.section-card h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.rule-body {
  color: #cbd5e1;
  font-size: 1.05rem;
  line-height: 1.7;
}

.rule-body p {
  margin-bottom: 1rem;
}

.rule-body strong {
  color: #f1f5f9;
}

/* Caja de Truco Infalible */
.trick-box {
  background: rgba(96, 165, 250, 0.08);
  border: 1px solid rgba(96, 165, 250, 0.25);
  border-radius: 10px;
  padding: 1.25rem;
  margin: 1.5rem 0;
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.trick-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.trick-content {
  font-size: 1rem;
  color: #bfdbfe;
  line-height: 1.6;
}

.trick-content strong {
  color: #fff;
}

/* Tabla Comparativa Bien vs Mal */
.table-wrapper {
  overflow-x: auto;
  margin: 1.5rem 0;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
}

.comparison-table th {
  background: var(--bg-elevated);
  padding: 0.85rem 1rem;
  font-weight: 700;
  color: #fff;
  border-bottom: 1px solid var(--border-subtle);
}

.comparison-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.comparison-table tr:last-child td {
  border-bottom: none;
}

.td-correct {
  color: #6ee7b7;
  font-weight: 600;
}

.td-wrong {
  color: #fda4af;
  text-decoration: line-through;
  opacity: 0.85;
}

.td-desc {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Penalización de Examen (Dolor) */
.penalty-card {
  background: rgba(244, 63, 94, 0.08);
  border: 1px solid rgba(244, 63, 94, 0.3);
  border-radius: 10px;
  padding: 1.25rem;
  margin-bottom: 2rem;
  display: flex;
  gap: 0.85rem;
  align-items: center;
}

.penalty-icon {
  font-size: 1.75rem;
  line-height: 1;
}

.penalty-text {
  font-size: 0.95rem;
  color: #fecdd3;
  line-height: 1.5;
}

.penalty-text strong {
  color: #fff;
}

/* ==========================================================================
   Widget Interactivo de Reto CeroFaltas (El Gancho)
   ========================================================================== */
.interactive-quiz-card {
  background: linear-gradient(135deg, #131c33 0%, #0c1221 100%);
  border: 2px solid #3b82f6;
  border-radius: 14px;
  padding: 2rem;
  margin-bottom: 2.5rem;
  box-shadow: 0 15px 30px -10px rgba(59, 130, 246, 0.3);
  position: relative;
  overflow: hidden;
}

.quiz-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #3b82f6;
  color: #fff;
  font-weight: 800;
  font-size: 0.75rem;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.quiz-prompt {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 1.25rem;
  line-height: 1.4;
}

.quiz-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.quiz-opt-btn {
  background: var(--bg-elevated);
  border: 2px solid var(--border-subtle);
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  padding: 1rem 1.25rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.quiz-opt-btn:hover:not(:disabled) {
  border-color: #60a5fa;
  background: #1e294b;
  transform: translateY(-2px);
}

.quiz-opt-btn.correct {
  background: rgba(16, 185, 129, 0.25) !important;
  border-color: var(--accent-emerald) !important;
  color: #6ee7b7 !important;
}

.quiz-opt-btn.wrong {
  background: rgba(244, 63, 94, 0.25) !important;
  border-color: var(--accent-rose) !important;
  color: #fda4af !important;
}

/* Feedback & Post-Quiz Hook */
.quiz-feedback {
  display: none;
  margin-top: 1.25rem;
  padding: 1.25rem;
  border-radius: 10px;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.quiz-feedback.success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #d1fae5;
}

.quiz-feedback.error {
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.35);
  color: #ffe4e6;
}

.feedback-title {
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.feedback-desc {
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

/* Banner de Conversión CeroFaltas */
.cerofaltas-hook-banner {
  background: linear-gradient(135deg, #172554 0%, #1e1b4b 100%);
  border: 1px solid rgba(129, 140, 248, 0.35);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  margin-top: 1rem;
}

.hook-headline {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.5rem;
}

.hook-sub {
  color: #cbd5e1;
  font-size: 0.95rem;
  max-width: 580px;
  margin: 0 auto 1.25rem;
}

.hook-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #ccff00;
  color: #000;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.05rem;
  padding: 0.85rem 1.75rem;
  border-radius: 10px;
  box-shadow: 0 8px 25px rgba(204, 255, 0, 0.35);
  transition: all 0.15s ease;
}

.hook-cta-btn:hover {
  background: #d8ff33;
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(204, 255, 0, 0.5);
  text-decoration: none;
  color: #000;
}

/* Malla de Enlazado Interno (Clúster) */
.related-dudas-section {
  margin-top: 3rem;
  border-top: 1px solid var(--border-subtle);
  padding-top: 2rem;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.85rem;
  margin-top: 1rem;
}

.related-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.related-card:hover {
  border-color: #60a5fa;
  transform: translateY(-2px);
  text-decoration: none;
}

.related-card-title {
  color: #f1f5f9;
  font-weight: 700;
  font-size: 0.95rem;
}

.related-card-category {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 2.5rem 1rem;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-top: 4rem;
}

.site-footer a {
  color: var(--text-muted);
}
