/* DELVIO e-Learning homepage — interactive showcase */

:root {
  --el-primary: #1e4d8c;
  --el-primary-light: #2d6cb5;
  --el-accent: #0d9488;
  --el-accent-soft: #ccfbf1;
  --el-surface: #ffffff;
  --el-muted: #64748b;
  --el-border: #e2e8f0;
  --el-bg: #f1f5f9;
  --el-dark: #0f172a;
  --el-radius: 0.75rem;
  --el-shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
}

body.el-home {
  background: var(--el-bg);
  color: var(--el-dark);
}

/* Hero */
.el-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 45%, #1e4d8c 100%);
  color: #fff;
  padding: 3.5rem 0 4rem;
  position: relative;
  overflow: hidden;
}

.el-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(13, 148, 136, 0.25) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(45, 108, 181, 0.3) 0%, transparent 45%);
  pointer-events: none;
}

.el-hero .container {
  position: relative;
  z-index: 1;
}

.el-hero-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 2rem;
  padding: 0.35rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.el-hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.el-hero-lead {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 36rem;
  margin-bottom: 1.5rem;
}

.el-hero-tagline {
  min-height: 2rem;
  color: var(--el-accent-soft);
  font-size: 1.05rem;
  font-weight: 500;
  margin-bottom: 2rem;
}

.el-hero-tagline .tagline-item {
  display: none;
}

.el-hero-tagline .tagline-item.active {
  display: block;
  animation: elFadeUp 0.45s ease;
}

@keyframes elFadeUp {
  from { opacity: 0; transform: translateY(0.5rem); }
  to   { opacity: 1; transform: translateY(0); }
}

.el-hero-actions .btn {
  padding: 0.65rem 1.5rem;
  font-weight: 600;
  border-radius: 0.5rem;
}

.btn-primary-el {
  background: var(--el-accent);
  border-color: var(--el-accent);
  color: #fff;
}

.btn-primary-el:hover,
.btn-primary-el:focus {
  background: #0f766e;
  border-color: #0f766e;
  color: #fff;
}

.btn-primary-el:disabled {
  opacity: 0.65;
}

.el-hero-actions .btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Stats strip */
.el-stats {
  background: var(--el-surface);
  border-bottom: 1px solid var(--el-border);
  padding: 1.75rem 0;
  box-shadow: var(--el-shadow);
}

.el-stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--el-primary);
  line-height: 1.2;
}

.el-stat-label {
  font-size: 0.85rem;
  color: var(--el-muted);
  margin-top: 0.2rem;
}

/* Demo arena */
.el-section {
  padding: 4rem 0;
}

.el-section-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.el-section-sub {
  color: var(--el-muted);
  max-width: 40rem;
  margin-bottom: 2rem;
}

.el-demo-arena {
  background: var(--el-surface);
  border: 1px solid var(--el-border);
  border-radius: var(--el-radius);
  box-shadow: var(--el-shadow);
  overflow: hidden;
}

.el-demo-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 1rem 1rem 0;
  background: #f8fafc;
  border-bottom: 1px solid var(--el-border);
}

.el-demo-tab {
  border: 1px solid transparent;
  background: transparent;
  color: var(--el-muted);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.5rem 0.9rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.el-demo-tab:hover {
  color: var(--el-primary);
  background: rgba(30, 77, 140, 0.06);
}

.el-demo-tab.active {
  background: var(--el-surface);
  color: var(--el-primary);
  border-color: var(--el-border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.el-demo-panel {
  display: none;
  padding: 1.5rem;
  min-height: 22rem;
}

.el-demo-panel.active {
  display: block;
  animation: elFadeUp 0.35s ease;
}

.el-demo-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--el-accent);
  margin-bottom: 0.35rem;
}

.el-demo-heading {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

/* Module player */
.el-player {
  border: 1px solid var(--el-border);
  border-radius: 0.5rem;
  overflow: hidden;
  max-width: 42rem;
}

.el-player-chrome {
  background: var(--el-dark);
  color: #fff;
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
}

.el-player-progress {
  height: 4px;
  background: #334155;
}

.el-player-progress-fill {
  height: 100%;
  background: var(--el-accent);
  transition: width 0.35s ease;
  width: 0%;
}

.el-player-body {
  padding: 1.5rem;
  background: #fff;
  min-height: 10rem;
}

.el-player-slide-title {
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.el-player-slide-text {
  color: var(--el-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.el-player-footer {
  padding: 0.75rem 1rem;
  background: #f8fafc;
  border-top: 1px solid var(--el-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Scenario */
.el-scenario-card {
  border: 1px solid var(--el-border);
  border-radius: 0.5rem;
  padding: 1.25rem;
  background: #fafbfc;
  max-width: 36rem;
}

.el-scenario-choices {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}

.el-scenario-btn {
  text-align: left;
  padding: 0.75rem 1rem;
  border: 1px solid var(--el-border);
  border-radius: 0.5rem;
  background: #fff;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.el-scenario-btn:hover:not(:disabled) {
  border-color: var(--el-primary-light);
  background: rgba(30, 77, 140, 0.04);
}

.el-scenario-btn.correct {
  border-color: #16a34a;
  background: #f0fdf4;
}

.el-scenario-btn.incorrect {
  border-color: #dc2626;
  background: #fef2f2;
}

.el-scenario-feedback {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  display: none;
}

.el-scenario-feedback.show {
  display: block;
}

.el-scenario-feedback.success {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.el-scenario-feedback.warning {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

/* Quiz */
.el-quiz-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 32rem;
}

.el-quiz-option {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--el-border);
  border-radius: 0.5rem;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.2s;
}

.el-quiz-option:hover {
  border-color: var(--el-primary-light);
}

.el-quiz-option.selected {
  border-color: var(--el-primary);
  background: rgba(30, 77, 140, 0.04);
}

.el-quiz-option.correct {
  border-color: #16a34a;
  background: #f0fdf4;
}

.el-quiz-option.incorrect {
  border-color: #dc2626;
  background: #fef2f2;
}

.el-quiz-score {
  font-weight: 600;
  color: var(--el-primary);
  margin-top: 1rem;
}

/* Drag & drop */
.el-match-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  max-width: 40rem;
}

@media (max-width: 576px) {
  .el-match-grid {
    grid-template-columns: 1fr;
  }
}

.el-match-col h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--el-muted);
  margin-bottom: 0.75rem;
}

.el-drag-item {
  padding: 0.6rem 0.9rem;
  background: #fff;
  border: 2px dashed var(--el-border);
  border-radius: 0.5rem;
  margin-bottom: 0.5rem;
  cursor: grab;
  font-size: 0.9rem;
  user-select: none;
  transition: all 0.2s;
}

.el-drag-item:active {
  cursor: grabbing;
}

.el-drag-item.matched {
  opacity: 0.4;
  pointer-events: none;
}

.el-drop-zone {
  min-height: 2.75rem;
  padding: 0.5rem 0.75rem;
  border: 2px dashed #cbd5e1;
  border-radius: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  color: var(--el-muted);
  transition: all 0.2s;
}

.el-drop-zone.drag-over {
  border-color: var(--el-accent);
  background: var(--el-accent-soft);
}

.el-drop-zone.filled {
  border-style: solid;
  border-color: var(--el-primary-light);
  color: var(--el-dark);
  background: #fff;
}

.el-drop-zone.correct {
  border-color: #16a34a;
  background: #f0fdf4;
}

.el-drop-zone.incorrect {
  border-color: #dc2626;
  background: #fef2f2;
}

/* Components */
.el-comp-tabs .nav-link {
  color: var(--el-muted);
  font-weight: 600;
  font-size: 0.85rem;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
}

.el-comp-tabs .nav-link.active {
  color: var(--el-primary);
  border-bottom-color: var(--el-primary);
  background: transparent;
}

.el-hotspot-wrap {
  position: relative;
  background: linear-gradient(135deg, #e0f2fe, #f0fdf4);
  border-radius: 0.5rem;
  height: 12rem;
  border: 1px solid var(--el-border);
}

.el-hotspot {
  position: absolute;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--el-accent);
  color: #fff;
  border: 3px solid #fff;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  animation: elPulse 2s infinite;
}

@keyframes elPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.08); }
}

.el-hotspot-pop {
  position: absolute;
  background: #fff;
  border: 1px solid var(--el-border);
  border-radius: 0.5rem;
  padding: 0.75rem;
  font-size: 0.85rem;
  max-width: 14rem;
  box-shadow: var(--el-shadow);
  z-index: 2;
  display: none;
}

.el-hotspot-pop.show {
  display: block;
}

.el-timeline {
  position: relative;
  padding-left: 1.5rem;
}

.el-timeline::before {
  content: "";
  position: absolute;
  left: 0.35rem;
  top: 0.25rem;
  bottom: 0.25rem;
  width: 2px;
  background: var(--el-border);
}

.el-timeline-item {
  position: relative;
  padding-bottom: 1rem;
}

.el-timeline-item::before {
  content: "";
  position: absolute;
  left: -1.22rem;
  top: 0.35rem;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: var(--el-accent);
  border: 2px solid #fff;
}

.el-timeline-item h5 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.el-timeline-item p {
  font-size: 0.85rem;
  color: var(--el-muted);
  margin: 0;
}

/* Flashcards */
.el-flashcard {
  perspective: 800px;
  width: 100%;
  max-width: 20rem;
  height: 11rem;
  cursor: pointer;
}

.el-flashcard-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.5s;
  transform-style: preserve-3d;
}

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

.el-flashcard-front,
.el-flashcard-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 0.5rem;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.95rem;
  border: 1px solid var(--el-border);
}

.el-flashcard-front {
  background: var(--el-primary);
  color: #fff;
  font-weight: 600;
}

.el-flashcard-back {
  background: #fff;
  color: var(--el-dark);
  transform: rotateY(180deg);
}

.el-flashcard-hint {
  font-size: 0.75rem;
  color: var(--el-muted);
  margin-top: 0.5rem;
}

/* xAPI panel */
.el-xapi-log {
  background: #0f172a;
  color: #94a3b8;
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
  border-radius: 0.5rem;
  padding: 1rem;
  max-height: 14rem;
  overflow-y: auto;
}

.el-xapi-log .stmt {
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #1e293b;
}

.el-xapi-log .verb {
  color: #2dd4bf;
}

.el-xapi-log .obj {
  color: #93c5fd;
}

/* Tech grid */
.el-tech-card {
  background: var(--el-surface);
  border: 1px solid var(--el-border);
  border-radius: var(--el-radius);
  padding: 1.25rem;
  height: 100%;
  cursor: pointer;
  transition: all 0.25s ease;
}

.el-tech-card:hover,
.el-tech-card.active {
  border-color: var(--el-primary-light);
  box-shadow: var(--el-shadow);
  transform: translateY(-2px);
}

.el-tech-card.active {
  background: rgba(30, 77, 140, 0.04);
}

.el-tech-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  background: var(--el-accent-soft);
  color: var(--el-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.el-tech-detail {
  background: var(--el-surface);
  border: 1px solid var(--el-border);
  border-radius: var(--el-radius);
  padding: 1.5rem;
  min-height: 12rem;
}

/* Service cards */
.el-service-card {
  background: var(--el-surface);
  border: 1px solid var(--el-border);
  border-radius: var(--el-radius);
  padding: 1.25rem;
  height: 100%;
  transition: transform 0.25s, box-shadow 0.25s;
}

.el-service-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--el-shadow);
}

.el-service-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.el-service-card p {
  font-size: 0.88rem;
  color: var(--el-muted);
  margin: 0;
}

/* Process steps */
.el-process {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.el-process-step {
  flex: 1 1 8rem;
  max-width: 10rem;
  text-align: center;
  padding: 1rem 0.75rem;
  background: var(--el-surface);
  border: 1px solid var(--el-border);
  border-radius: var(--el-radius);
}

.el-process-num {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--el-primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
}

.el-process-step h4 {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.el-process-step p {
  font-size: 0.75rem;
  color: var(--el-muted);
  margin: 0;
}

/* CTA */
.el-cta {
  background: linear-gradient(135deg, var(--el-primary) 0%, #1e3a5f 100%);
  color: #fff;
  border-radius: var(--el-radius);
  padding: 3rem 2rem;
  text-align: center;
}

.el-cta h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.el-cta p {
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 1.5rem;
}

/* Fade-in reuse */
.fade-in-section {
  opacity: 0;
  transform: translateY(1.25rem);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Demo completion badge */
.el-demo-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--el-muted);
  background: #f1f5f9;
  padding: 0.25rem 0.6rem;
  border-radius: 2rem;
}

.el-demo-status.done {
  color: #166534;
  background: #dcfce7;
}