/* ============================================================
   PORTAL DE ESTUDIO EMILIA PARDO BAZÁN - ESTILOS PRINCIPALES
   ============================================================ */

:root {
  --bg-main: #0b1120;
  --bg-surface: #1e293b;
  --bg-card: #172033;
  --bg-card-hover: #1f2b45;
  --border-color: #334155;
  --border-gold: #f59e0b;
  
  --primary: #3b82f6;
  --primary-glow: rgba(59, 130, 246, 0.3);
  --gold: #f59e0b;
  --gold-light: #fbbf24;
  --gold-glow: rgba(245, 158, 11, 0.3);
  --crimson: #e11d48;
  --emerald: #10b981;
  --purple: #8b5cf6;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --font-serif: 'Playfair Display', Georgia, Cambria, 'Times New Roman', serif;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* ==========================================
   TOP BAR & NAVEGACIÓN
   ========================================== */
.portal-topbar {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 0.75rem 1.5rem;
}

.topbar-container {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-avatar {
  font-size: 1.8rem;
  background: linear-gradient(135deg, #1e3a8a, #831843);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--gold);
  box-shadow: 0 0 10px var(--gold-glow);
}

.brand-text h1 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #fff;
}

.brand-text span {
  font-size: 0.75rem;
  color: var(--gold-light);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.portal-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  overflow-x: auto;
  padding: 0.2rem 0;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.nav-link.active {
  color: #fff;
  background: linear-gradient(135deg, #1e40af, #3b82f6);
  box-shadow: 0 2px 8px var(--primary-glow);
}

.nav-link.nav-highlight {
  color: #0f172a;
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  font-weight: 700;
  box-shadow: 0 0 12px var(--gold-glow);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-sound {
  background: #1e293b;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.btn-sound:hover {
  background: #334155;
}

.btn-sound-off {
  color: var(--text-muted);
  border-color: #475569;
}

/* ==========================================
   MAIN CONTENT & TABS
   ========================================== */
.portal-main {
  flex: 1;
  max-width: 1300px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem;
}

.tab-pane {
  display: none;
  animation: fadeIn 0.3s ease-in-out;
}

.tab-pane.active {
  display: block;
}

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

/* ==========================================
   HERO BANNER
   ========================================== */
.hero-banner {
  background: linear-gradient(135deg, #1e1b4b 0%, #1e293b 60%, #0f172a 100%);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.hero-banner::after {
  content: "📖";
  font-size: 15rem;
  position: absolute;
  right: -2rem;
  bottom: -4rem;
  opacity: 0.05;
  pointer-events: none;
}

.hero-content {
  max-width: 760px;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(245, 158, 11, 0.15);
  color: var(--gold-light);
  border: 1px solid rgba(245, 158, 11, 0.4);
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

.hero-quote {
  font-family: var(--font-serif);
  font-style: italic;
  color: #cbd5e1;
  border-left: 3px solid var(--gold);
  padding-left: 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.98rem;
}

.hero-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  transform: translateY(-2px);
}

.btn-gold {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #0f172a;
  font-weight: 700;
  box-shadow: 0 4px 14px var(--gold-glow);
}

.btn-gold:hover {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: #cbd5e1;
}

.btn-sm {
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
}

/* ==========================================
   QUICK ACCESS TILES EN INICIO
   ========================================== */
.section-heading {
  margin-bottom: 1.5rem;
}

.section-heading h2 {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.section-heading p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.quick-tiles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.tile-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.tile-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.tile-icon {
  font-size: 2.2rem;
  margin-bottom: 0.75rem;
}

.tile-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: #fff;
  margin-bottom: 0.4rem;
}

.tile-desc {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.tile-link {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gold-light);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

/* ==========================================
   CATÁLOGO DE CUENTOS (GRID & FILTROS)
   ========================================== */
.filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.filter-chips {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-chip {
  background: #1e293b;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.45rem 0.9rem;
  border-radius: 20px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-chip:hover {
  background: #334155;
  color: #fff;
}

.filter-chip.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.search-box {
  position: relative;
  min-width: 260px;
}

.search-box input {
  width: 100%;
  background: #1e293b;
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 0.5rem 1rem 0.5rem 2.2rem;
  border-radius: 20px;
  font-size: 0.88rem;
  outline: none;
}

.search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-glow);
}

.search-box-icon {
  position: absolute;
  left: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.cuentos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}

.cuento-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
  box-shadow: var(--shadow-card);
}

.cuento-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.4);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.card-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
}

.card-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  text-transform: uppercase;
}

.card-year {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.card-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: #fff;
  margin-bottom: 0.6rem;
}

.card-sinopsis {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.5;
  margin-bottom: 1rem;
  flex: 1;
}

.card-tags {
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 0.75rem;
  margin-bottom: 1rem;
}

.card-footer {
  display: flex;
  justify-content: flex-end;
}

/* ==========================================
   MODAL DE DETALLE DE CUENTO
   ========================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-overlay.hidden {
  display: none !important;
}

.modal-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 820px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  position: relative;
  padding: 2rem;
}

.modal-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: #334155;
  border: none;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background: #ef4444;
}

.cuento-modal-header {
  padding-bottom: 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.modal-icon-title {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.modal-big-icon {
  font-size: 2.8rem;
}

.cuento-modal-header h2 {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  color: #fff;
}

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

.cuento-modal-sections {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.modal-sec h4 {
  font-size: 1rem;
  color: var(--gold-light);
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
}

.modal-sec p {
  color: #cbd5e1;
  font-size: 0.92rem;
  line-height: 1.6;
}

.modal-personajes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
}

.personaje-item {
  background: #0f172a;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
}

.personaje-item h5 {
  color: #fff;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.personaje-item p {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.modal-bullets {
  list-style-type: none;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.modal-bullets li {
  position: relative;
  padding-left: 1.4rem;
  color: #cbd5e1;
  font-size: 0.9rem;
}

.modal-bullets li::before {
  content: "✦";
  position: absolute;
  left: 0;
  color: var(--gold);
}

.simbolos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.75rem;
}

.simbolo-box {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  font-size: 0.88rem;
  color: #cbd5e1;
}

.highlight-sec {
  background: #0f172a;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
}

.cuento-quote {
  font-family: var(--font-serif);
  font-style: italic;
  color: #f1f5f9;
  font-size: 0.98rem;
  line-height: 1.6;
}

.pau-sec {
  background: rgba(30, 58, 138, 0.25);
  border: 1px solid rgba(59, 130, 246, 0.4);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
}

.pau-qa-box {
  margin-top: 0.75rem;
}

.pau-q {
  color: #fff;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.pau-answer {
  background: #0f172a;
  border-left: 3px solid var(--emerald);
  padding: 0.75rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 0.75rem;
  font-size: 0.88rem;
  color: #cbd5e1;
}

.pau-warning {
  background: rgba(225, 29, 72, 0.15);
  border-left: 3px solid var(--crimson);
  padding: 0.65rem 0.75rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.85rem;
  color: #fca5a5;
}

/* ==========================================
   CRONOLOGÍA INTERACTIVA
   ========================================== */
.timeline-filters {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.timeline-filter-btn {
  background: #1e293b;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.45rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.timeline-filter-btn:hover {
  background: #334155;
  color: #fff;
}

.timeline-filter-btn.active {
  background: var(--gold);
  color: #0f172a;
  border-color: var(--gold);
  font-weight: 700;
}

.timeline-container {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem 0;
}

.timeline-container::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  background: var(--border-color);
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  width: 50%;
  padding: 1rem 2rem;
  box-sizing: border-box;
}

.timeline-item.left {
  left: 0;
  text-align: right;
}

.timeline-item.right {
  left: 50%;
  text-align: left;
}

.timeline-badge {
  position: absolute;
  top: 1.5rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #0f172a;
  border: 2px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  z-index: 10;
}

.timeline-item.left .timeline-badge {
  right: -18px;
}

.timeline-item.right .timeline-badge {
  left: -18px;
}

.timeline-content {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-card);
  transition: all 0.2s ease;
}

.timeline-content:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
}

.timeline-top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.timeline-item.left .timeline-top {
  justify-content: flex-end;
}

.timeline-year {
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--gold);
  font-size: 1.1rem;
}

.timeline-category-tag {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
}

.tag-biografia { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.tag-obras { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.tag-feminismo { background: rgba(225, 29, 72, 0.2); color: #f43f5e; }

.timeline-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 0.4rem;
}

.timeline-text {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.5;
}

.timeline-quote {
  margin-top: 0.75rem;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.82rem;
  color: var(--gold-light);
  border-top: 1px dashed var(--border-color);
  padding-top: 0.5rem;
}

/* ==========================================
   TABLA COMPARATIVA NATURALISMO
   ========================================== */
.table-responsive {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  margin-bottom: 2.5rem;
}

.comparativa-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  text-align: left;
}

.comparativa-table th {
  background: #0f172a;
  padding: 1rem 1.25rem;
  font-family: var(--font-serif);
  font-size: 1rem;
  color: #fff;
  border-bottom: 2px solid var(--border-color);
}

.comparativa-table td {
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
  vertical-align: top;
  line-height: 1.5;
}

.dim-col {
  width: 25%;
  background: #0f172a88;
}

.dim-icon {
  font-size: 1.2rem;
  margin-right: 0.4rem;
}

.zola-col {
  width: 37.5%;
  color: #cbd5e1;
}

.pardo-col {
  width: 37.5%;
  background: rgba(245, 158, 11, 0.04);
  color: #fef08a;
}

/* ==========================================
   FLASHCARDS (TARJETAS 3D FLIP)
   ========================================== */
.flashcards-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.flashcards-progress-wrap {
  min-width: 240px;
}

.fc-prog-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}

.progress-track {
  width: 100%;
  height: 8px;
  background: #334155;
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #34d399);
  width: 0%;
  transition: width 0.3s ease;
}

.flashcards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.flashcard-wrap {
  perspective: 1000px;
  height: 280px;
  cursor: pointer;
}

.flashcard-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

.flashcard-wrap.flipped .flashcard-inner {
  transform: rotateY(180deg);
}

.flashcard-front,
.flashcard-back {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-card);
}

.flashcard-front {
  background: linear-gradient(135deg, #1e293b, #172033);
}

.flashcard-back {
  background: linear-gradient(135deg, #0f172a, #1e1b4b);
  border-color: var(--gold);
  transform: rotateY(180deg);
}

.is-mastered .flashcard-front {
  border-color: var(--emerald);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.2);
}

.fc-badge {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(245, 158, 11, 0.15);
  color: var(--gold);
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
}

.fc-question {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: #fff;
  line-height: 1.4;
  margin: auto 0;
}

.fc-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
}

.fc-answer {
  font-size: 0.88rem;
  color: #cbd5e1;
  line-height: 1.5;
  margin: auto 0;
  overflow-y: auto;
  max-height: 170px;
}

.btn-toggle-mastered {
  border: none;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
}

.btn-master {
  background: #10b981;
  color: #fff;
}

.btn-master:hover {
  background: #059669;
}

.btn-unmaster {
  background: #334155;
  color: #94a3b8;
}

.btn-unmaster:hover {
  background: #475569;
  color: #fff;
}

/* ==========================================
   TALLER DE COMENTARIO RÁPIDO
   ========================================== */
.taller-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 2rem;
}

.taller-fragmento-card {
  background: #0f172a;
  border-left: 4px solid var(--gold);
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.taller-fragmento-text {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.15rem;
  color: #f8fafc;
  line-height: 1.7;
}

.taller-preguntas-guia {
  background: rgba(30, 41, 59, 0.5);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.taller-preguntas-guia h4 {
  font-size: 0.95rem;
  color: var(--gold-light);
  margin-bottom: 0.5rem;
}

.taller-preguntas-list {
  padding-left: 1.4rem;
  color: #cbd5e1;
  font-size: 0.9rem;
}

.taller-preguntas-list li {
  margin-bottom: 0.35rem;
}

.taller-solucion-box {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  animation: fadeIn 0.3s ease;
}

.taller-solucion-box h5 {
  color: #34d399;
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}

.taller-solucion-box p {
  color: #e2e8f0;
  font-size: 0.92rem;
  line-height: 1.5;
}

.taller-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ==========================================
   FOOTER
   ========================================== */
.portal-footer {
  background: #090e17;
  border-top: 1px solid var(--border-color);
  padding: 2rem 1.5rem;
  margin-top: 3rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.portal-footer a {
  color: var(--gold-light);
  text-decoration: none;
}

.portal-footer a:hover {
  text-decoration: underline;
}

/* ==========================================
   SECCIÓN DE VÍDEOS EDUCATIVOS (LITERBITS)
   ========================================== */
.videos-container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  margin-top: 1.5rem;
  align-items: start;
}

@media (max-width: 960px) {
  .videos-container {
    grid-template-columns: 1fr;
  }
}

.video-player-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.video-responsive-wrap {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  background: #000;
}

.video-responsive-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-player-info {
  padding: 1.5rem;
}

.video-player-info h3 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: #fff;
  margin-bottom: 0.5rem;
}

.video-player-info p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.videos-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.channel-card, .qr-card, .playlist-summary-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-card);
}

.channel-badge-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.channel-icon {
  font-size: 2rem;
}

.qr-card {
  text-align: center;
}

.qr-image-wrap {
  background: #fff;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  display: inline-block;
  margin: 0.75rem auto;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.qr-image-wrap img {
  display: block;
  max-width: 160px;
  height: auto;
}

.playlist-topics-list {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.playlist-topics-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #cbd5e1;
  padding: 0.45rem 0.65rem;
  background: rgba(15, 23, 42, 0.4);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--primary);
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */
@media (max-width: 900px) {
  .hero-banner {
    flex-direction: column;
    padding: 1.5rem;
  }
  
  .timeline-container::before {
    left: 20px;
  }

  .timeline-item {
    width: 100%;
    padding-left: 50px;
    padding-right: 15px;
    text-align: left !important;
  }

  .timeline-item.left,
  .timeline-item.right {
    left: 0;
  }

  .timeline-item .timeline-badge {
    left: 2px !important;
    right: auto !important;
  }

  .timeline-item.left .timeline-top {
    justify-content: flex-start;
  }
}

@media (max-width: 650px) {
  .topbar-container {
    flex-direction: column;
    align-items: stretch;
  }
  .portal-nav {
    justify-content: flex-start;
  }
  .hero-title {
    font-size: 1.8rem;
  }
}
