/* ================================================================
   presentasjon.css — Universal design for Reveal.js (Kiforskolen)
   Kiforskolen · DM Serif Display + DM Sans
   
   KLASSEROMSOPTIMALISERT & FULLSKJERMSUTNYTTELSE:
   - Fullskjermsfylling: 100% 1280x720 uten sorte felt i bunnen.
   - Høy kontrast: 100% lesbar tekst på alle bakgrunner (DM Sans overalt).
   - Typografisk skala: h1 56-68px, h2 38-52px, p/li 24-26px, labels 14-16px.
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600;9..40,700&display=swap');

:root {
  /* Brand Tokens */
  --primary: #3b367d;     /* Mørk lilla (--ki-accent-fg) */
  --dark:    #2a255c;     /* Ekstra mørk lilla */
  --accent:  #6e66cc;     /* Lilla aksent (--ki-accent) */
  --accent-light: #a39cf4;/* Lys lilla for høy kontrast på mørk bakgrunn */
  --light:   #f1f1f9;     /* Lys lilla bakgrunn (--ki-accent-bg) */
  --teal:    #1ce3bb;     /* Teal aksent (--ki-teal) */
  --bg:      #ffffff;     /* Hvit bakgrunn */
  --text:    #141414;     /* Off-black brødtekst for lyse sider */
  --muted:   #666666;     /* Sekundær tekst */
  --border:  #e6e6e6;     /* Kantfarge */
  --font:    'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --serif:   'DM Serif Display', Georgia, serif;
}

/* ── REVEAL OVERRIDES & STAGE FILLING ── */
.reveal-viewport { background: #080711; }
.reveal .slides { text-align: left; width: 1280px !important; height: 720px !important; }

.reveal .slides section,
.reveal .slides section.present,
.reveal .slides section.past,
.reveal .slides section.future {
  padding: 0 !important;
  margin: 0 !important;
  width: 1280px !important;
  height: 720px !important;
  min-height: 720px !important;
  max-height: 720px !important;
  top: 0 !important;
  left: 0 !important;
  box-sizing: border-box !important;
}

.reveal, 
.reveal div, 
.reveal p, 
.reveal li, 
.reveal td, 
.reveal span, 
.reveal a, 
.reveal strong, 
.reveal em {
  font-family: var(--font) !important;
  color: inherit;
}

.reveal h1, .reveal h2, .reveal h3 {
  font-family: var(--font);
  text-transform: none; letter-spacing: -0.02em;
  margin: 0; text-align: left; color: inherit; font-weight: 700;
}

.reveal .progress { color: var(--accent); height: 6px; }
.reveal .controls { color: var(--teal); }
.reveal .slide-number {
  color: #ffffff; font-size: 15px; font-weight: 700;
  background: rgba(0, 0, 0, 0.75); padding: 6px 14px; border-radius: 6px;
  bottom: 20px; right: 20px; border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ── LAYOUT HELPERS ── */
.slide-inner {
  width: 1280px !important;
  height: 720px !important;
  min-height: 720px !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden; position: relative;
  box-sizing: border-box !important;
}
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; height: 100%; align-items: stretch; }

/* ── IMAGE PLACEHOLDER ── */
.img-ph {
  background: rgba(255,255,255,0.07);
  border: 2px dashed rgba(255,255,255,0.35);
  border-radius: 0.6rem;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; padding: 32px; box-sizing: border-box;
  height: 100%; min-height: 280px;
}
.img-ph .ph-emoji { font-size: 56px; margin-bottom: 14px; }
.img-ph .ph-title { font-size: 22px; font-weight: 700; color: rgba(255,255,255,0.95); margin-bottom: 8px; }
.img-ph .ph-desc { font-size: 16px; color: rgba(255,255,255,0.75); font-style: italic; max-width: 320px; line-height: 1.45; }
.img-ph.light { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.22); }
.img-ph.light .ph-title { color: #141414; }
.img-ph.light .ph-desc { color: #555555; }

/* ── VARIANT 1: HERO SLIDE (RICH SPLIT) ── */
.slide-hero {
  background-color: var(--bg);
  background-size: 44% 100%;
  background-position: right center;
  background-repeat: no-repeat;
}
.slide-hero::after {
  content: '';
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(110,102,204,0.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(110,102,204,0.10) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: linear-gradient(to right, black 0%, black 38%, transparent 58%);
  mask-image: linear-gradient(to right, black 0%, black 38%, transparent 58%);
}
.hero-overlay {
  position: absolute;
  top: 0; bottom: 0; left: 56%; right: 0;
  background: linear-gradient(135deg,
    rgba(241,241,249,0.45) 0%,
    rgba(59,54,125,0.55) 100%);
  z-index: 1;
}
.hero-content {
  position: relative; z-index: 2;
  padding: 56px 64px 48px; height: 100%; width: 56%; box-sizing: border-box;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.activity-badge {
  display: inline-block;
  background: var(--light); color: var(--primary);
  font-size: 14px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 7px 18px; border-radius: 2rem;
  margin-bottom: 18px; align-self: flex-start;
  border: 1px solid rgba(110,102,204,0.35);
}
.hero-content h1 {
  font-family: var(--serif) !important;
  font-size: 68px; font-weight: 400; color: var(--text);
  line-height: 1.05; margin-bottom: 14px;
}
.hero-sub { font-size: 24px; color: var(--muted); margin-bottom: 24px; font-weight: 500; }
.kjerne-bar {
  background: var(--primary);
  border-left: 6px solid var(--teal);
  padding: 16px 22px; margin-bottom: 22px; max-width: 640px;
  border-radius: 0 0.5rem 0.5rem 0;
}
.kjerne-label {
  font-size: 13px; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--teal) !important; margin-bottom: 6px; display: block;
}
.kjerne-bar p { font-size: 19px; color: #ffffff !important; line-height: 1.45; font-weight: 400; margin: 0; }
.hero-meta { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-chip {
  background: white; color: var(--text);
  font-size: 14px; font-weight: 600; padding: 6px 16px; border-radius: 2rem;
  border: 1px solid #d4d0c8;
}

/* ── VARIANT 2: CLEAN MINIMALIST CENTERED COVER ── */
.slide-cover-clean, section.slide-cover-clean {
  background: #141414 !important;
  color: #ffffff !important;
  display: flex !important; flex-direction: column;
  justify-content: center; align-items: center;
  text-align: center; padding: 48px; box-sizing: border-box;
}
.slide-cover-clean .badge-clean {
  font-size: 15px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.16em; color: var(--accent-light) !important; margin-bottom: 24px;
}
.slide-cover-clean h1 {
  font-size: 58px; font-weight: 700; color: #ffffff !important;
  margin-bottom: 22px; line-height: 1.1; text-align: center;
}
.slide-cover-clean .kjerne {
  font-size: 22px; color: rgba(255,255,255,0.85) !important;
  max-width: 840px; margin: 0 auto; line-height: 1.5; text-align: center;
}

/* ── KONTEKST SLIDE (MØRK) ── */
.slide-kontekst, section.slide-kontekst {
  background: #09090b !important;
  background-image:
    radial-gradient(ellipse at 15% 50%, rgba(110,102,204,0.30) 0%, transparent 60%),
    radial-gradient(ellipse at 85% 20%, rgba(28,227,187,0.12) 0%, transparent 50%) !important;
  color: #ffffff !important;
}
.kontekst-inner { height: 100%; display: flex; align-items: center; padding: 56px 80px; box-sizing: border-box; }
.kontekst-content { max-width: 1020px; width: 100%; }
.k-eyebrow, .kontekst-eyebrow {
  font-size: 15px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--teal) !important; margin-bottom: 24px;
  display: flex; align-items: center; gap: 14px;
}
.k-eyebrow::after, .kontekst-eyebrow::after {
  content: ''; width: 80px; height: 2px;
  background: var(--teal);
}
.kontekst-content h2 {
  font-family: var(--serif) !important;
  font-size: 56px; font-weight: 400; color: #ffffff !important;
  line-height: 1.1; margin-bottom: 28px;
}
.kontekst-content h2 em { color: var(--accent-light) !important; font-style: normal; font-weight: 400; }
.k-body, .kontekst-text, .slide-kontekst p {
  font-size: 26px !important; color: #ffffff !important; line-height: 1.55 !important; font-style: normal !important;
}
.kontekst-text strong { color: var(--teal) !important; font-weight: 700; }
.kontekst-aside { font-size: 18px !important; color: rgba(255,255,255,0.75) !important; margin-top: 28px; font-style: italic !important; }

/* ── STANDARD INNHOLDSSLIDES (LYS BAKGRUNN) ── */
.slide-content, section.slide-content { background: var(--bg) !important; }
.slide-header { background: var(--primary); padding: 24px 56px; flex-shrink: 0; }
.slide-header .phase-tag {
  font-size: 14px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--teal) !important; margin-bottom: 6px; display: block;
}
.slide-header h2 { font-size: 40px; color: #ffffff !important; font-weight: 700; line-height: 1.1; }

.slide-body {
  flex: 1; padding: 36px 56px; box-sizing: border-box;
  display: flex; flex-direction: column; justify-content: space-between; gap: 20px;
}
.slide-body p { font-size: 24px !important; line-height: 1.5; color: var(--text) !important; margin: 0; }
.slide-body ul { list-style: none; display: flex; flex-direction: column; gap: 16px; margin: 0; padding: 0; }
.slide-body ul li {
  font-size: 24px !important; line-height: 1.45; color: var(--text) !important;
  padding-left: 32px; position: relative;
}
.slide-body ul li::before {
  content: '▸'; color: var(--primary);
  position: absolute; left: 0; font-size: 20px; top: 2px; font-weight: 700;
}
.slide-body ul li strong { color: var(--primary) !important; font-weight: 700; }

.instr-box {
  background: var(--primary); color: #ffffff !important;
  padding: 22px 28px; font-size: 22px !important; line-height: 1.5; border-radius: 0.6rem;
  width: 100%; box-sizing: border-box;
}
.instr-box .instr-label {
  font-size: 14px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--teal) !important; margin-bottom: 6px; display: block;
}
.tip-box {
  background: #fbf4df; border-left: 6px solid #fcc522;
  padding: 20px 24px; font-size: 22px !important; line-height: 1.5; color: #8a3b00 !important; border-radius: 0.3rem;
  width: 100%; box-sizing: border-box;
}
.info-box {
  background: #e2f1f8; border-left: 6px solid #3ebaf4;
  padding: 20px 24px; font-size: 22px !important; line-height: 1.5; color: #0f3291 !important; border-radius: 0.3rem;
  width: 100%; box-sizing: border-box;
}

/* ── CLEAN UNDERLINED HEADER SLIDE (Full Høyde & Strøken Avstand) ── */
.slide-clean-header, section.slide-clean-header {
  background: #ffffff !important; padding: 48px 64px; box-sizing: border-box;
  display: flex !important; flex-direction: column !important; justify-content: space-between !important;
  height: 720px !important; min-height: 720px !important;
}
.slide-clean-header h2 {
  font-size: 42px; font-weight: 700; color: var(--primary) !important;
  border-bottom: 4px solid var(--accent); padding-bottom: 10px;
  display: inline-block; margin-bottom: 28px;
}
.slide-clean-header ul {
  list-style: none; display: flex; flex-direction: column; gap: 20px;
  margin: 0; padding: 0; flex: 1; justify-content: center;
}
.slide-clean-header ul li {
  font-size: 26px !important; line-height: 1.5; color: var(--text) !important;
  padding-left: 36px; position: relative; font-family: var(--font) !important;
}
.slide-clean-header ul li::before {
  content: '▸'; color: var(--primary);
  position: absolute; left: 0; font-size: 22px; top: 2px; font-weight: 700;
}
.slide-clean-header ul li strong {
  color: var(--primary) !important; font-weight: 700;
}

/* ── MINT GREEN REFLEKSJON SLIDE (Full Høyde utan sorte felt) ── */
.slide-mint, section.slide-mint {
  background: #e6f7f3 !important; color: #141414 !important;
  padding: 48px 64px; box-sizing: border-box;
  display: flex !important; flex-direction: column !important; justify-content: space-between !important;
  height: 720px !important; min-height: 720px !important;
}
.slide-mint h2 {
  font-size: 42px; font-weight: 700; color: #0d6855 !important;
  border-bottom: 4px solid #1ce3bb; display: inline-block;
  padding-bottom: 10px; margin-bottom: 28px;
}
.slide-mint ul {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 24px;
  flex: 1; justify-content: center;
}
.slide-mint ul li {
  font-size: 26px !important; color: #141414 !important; line-height: 1.5;
  padding-left: 36px; position: relative; font-family: var(--font) !important;
}
.slide-mint ul li::before {
  content: '•'; color: #0d6855 !important;
  position: absolute; left: 10px; font-size: 28px; top: -3px; font-weight: 700;
}

/* ── 2x2 WHITE CARDS FOR BEGREPER (Full Høyde) ── */
.slide-begreper-cards, section.slide-begreper-cards {
  background: #f4f4f8 !important; padding: 48px 64px; box-sizing: border-box;
  display: flex !important; flex-direction: column !important; justify-content: space-between !important;
  height: 720px !important; min-height: 720px !important;
}
.slide-begreper-cards h2 {
  font-size: 42px; font-weight: 700; color: var(--primary) !important; margin-bottom: 28px;
}
.term-grid-2x2 {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px; flex: 1; align-content: stretch;
}
.term-card-clean {
  background: #ffffff; border: 1px solid #e0e0e0;
  border-radius: 0.6rem; padding: 28px 32px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  display: flex; flex-direction: column; justify-content: center;
}
.term-card-clean strong {
  display: block; font-size: 26px !important; font-weight: 700;
  color: var(--primary) !important; margin-bottom: 12px;
}
.term-card-clean p {
  font-size: 21px !important; line-height: 1.5; color: #444444 !important; margin: 0;
}

/* ── BONDESJAKK BRETT (3x3 MOCKUP) ── */
.brett {
  display: grid;
  grid-template-columns: repeat(3, 100px);
  grid-template-rows: repeat(3, 100px);
  gap: 4px;
  background: var(--primary);
  padding: 10px;
  border-radius: 0.6rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  margin: 16px 0;
}
.rute {
  background: #ffffff;
  display: flex; align-items: center; justify-content: center;
  font-size: 42px; font-weight: 800; color: var(--primary) !important;
  border-radius: 0.3rem;
}

/* ── FASE-RADER MED STEG-NUMMER ── */
.phase-circle {
  width: 56px; height: 56px;
  background: var(--accent); color: white !important; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 700; flex-shrink: 0;
}
.phase-row { display: flex; align-items: center; margin-bottom: 18px; gap: 18px; }
.phase-row h3 { font-size: 30px; color: var(--primary) !important; font-weight: 700; margin: 0; }

/* ── VIDEO SLIDE ── */
.slide-video, section.slide-video { background: #0d0d0d !important; color: #ffffff !important; }
.video-body { flex: 1; padding: 32px 56px; display: flex; gap: 40px; align-items: center; box-sizing: border-box; }
.video-text { flex: 0 0 440px; display: flex; flex-direction: column; gap: 18px; }
.video-text p { font-size: 22px !important; line-height: 1.5; color: #ffffff !important; margin: 0; }
.video-text strong { color: var(--teal) !important; }
.video-text ul { list-style: none; display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; }
.video-text ul li {
  font-size: 20px !important; color: rgba(255,255,255,0.92) !important;
  padding-left: 24px; position: relative; line-height: 1.45;
}
.video-text ul li::before {
  content: '›'; color: var(--teal) !important;
  position: absolute; left: 0; font-size: 22px; font-weight: 700; top: -1px;
}
.video-frame { flex: 1; display: flex; flex-direction: column; gap: 12px; height: 100%; justify-content: center; }
.video-frame iframe { width: 100%; min-height: 340px; aspect-ratio: 16/9; border: 0; background: #000; border-radius: 0.6rem; }
.video-caption { font-size: 16px; color: rgba(255,255,255,0.65) !important; text-align: center; font-style: italic; }

/* ── MØRKE SLIDES (PLENUM, KI-KOBLING & REFLEKSJON) ── */
.slide-dark, section.slide-dark { background: var(--primary) !important; color: #ffffff !important; }
.slide-dark .slide-header { background: rgba(0,0,0,0.3); }

.q-list { list-style: none; display: flex; flex-direction: column; gap: 18px; margin: 0; padding: 0; }
.q-list li {
  font-size: 24px !important; line-height: 1.45 !important; color: #ffffff !important;
  padding-left: 48px; position: relative;
}
.q-list li::before {
  content: '?'; color: #ffffff; background: var(--teal);
  font-weight: 700; font-size: 16px;
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  position: absolute; left: 0; top: 2px;
}

/* ── AI-KOBLING GRID (3x2 KORT) ── */
.ai-kobling-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; margin-top: 10px; height: 100%; align-content: center; }
.ai-chip { background: rgba(255,255,255,0.13); padding: 22px 24px; border-top: 4px solid var(--teal); border-radius: 0.6rem; min-height: 150px; display: flex; flex-direction: column; justify-content: center; }
.ai-chip .ac-title {
  font-size: 17px; font-weight: 700; color: var(--teal) !important;
  margin-bottom: 8px; letter-spacing: 0.06em; text-transform: uppercase;
}
.ai-chip p { font-size: 18px !important; color: #ffffff !important; line-height: 1.45; margin: 0; }

/* ── REFLEKSJON SLIDE (2x2 KORT) ── */
.slide-refleksjon, section.slide-refleksjon { background: var(--primary) !important; color: #ffffff !important; }
.r-header, .refleksjon-header { padding: 36px 56px 0; flex-shrink: 0; }
.r-eyebrow {
  font-size: 14px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--teal) !important; margin-bottom: 6px; display: block;
}
.r-header h2, .refleksjon-header h2 {
  font-family: var(--serif) !important; font-size: 48px; font-weight: 400; color: #ffffff !important; margin: 0;
}
.q-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding: 24px 56px 40px; flex: 1; box-sizing: border-box; align-content: center; }
.q-card {
  background: rgba(255,255,255,0.13); padding: 24px 28px;
  border-left: 5px solid var(--teal); border-radius: 0.6rem;
  display: flex; flex-direction: column; justify-content: center; gap: 10px; min-height: 180px;
}
.q-num {
  font-size: 14px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--teal) !important; margin-bottom: 2px;
}
.q-card p { font-size: 22px !important; color: #ffffff !important; line-height: 1.45; margin: 0; }

/* ── BEGREPER TABELL ── */
.begrep-table { width: 100%; height: 100%; border-collapse: collapse; }
.begrep-table tr { height: 16.66%; }
.begrep-table td.bterm {
  background: var(--primary); color: #ffffff !important; font-weight: 700; width: 26%;
  padding: 16px 20px; font-size: 22px !important;
  border-bottom: 3px solid var(--bg); vertical-align: middle;
}
.begrep-table tr:nth-child(even) td.bterm { background: var(--dark); }
.begrep-table td.bdef {
  background: var(--light); padding: 16px 20px;
  font-size: 20px !important; line-height: 1.45; color: var(--text) !important;
  border-bottom: 3px solid var(--bg); vertical-align: middle;
}

/* Tilbake-knapp */
.back-to-lesson {
  position: fixed; top: 20px; right: 20px;
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.5); color: white !important; border: none; border-radius: 50%;
  cursor: pointer; font-size: 28px; text-decoration: none; z-index: 1000;
  transition: all 0.2s ease; opacity: 0.85;
}
.back-to-lesson:hover { background: rgba(0, 0, 0, 0.8); opacity: 1; }
