/* EXPERTO EN RADIOFRECUENCIA SEMDOR - Estilos Oficiales WebApp */
:root {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f5f9;
  --bg-card: #ffffff;
  --border-color: #e2e8f0;
  --border-focus: #3b82f6;
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  
  --accent-primary: #0284c7; /* Sky blue */
  --accent-primary-hover: #0369a1;
  --accent-secondary: #0d9488; /* Teal */
  --accent-gold: #d97706; /* Amber / Gold */
  --accent-gold-bg: rgba(217, 119, 6, 0.1);
  --accent-emerald: #059669;
  --accent-emerald-bg: rgba(5, 150, 105, 0.1);
  --accent-rose: #e11d48;
  --accent-rose-bg: rgba(225, 29, 72, 0.1);
  
  --sidebar-width: 340px;
  --header-height: 86px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -1px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.12);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 1.5rem;
  z-index: 50;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  gap: 1.5rem;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-shrink: 0;
  min-width: 290px;
  cursor: pointer;
  text-decoration: none;
  user-select: none;
}

.header-brand:hover .brand-badge {
  transform: scale(1.04);
}

.brand-badge {
  background: linear-gradient(135deg, #0369a1, #0284c7);
  color: white;
  font-weight: 900;
  font-size: 1.15rem;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 8px rgba(2, 132, 199, 0.35);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.brand-title-wrap {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand-title {
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  white-space: nowrap;
  line-height: 1.2;
}

.brand-subtitle {
  font-size: 0.74rem;
  font-weight: 600;
  color: #0284c7;
  white-space: nowrap;
  letter-spacing: -0.01em;
  margin-top: 2px;
}

/* NAVEGACIÓN EN DOS LÍNEAS PARALELAS */
.header-nav-two-lines {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  justify-content: center;
  flex: 1;
  min-width: 0;
}

.header-nav-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.header-nav-row::-webkit-scrollbar {
  display: none;
}

.header-nav-row .nav-group {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--bg-tertiary);
  padding: 0.15rem 0.35rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.nav-pill {
  padding: 0.32rem 0.68rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
  border: none;
  background: transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.nav-pill:hover {
  color: var(--accent-primary);
  background: rgba(2, 132, 199, 0.08);
}

.nav-pill.active {
  background: white;
  color: var(--accent-primary);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  font-weight: 800;
}

.nav-pill-gold {
  background: var(--accent-gold-bg);
  color: var(--accent-gold);
  border: 1px solid rgba(217, 119, 6, 0.3);
}

.nav-pill-gold.active {
  background: #d97706;
  color: white;
}

.header-quick-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.poc-header-btn {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  border: none;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(2, 132, 199, 0.3);
  padding: 0.32rem 0.75rem;
  font-size: 0.78rem;
  white-space: nowrap;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.poc-header-btn:hover {
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
  box-shadow: 0 2px 5px rgba(2, 132, 199, 0.45);
}

.search-trigger-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.search-trigger-btn:hover {
  background: white;
  border-color: var(--border-focus);
  color: var(--text-primary);
}

.kbd-shortcut {
  background: white;
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  font-size: 0.68rem;
  font-weight: 700;
}

/* ==========================================================================
   LAYOUT
   ========================================================================== */
.app-container {
  display: flex;
  margin-top: var(--header-height);
  min-height: calc(100vh - var(--header-height));
}

/* ==========================================================================
   SIDEBAR
   ========================================================================== */
.app-sidebar {
  width: var(--sidebar-width);
  background: white;
  border-right: 1px solid var(--border-color);
  height: calc(100vh - var(--header-height));
  position: sticky;
  top: var(--header-height);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.sidebar-modes-bar {
  padding: 0.85rem;
  border-bottom: 1px solid var(--border-color);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.35rem;
  background: var(--bg-tertiary);
}

.mode-btn {
  padding: 0.45rem 0.25rem;
  border: 1px solid transparent;
  background: transparent;
  border-radius: var(--radius-sm);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  transition: all 0.15s ease;
  text-align: center;
}

.mode-btn:hover {
  background: rgba(255, 255, 255, 0.8);
  color: var(--accent-primary);
}

.mode-btn.active {
  background: white;
  border-color: var(--border-color);
  color: var(--accent-primary);
  box-shadow: var(--shadow-sm);
}

.sidebar-content-list {
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}

.sidebar-group-title {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  padding: 0.5rem 0.5rem 0.25rem;
}

.tema-item-card {
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  text-align: left;
}

.tema-item-card:hover {
  background: var(--bg-tertiary);
  border-color: var(--border-color);
}

.tema-item-card.active {
  background: rgba(2, 132, 199, 0.08);
  border-color: rgba(2, 132, 199, 0.3);
}

.tema-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tema-num-badge {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--accent-primary);
  background: white;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  border: 1px solid var(--border-color);
}

.tema-badges-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.item-badge-pill {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
}

.badge-video {
  background: rgba(13, 148, 136, 0.12);
  color: #0d9488;
}

.badge-tech {
  background: rgba(217, 119, 6, 0.12);
  color: #d97706;
}

.badge-ppt {
  background: rgba(147, 51, 234, 0.12);
  color: #9333ea;
}

.tema-item-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
}

.tema-item-author {
  font-size: 0.74rem;
  color: var(--text-muted);
}

/* ==========================================================================
   MAIN WORKSPACE
   ========================================================================== */
.app-main {
  flex: 1;
  padding: 2rem 2.5rem 5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-banner {
  background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}

.hero-badge {
  background: var(--accent-emerald-bg);
  color: var(--accent-emerald);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
}

.hero-title {
  font-size: 1.85rem;
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1.25;
  margin-bottom: 0.65rem;
  letter-spacing: -0.5px;
}

.hero-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 900px;
  margin-bottom: 1.25rem;
}

.hero-stats-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-secondary);
  background: white;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.stat-pill strong {
  color: var(--accent-primary);
}

/* ==========================================================================
   TEMA WORKSPACE
   ========================================================================== */
.tema-view-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 2rem;
}

.tema-view-header {
  padding: 1.5rem 1.75rem;
  border-bottom: 1px solid var(--border-color);
  background: #fafafa;
}

.tema-view-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.tema-author-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.author-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(2, 132, 199, 0.12);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.tema-actions-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.75rem;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 700;
  border: 1px solid var(--border-color);
  background: white;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.action-btn:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  background: rgba(2, 132, 199, 0.04);
}

.action-btn-primary {
  background: var(--accent-primary);
  color: white;
  border-color: var(--accent-primary);
}

.action-btn-primary:hover {
  background: var(--accent-primary-hover);
  color: white;
}

.tema-view-body {
  padding: 1.75rem;
}

/* ==========================================================================
   QUICK CLINICAL CARD (FICHA QUIRÚRGICA RÁPIDA DE VIDEOTÉCNICA)
   ========================================================================== */
.quick-tech-card {
  background: #ffffff;
  border: 2px solid rgba(217, 119, 6, 0.3);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-md);
  position: relative;
}

.quick-tech-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  border-bottom: 1px dashed rgba(217, 119, 6, 0.3);
  padding-bottom: 1rem;
}

.quick-tech-badge {
  background: #d97706;
  color: white;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
}

.quick-tech-title {
  font-size: 1.25rem;
  font-weight: 900;
  color: #b45309;
  margin-top: 0.35rem;
}

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

.spec-item {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem;
}

.spec-label {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.spec-val {
  font-size: 0.88rem;
  color: var(--text-primary);
  line-height: 1.45;
}

.quick-tech-pearl {
  background: rgba(13, 148, 136, 0.08);
  border-left: 4px solid var(--accent-secondary);
  padding: 1rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: 0.88rem;
  color: #0f172a;
}

.quick-tech-safety {
  background: var(--accent-rose-bg);
  border-left: 4px solid var(--accent-rose);
  padding: 1rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: 0.88rem;
  color: #9f1239;
  margin-top: 0.75rem;
}

/* ==========================================================================
   VIDEO GRID & CARDS
   ========================================================================== */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.video-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

.video-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-focus);
}

.video-thumb-wrap {
  position: relative;
  background: #0f172a;
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.video-thumb-wrap:hover .play-circle {
  transform: scale(1.15);
  background: var(--accent-primary);
}

.play-circle {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
  border: 2px solid white;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.4rem;
  transition: all 0.2s ease;
}

.video-type-pill {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  backdrop-filter: blur(4px);
}

.video-type-teorica {
  background: rgba(2, 132, 199, 0.85);
  color: white;
}

.video-type-practica {
  background: rgba(217, 119, 6, 0.9);
  color: white;
}

.video-size-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  font-size: 0.7rem;
  font-weight: 700;
  color: white;
  background: rgba(0, 0, 0, 0.65);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

.video-info {
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
}

.video-title {
  font-size: 0.96rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.35;
  margin-bottom: 0.5rem;
}

.video-tema-tag {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--accent-primary);
}

/* ==========================================================================
   QUIZZES & CASES
   ========================================================================== */
.quiz-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
}

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

.quiz-question {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 1.15rem;
  line-height: 1.45;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.quiz-opt-btn {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 0.9rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  line-height: 1.4;
}

.quiz-opt-btn:hover:not(:disabled) {
  border-color: var(--border-focus);
  background: white;
}

.quiz-opt-btn.correct {
  background: #ecfdf5 !important;
  border-color: #10b981 !important;
  color: #065f46 !important;
  font-weight: 700;
}

.quiz-opt-btn.incorrect {
  background: #fff1f2 !important;
  border-color: #f43f5e !important;
  color: #9f1239 !important;
}

.quiz-feedback {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  line-height: 1.5;
  display: none;
}

.quiz-feedback.visible {
  display: block;
}

.quiz-feedback.correct {
  background: #ecfdf5;
  border-left: 4px solid #10b981;
  color: #065f46;
}

.quiz-feedback.incorrect {
  background: #fff1f2;
  border-left: 4px solid #f43f5e;
  color: #9f1239;
}

.case-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.case-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.75rem;
}

.case-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
}

/* ==========================================================================
   MODAL / LIGHTBOX
   ========================================================================== */
.app-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.app-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: white;
  border-radius: var(--radius-xl);
  max-width: 960px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-close-btn {
  background: var(--bg-tertiary);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

.modal-close-btn:hover {
  background: #fee2e2;
  color: #dc2626;
}

.modal-body {
  padding: 1.75rem;
  overflow-y: auto;
  flex: 1;
}

.video-frame-wrap {
  aspect-ratio: 16/9;
  background: #000;
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.video-frame-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ==========================================================================
   SEARCH MODAL
   ========================================================================== */
.search-modal-card {
  max-width: 650px;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem;
  border-bottom: 1px solid var(--border-color);
}

.search-input {
  flex: 1;
  border: none;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  outline: none;
}

.search-results-list {
  max-height: 400px;
  overflow-y: auto;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.search-res-item {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.search-res-item:hover {
  background: var(--bg-tertiary);
  border-color: var(--border-color);
}


/* ==========================================================================
   DUAL MODE SWITCH: RESUMEN RÁPIDO VS TUTORIAL SISTEMATIZADO
   ========================================================================== */
.view-mode-toggle-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-tertiary);
  padding: 0.4rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  margin-bottom: 1.25rem;
}

.view-mode-toggle {
  display: inline-flex;
  gap: 0.35rem;
  background: #ffffff;
  padding: 0.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.view-mode-btn {
  border: none;
  background: transparent;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.view-mode-btn:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

.view-mode-btn.active {
  background: var(--accent-primary);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.filter-pills-row {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.filter-pill {
  border: 1px solid var(--border-color);
  background: #ffffff;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.filter-pill:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.filter-pill.active {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
}

/* ==========================================================================
   TUTORIAL SISTEMATIZADO CARDS & STEPS
   ========================================================================== */
.tutorial-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.tutorial-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tutorial-card:hover {
  box-shadow: var(--shadow-md);
}

.tutorial-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  background: linear-gradient(to right, #f8fafc, #ffffff);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.tutorial-header-info {
  flex: 1;
}

.tutorial-tag-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.4rem;
}

.tutorial-module-tag {
  background: #e0f2fe;
  color: #0369a1;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}

.tutorial-region-tag {
  background: #f1f5f9;
  color: #475569;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
}

.tutorial-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.3;
}

.tutorial-video-btn {
  background: #ef4444;
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.25);
}

.tutorial-video-btn:hover {
  background: #dc2626;
  transform: translateY(-1px);
}

.tutorial-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.tutorial-section-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.tutorial-indication-box {
  background: #f0fdf4;
  border-left: 4px solid #16a34a;
  padding: 0.85rem 1.15rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.9rem;
  color: #166534;
  line-height: 1.5;
}

.tutorial-specs-matrix {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.85rem;
  background: var(--bg-tertiary);
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.matrix-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.matrix-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.matrix-val {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}

.tutorial-steps-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.step-card {
  display: flex;
  gap: 1rem;
  padding: 0.9rem 1rem;
  background: #f8fafc;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  align-items: flex-start;
  transition: all 0.15s ease;
}

.step-card:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.step-number {
  width: 32px;
  height: 32px;
  background: var(--accent-primary);
  color: #ffffff;
  border-radius: 50%;
  font-weight: 800;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(2, 132, 199, 0.3);
}

.step-info {
  flex: 1;
}

.step-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

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

.tutorial-pearls-box {
  background: #fffbeb;
  border-left: 4px solid #d97706;
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.pearls-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.4rem;
}

.pearls-list li {
  font-size: 0.88rem;
  color: #92400e;
  line-height: 1.45;
  display: flex;
  gap: 0.5rem;
}

.pearls-list li::before {
  content: "★";
  color: #d97706;
  font-weight: bold;
}

.tutorial-safety-box {
  background: #fef2f2;
  border-left: 4px solid #dc2626;
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.safety-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.4rem;
}

.safety-list li {
  font-size: 0.88rem;
  color: #991b1b;
  line-height: 1.45;
  display: flex;
  gap: 0.5rem;
}

.safety-list li::before {
  content: "⚠";
  color: #dc2626;
  font-weight: bold;
}

/* ==========================================================================
   TALLER PRÁCTICO DR. DIEGO BENÍTEZ ALMERÍA
   ========================================================================== */
.diego-hero {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #ffffff;
  padding: 2.25rem 2.5rem;
  border-radius: var(--radius-xl);
  margin-bottom: 2rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.diego-hero-info {
  flex: 1;
}

.diego-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(225, 29, 72, 0.2);
  color: #fb7185;
  border: 1px solid rgba(225, 29, 72, 0.4);
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.85rem;
}

.diego-hero-title {
  font-size: 1.85rem;
  font-weight: 900;
  margin-bottom: 0.5rem;
  line-height: 1.25;
}

.diego-hero-subtitle {
  font-size: 0.95rem;
  color: #94a3b8;
  max-width: 680px;
  line-height: 1.6;
}

.diego-stats-row {
  display: flex;
  gap: 1rem;
  margin-top: 1.25rem;
}

.diego-stat-pill {
  background: rgba(255,255,255,0.08);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  border: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.diego-stat-pill strong {
  color: #38bdf8;
  font-size: 1.05rem;
}

.diego-nav-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
}

.diego-tab-btn {
  background: transparent;
  border: none;
  padding: 0.65rem 1.15rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.diego-tab-btn:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.diego-tab-btn.active {
  background: var(--accent-primary);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.diego-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.diego-video-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
}

.diego-video-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.diego-card-header {
  padding: 1rem 1.25rem;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.diego-step-badge {
  background: #0284c7;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
}

.diego-focus-badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
}

.diego-card-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.diego-card-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.35;
}

.diego-card-summary {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.diego-card-detail {
  font-size: 0.82rem;
  color: var(--text-muted);
  background: #f8fafc;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border-color);
  line-height: 1.45;
}

.diego-card-footer {
  padding: 0.85rem 1.25rem;
  border-top: 1px solid var(--border-color);
  background: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.diego-play-btn {
  background: #ef4444;
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.diego-play-btn:hover {
  background: #dc2626;
}

/* ==========================================================================
   CLINICAL PHOTO GALLERY (DIEGO ALMERIA)
   ========================================================================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.gallery-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.gallery-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-primary);
}

.gallery-img-wrap {
  width: 100%;
  height: 200px;
  background: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.gallery-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-card:hover .gallery-img-wrap img {
  transform: scale(1.05);
}

.gallery-info {
  padding: 0.85rem 1rem;
}

.gallery-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  margin-bottom: 0.35rem;
}

.gallery-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ==========================================================================
   CLINICAL TOOLKIT MODAL (CALCULATORS)
   ========================================================================== */
.toolkit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
}

.tool-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.tool-card-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tool-calc-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.tool-calc-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.tool-calc-input {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  outline: none;
}

.tool-calc-input:focus {
  border-color: var(--accent-primary);
}

.tool-result-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  color: #166534;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.4;
}


/* NAV GROUPS: TEORÍA | PRÁCTICA | EVALUACIÓN */
.nav-group {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(0, 0, 0, 0.03);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.nav-group-label {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0 0.35rem;
}

.nav-label-practice {
  color: #e11d48;
}

.nav-pill-blue {
  background: #f0f9ff;
  border-color: #bae6fd;
  color: #0284c7;
}

.nav-pill-blue.active {
  background: #0284c7;
  color: #ffffff;
}

.nav-pill-rose {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #e11d48;
}

.nav-pill-rose.active {
  background: #e11d48;
  color: #ffffff;
}


/* ==========================================================================
   MAQUETACIÓN EDITORIAL DE TEMAS TEÓRICOS (MANUAL CLÍNICO)
   ========================================================================== */
.tema-editorial-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 1080px;
  margin: 0 auto;
}

.tema-breadcrumb-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.tema-hero-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 2rem 2.25rem;
  box-shadow: var(--shadow-sm);
  border-top: 4px solid var(--accent-primary);
}

.tema-meta-badges {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
}

.tema-title-h1 {
  font-size: 1.85rem;
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 1rem;
}

.tema-author-box {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.author-circle-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #e0f2fe;
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.author-info-text {
  display: flex;
  flex-direction: column;
}

.author-name-text {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--text-primary);
}

.author-affil-text {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* PESTAÑAS DEL TEMA */
.tema-subnav-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.5rem;
  margin-top: 1rem;
  overflow-x: auto;
}

.tema-subnav-btn {
  background: transparent;
  border: none;
  padding: 0.65rem 1.15rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.tema-subnav-btn:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.tema-subnav-btn.active {
  background: var(--accent-primary);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

/* ÍNDICE DEL CAPÍTULO (TOC CHIPS) */
.tema-toc-chips-wrap {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

.tema-toc-title {
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.tema-toc-chips-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tema-toc-chip {
  background: #ffffff;
  border: 1px solid var(--border-color);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tema-toc-chip:hover {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
}

/* SECCIONES EDITORIALES DEL TEXTO */
.tema-section-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}

.tema-section-header {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  padding-bottom: 0.75rem;
  margin-bottom: 1.25rem;
  border-bottom: 2px solid #e0f2fe;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.tema-p {
  font-size: 0.98rem;
  line-height: 1.8;
  color: #1e293b;
  margin-bottom: 1.15rem;
  text-align: justify;
  letter-spacing: -0.01em;
}

.tema-subheading {
  font-size: 1.08rem;
  font-weight: 800;
  color: #0369a1;
  margin: 1.6rem 0 0.75rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tema-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin: 0.85rem 0 1.25rem 0.5rem;
}

.tema-list-item {
  font-size: 0.94rem;
  color: #334155;
  line-height: 1.65;
  margin-bottom: 0.65rem;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.tema-list-item::before {
  content: "▸";
  color: var(--accent-primary);
  font-weight: bold;
  flex-shrink: 0;
}

.tema-biblio-item {
  display: block;
  font-size: 0.88rem;
  color: #475569;
  line-height: 1.6;
  margin-bottom: 0.75rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px dashed #e2e8f0;
}

.tema-biblio-item::before {
  display: none !important;
}



/* ==========================================================================
   FIGURAS CLÍNICAS Y SONOGRAMAS EDITORIALES DEL MANUAL
   ========================================================================== */
.tema-figure-card {
  margin: 1.75rem 0;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.tema-figure-card:hover {
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.tema-figure-img-wrap {
  position: relative;
  background: #090d16;
  cursor: zoom-in;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 200px;
  max-height: 520px;
  overflow: hidden;
  padding: 0.5rem;
}

.tema-img {
  max-width: 100%;
  max-height: 500px;
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
  border-radius: 4px;
  transition: transform 0.25s ease;
}

.tema-figure-img-wrap:hover .tema-img {
  transform: scale(1.02);
}

.tema-img-overlay {
  position: absolute;
  bottom: 12px;
  right: 12px;
  opacity: 0.92;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.tema-img-zoom-pill {
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(6px);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.tema-figure-caption {
  padding: 0.85rem 1.25rem;
  background: #ffffff;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.88rem;
  color: #334155;
  line-height: 1.45;
}

.caption-tag {
  background: #e0f2fe;
  color: #0369a1;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.caption-text {
  font-weight: 600;
  color: #1e293b;
  flex: 1;
}

/* ALERTAS Y CAJAS DE SEGURIDAD / PERLAS */
.tema-callout-box {
  background: #fffbeb;
  border: 1px solid #fef3c7;
  border-left: 4px solid #f59e0b;
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.tema-callout-icon {
  font-size: 1.2rem;
  color: #d97706;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.tema-callout-text {
  font-size: 0.92rem;
  color: #92400e;
  font-weight: 600;
  line-height: 1.5;
}


/* ==========================================================================
   DIAPOSITIVAS DE LA VIDEOCLASE INTEGRADAS EN EL TEXTO Y VISOR SLIDE DECK
   ========================================================================== */
.tema-slide-card {
  margin: 1.75rem 0;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-left: 4px solid #0284c7;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.tema-slide-card:hover {
  box-shadow: var(--shadow-md);
  border-color: #7dd3fc;
}

.tema-slide-img-wrap {
  position: relative;
  background: #031525;
  cursor: zoom-in;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 200px;
  max-height: 520px;
  overflow: hidden;
  padding: 0.5rem;
}

.tema-slide-img {
  max-width: 100%;
  max-height: 480px;
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
  border-radius: 4px;
  transition: transform 0.25s ease;
}

.tema-slide-img-wrap:hover .tema-slide-img {
  transform: scale(1.02);
}

.tema-slide-overlay {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}

.slide-badge-pill {
  background: rgba(2, 132, 199, 0.9);
  backdrop-filter: blur(4px);
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.tema-slide-caption {
  padding: 0.85rem 1.25rem;
  background: #ffffff;
  border-top: 1px solid #e0f2fe;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.88rem;
  color: #334155;
  line-height: 1.45;
}

.slide-tag {
  background: #0284c7;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* VISOR INTERACTIVO DE DIAPOSITIVAS (SLIDE DECK VIEWER) */
.slide-deck-viewer {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 2rem;
}

.slide-deck-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  background: #f8fafc;
}

.slide-viewport-main {
  position: relative;
  background: #050b14;
  min-height: 440px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 1rem;
}

.slide-main-stage {
  cursor: zoom-in;
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 90%;
  max-height: 520px;
}

.slide-main-img {
  max-width: 100%;
  max-height: 500px;
  width: auto;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  transition: transform 0.2s ease;
}

.slide-main-stage:hover .slide-main-img {
  transform: scale(1.015);
}

.slide-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
}

.slide-nav-btn:hover:not(:disabled) {
  background: #0284c7;
  transform: translateY(-50%) scale(1.1);
}

.slide-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.slide-nav-btn.prev-btn {
  left: 16px;
}

.slide-nav-btn.next-btn {
  right: 16px;
}

.slide-controls-bar {
  padding: 0.85rem 1.5rem;
  background: #ffffff;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.slide-counter-badge {
  background: #e0f2fe;
  color: #0369a1;
  font-weight: 800;
  font-size: 0.82rem;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
}

.slide-title-label {
  font-weight: 700;
  font-size: 0.92rem;
  color: #1e293b;
}

.slide-thumbnails-rail {
  padding: 1rem 1.25rem;
  background: #f1f5f9;
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  scroll-behavior: smooth;
}

.slide-thumb-item {
  position: relative;
  flex-shrink: 0;
  width: 120px;
  height: 68px;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  background: #090d16;
  transition: all 0.2s ease;
}

.slide-thumb-item:hover {
  transform: translateY(-2px);
  border-color: #38bdf8;
}

.slide-thumb-item.active {
  border-color: #0284c7;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.4);
}

.slide-thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-number {
  position: absolute;
  bottom: 3px;
  right: 3px;
  background: rgba(0,0,0,0.8);
  color: #fff;
  font-size: 0.68rem;
  font-weight: bold;
  padding: 1px 4px;
  border-radius: 3px;
}

/* ==========================================================================
   BARRA AUXILIAR DEL MANUAL PDF Y CÁTEDRA SINCRONIZADA
   ========================================================================== */
.manual-aux-bar {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--accent-primary);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
}

.manual-aux-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.manual-pdf-badge {
  font-size: 0.85rem;
  font-weight: 800;
  color: #0369a1;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.manual-aux-text {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.manual-aux-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* ==========================================================================
   VIDEOCLASE OFICIAL: EXPLICACIÓN DOCENTE PASO A PASO + DIAPOSITIVAS
   ========================================================================== */
.videoclase-material-header {
  margin-bottom: 1.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.videoclase-header-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
}

.videoclase-step-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  margin-bottom: 1.75rem;
  display: grid;
  grid-template-columns: 340px 1fr;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

@media (max-width: 900px) {
  .videoclase-step-card {
    grid-template-columns: 1fr;
  }
}

.videoclase-step-card:hover {
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}

.videoclase-step-slide-col {
  background: #0b1120;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1rem;
  border-right: 1px solid var(--border-color);
}

@media (max-width: 900px) {
  .videoclase-step-slide-col {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }
}

.videoclase-slide-thumb-wrap {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: #000000;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.videoclase-slide-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.videoclase-slide-thumb-wrap:hover .videoclase-slide-thumb {
  transform: scale(1.03);
}

.videoclase-slide-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.videoclase-slide-thumb-wrap:hover .videoclase-slide-overlay {
  opacity: 1;
}

.videoclase-slide-caption {
  margin-top: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.videoclase-step-content-col {
  padding: 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.videoclase-step-header {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.videoclase-step-badge {
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #0284c7;
  display: inline-block;
}

.videoclase-step-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.35;
  margin: 0;
}

.videoclase-step-narration {
  background: #f8fafc;
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  border-left: 3px solid #0284c7;
}

.videoclase-narration-label {
  font-size: 0.78rem;
  font-weight: 800;
  color: #0369a1;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.45rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.videoclase-narration-p {
  font-size: 0.92rem;
  line-height: 1.65;
  color: #334155;
  margin: 0;
}

.videoclase-pearl-box {
  background: #fffbeb;
  border: 1px solid #fef3c7;
  border-left: 3px solid #d97706;
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}

.videoclase-pearl-icon {
  color: #d97706;
  font-size: 1rem;
  margin-top: 0.15rem;
  flex-shrink: 0;
}

.videoclase-pearl-text {
  font-size: 0.86rem;
  line-height: 1.5;
  color: #78350f;
}

.videoclase-bullets-wrap {
  margin-top: 0.25rem;
}

.videoclase-bullets-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.videoclase-bullets-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.videoclase-bullets-list li {
  position: relative;
  padding-left: 1.15rem;
  font-size: 0.86rem;
  color: #475569;
  line-height: 1.45;
}

.videoclase-bullets-list li::before {
  content: "•";
  position: absolute;
  left: 0.25rem;
  color: #0284c7;
  font-weight: bold;
}

/* ==========================================================================
   POINT-OF-CARE TOOLKIT (QUIRÓFANO)
   ========================================================================== */
.poc-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.poc-tab-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.poc-tab-btn.active {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
  box-shadow: 0 2px 4px rgba(2, 132, 199, 0.25);
}
