/* ── Reset & variabler ──────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg:          #F5F8FC;
  --bg-card:     #ffffff;
  --bg-card-2:   #EEF3F8;
  --bg-hover:    #D8E8F5;
  --text:        #0A1E2E;
  --text-muted:  #5A7080;
  --border:      rgba(10,61,107,0.10);
  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   16px;
  --radius:      12px;
  --shadow:      0 4px 24px rgba(10,61,107,0.08);
  --font:        "Outfit", system-ui, sans-serif;
  --font-display:"Plus Jakarta Sans", system-ui, sans-serif;
  --header-h:    80px;

  /* Hygiengruppen – Nordic Clarity blåprofil */
  --hg-green:        #0A3D6B;
  --hg-green-mid:    #1A6BB5;
  --hg-green-btn:    #2E8CE8;
  --hg-blue-mid:     #2E8CE8;
  --hg-blue-light:   #5AABF5;
  --hg-gold:         #b8943a;
  --hg-gold-light:   #d4aa50;
  --hg-teal:         #1A6BB5;
  --hg-red:          #c0392b;
  --accent-gradient: linear-gradient(108deg, #0A3D6B 0%, #1A6BB5 40%, #2E8CE8 75%, #5AABF5 100%);

  /* Primär färgskala – blå */
  --primary-50:  #EEF3F8;
  --primary-100: #D8E8F5;
  --primary-200: #5AABF5;
  --primary-300: #2E8CE8;
  --primary-400: #1A6BB5;
  --primary-500: #0A3D6B;
  --primary-600: #083260;
  --primary-700: #062650;
  --primary-800: #041A3A;
  --primary-900: #020E22;

  /* Sekundär färgskala – grå */
  --secondary-50:  #F9FAFB;
  --secondary-100: #F3F4F6;
  --secondary-200: #E5E7EB;
  --secondary-300: #D1D5DB;
  --secondary-400: #9CA3AF;
  --secondary-500: #6B7280;
  --secondary-600: #4B5563;
  --secondary-700: #374151;
  --secondary-800: #1F2937;
  --secondary-900: #111827;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.7;
  min-height: 100vh;
}

a { color: var(--hg-green-mid); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: var(--hg-green);
}
h1 { font-size: 2.2rem; margin-bottom: 1rem; }
h2 { font-size: 1.6rem; margin-bottom: 0.75rem; }
h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
p  { font-size: 1rem; margin-bottom: 0.75rem; }
ul, ol { padding-left: 1.5rem; margin-bottom: 0.75rem; }
li { margin-bottom: 0.3rem; }
strong { font-weight: 600; }

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

/* ── Header ─────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(10,61,107,0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  gap: 1rem;
  transition: height 0.25s ease, border-color 0.25s ease;
}
.site-header--scrolled {
  --header-h: 60px;
  border-bottom: 1px solid rgba(10,61,107,0.15);
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}
.logo-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--hg-green) 0%, var(--hg-green-mid) 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.logo-text {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--hg-green);
  letter-spacing: -0.02em;
}
.logo-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 400;
  display: block;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.nav-link {
  color: var(--text);
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.nav-link:hover {
  background: var(--bg-hover);
  text-decoration: none;
}
.nav-link.active {
  color: var(--hg-green-btn);
  font-weight: 600;
  border-bottom: 2px solid var(--hg-green-btn);
  border-radius: 0;
  padding-bottom: 0.2rem;
}

/* ── Main ────────────────────────────────────────────────────────────────── */
.site-main {
  max-width: 1600px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* ── Generisk sidhero (alla sidor) ──────────────────────────────────────── */
.page-hero {
  background: var(--page-hero-bg, var(--accent-gradient));
  border-radius: 14px;
  padding: 32px 40px;
  color: #fff;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.04;
  pointer-events: none;
  z-index: 0;
}
/* Subtil lysande overlay */
.page-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 80% 20%, rgba(90,171,245,.15) 0%, transparent 50%),
    radial-gradient(circle at 20% 80%, rgba(255,255,255,.06) 0%, transparent 40%);
  pointer-events: none;
}
.page-hero-text { position: relative; z-index: 1; }
.page-hero-text h1 {
  color: #fff;
  font-size: 1.9rem;
  font-weight: 700;
  margin: 0 0 .3rem;
  letter-spacing: -.01em;
  line-height: 1.15;
  animation: fadeUp .45s ease both;
}
.page-hero-text p {
  color: rgba(255,255,255,.65);
  font-size: .92rem;
  margin: 0;
  line-height: 1.5;
  animation: fadeUp .45s .08s ease both;
}
.page-hero-badge {
  flex-shrink: 0;
  font-size: 2.2rem;
  position: relative;
  z-index: 1;
  opacity: .85;
  animation: fadeUp .45s .15s ease both;
}
@media (max-width: 600px) {
  .page-hero { padding: 16px 18px; margin-bottom: 1.25rem; }
  .page-hero-text h1 { font-size: 1.25rem; }
  .page-hero-text p { font-size: .82rem; }
  .page-hero-badge { display: none; }
}

/* ── Välkomstbanner ──────────────────────────────────────────────────────── */
.idx-hero {
  background: var(--accent-gradient);
  border-radius: 0 0 18px 18px;
  padding: 36px 40px;
  color: #fff;
  margin-bottom: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  position: relative;
  overflow: hidden;
}

.idx-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.04;
  pointer-events: none;
}

.idx-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 85% 20%, rgba(90,171,245,.18) 0%, transparent 50%),
    radial-gradient(circle at 15% 80%, rgba(255,255,255,.06) 0%, transparent 40%);
  pointer-events: none;
}

.idx-hero-text { position: relative; z-index: 1; }

.idx-hero-text h1 {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 6px;
  letter-spacing: -0.025em;
  line-height: 1.15;
  animation: fadeUp .5s ease both;
}

.idx-hero-text p {
  font-size: .92rem;
  color: rgba(255,255,255,.65);
  margin: 0;
  animation: fadeUp .5s .1s ease both;
}

.idx-hero-date {
  text-align: right;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  animation: fadeUp .5s .2s ease both;
}
.idx-hero-date .date-big {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}
.idx-hero-date .date-sub {
  font-size: .78rem;
  color: rgba(255,255,255,.5);
  text-transform: capitalize;
  margin-top: 2px;
  letter-spacing: .04em;
}

@keyframes fadeUp {
  from { opacity:0; transform:translateY(12px); }
  to   { opacity:1; transform:translateY(0); }
}
.stagger-item {
  opacity: 0;
  animation: fadeUp 0.45s cubic-bezier(0.34,1.56,0.64,1) both;
  animation-delay: calc(var(--i, 0) * 45ms);
}

/* ── Sektionsrubrik ──────────────────────────────────────────────────────── */
.idx-section-title {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--text-muted);
  font-weight: 700;
  margin: 0 0 1rem;
  display: flex;
  align-items: center;
  gap: .6rem;
}
.idx-section-title .st-accent {
  display: inline-block;
  width: 18px;
  height: 2px;
  background: var(--hg-gold);
  border-radius: 2px;
  flex-shrink: 0;
}
.idx-section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Snabbåtkomst tiles ──────────────────────────────────────────────────── */
.idx-quick {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .65rem;
  margin-bottom: 2.5rem;
}

.idx-quick-tile {
  background: #fff;
  border: 1px solid var(--border);
  border-left: 3px solid var(--tile-accent, #153158);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow .2s, transform .2s, border-left-color .2s;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.idx-quick-tile:hover {
  box-shadow: 0 6px 18px rgba(0,0,0,.10);
  transform: translateY(-2px);
  text-decoration: none;
  border-left-color: var(--tile-accent-hover, var(--hg-green-btn));
}
.idx-quick-tile.disabled {
  opacity: .4;
  cursor: default;
  pointer-events: none;
}
.idx-quick-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--tile-icon-bg, #E2E8ED);
  border-radius: 8px;
}
.idx-quick-label {
  font-size: .82rem;
  font-weight: 600;
  color: var(--hg-green);
  line-height: 1.3;
}
.idx-quick-sub {
  font-size: .72rem;
  color: var(--text-muted);
  margin-top: 1px;
}
.idx-quick-arrow {
  margin-left: auto;
  color: var(--text-muted);
  font-size: .8rem;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity .15s, transform .15s;
}
.idx-quick-tile:hover .idx-quick-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* ── Kort ────────────────────────────────────────────────────────────────── */
.idx-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2.25rem;
}
.idx-cards--4 { grid-template-columns: repeat(4, 1fr); }
.idx-cards--2 { grid-template-columns: repeat(2, 1fr); }

.idx-card {
  background: #fff;
  border: 1px solid var(--border);
  border-top: 2px solid var(--hg-blue-mid);
  border-radius: 12px;
  padding: 1.25rem 1.4rem;
  box-shadow: 0 2px 12px rgba(10,61,107,0.06);
  display: flex;
  flex-direction: column;
  gap: .3rem;
  position: relative;
  transition: box-shadow .3s cubic-bezier(0.34,1.56,0.64,1), transform .3s cubic-bezier(0.34,1.56,0.64,1);
}
a.idx-card:hover, .idx-card[onclick]:hover, .idx-card.clickable:hover {
  box-shadow: 0 8px 32px rgba(10,61,107,0.14);
  transform: translateY(-3px);
}
.idx-card--dim {
  opacity: .6;
  background: #f8faf9;
  pointer-events: none;
}
.idx-dev-badge {
  position: absolute;
  top: .6rem;
  right: .6rem;
  font-size: .62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  background: #e2eae6;
  color: #64746b;
  padding: .2rem .5rem;
  border-radius: 99px;
}
.idx-card .card-icon {
  font-size: 1.4rem;
  line-height: 1;
  margin-bottom: .3rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--card-accent, #153158) 10%, transparent);
  border-radius: 9px;
}
.idx-card .section-label {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--card-accent, #153158);
  font-weight: 700;
  margin: 0;
}
.idx-card h3 {
  font-size: .95rem;
  font-weight: 700;
  color: var(--hg-green);
  margin: 0;
  line-height: 1.3;
}
.idx-card p {
  font-size: .82rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
  flex: 1;
}
.idx-card .btn-row {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
  margin-top: .5rem;
}

/* ── Nyheter ─────────────────────────────────────────────────────────────── */
.idx-news-card {
  background: #fff;
  border: 1px solid var(--border);
  border-top: 2px solid var(--hg-blue-mid);
  border-radius: 12px;
  padding: 1.25rem 1.4rem;
  box-shadow: 0 2px 12px rgba(10,61,107,0.06);
}
.idx-news-card .news-hd {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: 1rem;
}
.idx-news-card .news-hd-icon {
  font-size: 1rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card-2);
  border-radius: 7px;
  flex-shrink: 0;
}
.idx-news-card .news-hd-label {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 700;
  color: var(--hg-green);
}
.idx-news-item {
  display: block;
  text-decoration: none;
  color: inherit;
  border-top: 1px solid var(--border);
  padding: .75rem 0;
  transition: background .15s;
}
.idx-news-item:first-child { border-top: none; padding-top: 0; }
.idx-news-item:hover .idx-news-title { color: var(--hg-green-btn); }
.idx-news-date {
  font-size: .7rem;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.idx-news-badge {
  display: inline-block;
  background: var(--hg-gold);
  color: #fff;
  font-size: .63rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: 1px 7px;
  border-radius: 999px;
  margin-bottom: 4px;
}
.idx-news-title {
  font-size: .875rem;
  font-weight: 600;
  color: var(--hg-green-mid);
  line-height: 1.35;
  transition: color .15s;
}
.idx-news-ingress {
  font-size: .77rem;
  color: var(--text-muted);
  margin-top: 3px;
  line-height: 1.45;
}

/* ── Knappar ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: var(--bg-card-2);
  border: 1.5px solid #B2C5D4;
  color: var(--hg-green);
  padding: .45rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--font);
  font-size: .875rem;
  font-weight: 600;
  transition: background .15s, border-color .15s, box-shadow .15s;
  text-decoration: none;
}
.btn:hover {
  background: var(--bg-hover);
  border-color: var(--hg-green-btn);
  box-shadow: 0 2px 8px rgba(10,74,46,.12);
  text-decoration: none;
}
.btn--primary {
  background: var(--accent-gradient);
  border-color: var(--hg-green-btn);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
}
.btn--primary:hover {
  filter: brightness(1.08);
  border-color: var(--hg-green-btn);
}

/* ── Allmänna kort ───────────────────────────────────────────────────────── */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-top: 2px solid var(--hg-blue-mid);
  border-radius: 16px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 12px rgba(10,61,107,0.06);
  transition: box-shadow .3s cubic-bezier(0.34,1.56,0.64,1), transform .3s cubic-bezier(0.34,1.56,0.64,1);
}
a.card:hover, .card[onclick]:hover, .card.clickable:hover {
  box-shadow: 0 8px 32px rgba(10,61,107,0.14);
  transform: translateY(-3px);
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

/* ── Responsiv ───────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .idx-hero { flex-direction: column; align-items: flex-start; padding: 28px; }
  .idx-hero-date { text-align: left; }
  .idx-quick { grid-template-columns: 1fr 1fr; }
  .idx-cards, .idx-cards--4 { grid-template-columns: 1fr 1fr; }
}
/* ── Back-knapp ────────────────────────────────────────────────────────────── */
.back-btn {
  position: absolute; left: .5rem; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; padding: 6px;
  color: var(--hg-green); display: flex; align-items: center;
  border-radius: 8px; transition: background .15s; z-index: 10;
}
.back-btn:hover { background: rgba(10,74,46,.08); }

/* ── Hamburger-meny ─────────────────────────────────────────────────────────── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
  border-radius: 8px;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--hg-green);
  border-radius: 2px;
  transition: all 0.25s ease;
}
.nav-hamburger.nav-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.nav-open span:nth-child(2) { opacity: 0; }
.nav-hamburger.nav-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 700px) {
  .nav-hamburger { display: flex; }
  .site-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 0.75rem 1rem;
    gap: 0.25rem;
    box-shadow: 0 8px 24px rgba(10,61,107,0.10);
    z-index: 99;
  }
  .site-nav.nav-open { display: flex; }
  .nav-link { padding: 0.6rem 0.75rem; border-radius: 8px; font-size: 0.95rem; }
  .nav-link.active { border-bottom: none; border-left: 3px solid var(--hg-green-btn); padding-left: 0.85rem; }
}

@media (max-width: 600px) {
  .site-main { padding: 1.25rem 1rem 3rem; }
  .idx-hero { padding: 14px 16px; margin-bottom: 1rem; }
  .idx-hero-text h1 { font-size: 1.15rem; margin-bottom: 2px; }
  .idx-hero-text p { font-size: .78rem; margin: 0; }
  .idx-hero-date .date-big { font-size: .85rem; }
  .idx-hero-date .date-sub { font-size: .7rem; }
  .idx-quick { grid-template-columns: 1fr; }
  .idx-cards, .idx-cards--4, .idx-cards--2 { grid-template-columns: 1fr; }
  .site-header { padding: 0 1rem; }
  .logo-sub { display: none; }
  .hero { padding: 16px 18px; }
  .hero h1 { font-size: 1.25rem; }
}

/* ── LMS Learner course view ─────────────────────────────────────────────── */

.hidden { display: none !important; }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 30px;
  border-radius: 14px;
  background: linear-gradient(135deg, #050a11, var(--hg-green));
  color: #fff;
  border-left: 4px solid var(--hg-gold);
  margin-bottom: 1rem;
}
.hero h1, .hero h2, .hero h3, .hero p { color: #fff; }
.hero-text { margin-top: 8px; opacity: .95; }

/* Layout grid (sidebar + content) */
.layout-grid {
  display: grid;
  grid-template-columns: minmax(260px, 340px) 1fr;
  gap: 1rem;
  align-items: start;
  margin-top: 1rem;
}

/* Card title */
.card-title { font-weight: 700; margin-bottom: .6rem; }

/* TOC */
.toc-section { margin-bottom: 14px; }
.toc-section .section-title {
  margin: 6px 0 10px;
  font-weight: 700;
  color: var(--hg-green-mid);
  font-size: .88rem;
}
.moment-item {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #fff;
  text-align: left;
  font-size: .88rem;
  transition: background .2s, border-color .2s;
  cursor: pointer;
}
.moment-item.locked   { background: #f3f4f6; color: #b0b7c3; cursor: not-allowed; opacity: .55; }
.moment-item.unlocked { border-color: #d0dff0; background: #fff; }
.moment-item.unlocked:hover { background: #f0f6ff; border-color: #a8c4e0; }
.moment-item.done {
  background: #0a4a2e; color: #fff;
  border-color: #0a4a2e;
  text-decoration: line-through;
  text-decoration-color: rgba(255,255,255,.35);
  opacity: .7;
}
.moment-item.done:hover { opacity: .85; }
.moment-item.current  {
  background: #fef3c7; color: #78350f;
  border-color: #f59e0b;
  box-shadow: 0 2px 8px rgba(245,158,11,.18);
  font-weight: 600;
}
.moment-item .badge {
  flex-shrink: 0;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: #eef2f7;
  color: #6b7280;
}
.moment-item.done .badge    { background: rgba(255,255,255,.2); color: #fff; }
.moment-item.current .badge { background: #f59e0b; color: #fff; }
.moment-item.locked .badge  { background: transparent; color: #b0b7c3; }

/* Progress bar */
.progress-wrap  { margin-top: 12px; }
.progressbar    { height: 10px; overflow: hidden; border-radius: 6px; background: #eef2f7; }
.progress-fill  { height: 100%; width: 0%; background: var(--hg-green); transition: width .25s ease; }
.progress-text  { margin-top: 8px; color: var(--text-muted); font-size: 14px; }

/* Content area */
.content-intro  { margin: 0 0 12px; color: var(--text-muted); font-size: .88rem; }
.moment         { padding: 14px 0; border-top: 1px solid #eef2f7; }
.moment:first-of-type { border-top: none; }
.moment h4      { margin-bottom: 8px; }
.moment p       { margin-bottom: 10px; }
.moment iframe  {
  width: 100%; min-height: 320px; border: 0;
  margin: 8px 0 12px; border-radius: 6px; background: #000;
}
.btn-complete {
  background: var(--hg-green);
  color: #fff;
  border: none;
  padding: 10px 14px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  font-size: .88rem;
  transition: background .2s;
}
.btn-complete:hover    { background: var(--primary-600, #112844); }
.btn-complete:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary {
  background: var(--hg-green);
  color: #fff;
  border-color: var(--hg-green);
}
.btn-primary:hover { background: #112844; }

/* Quiz */
.quiz              { margin: 8px 0 12px; padding: 12px; border-radius: 6px; background: #f8fafc; }
.quiz-question     { margin-bottom: 10px; font-weight: 700; }
.quiz-options      { display: flex; flex-wrap: wrap; gap: 8px; }
.feedback          { margin-top: 10px; padding: 8px; border-radius: 6px; font-weight: 600; }
.feedback.correct  { background: #e6f9ec; color: #0b6b2f; }
.feedback.wrong    { background: #fff3f2; color: #9b1c1c; }

/* Inline message */
.inline-message {
  margin-top: 10px; padding: 8px 10px;
  border-radius: 6px;
  background: #fff3f2; color: #9b1c1c;
  font-weight: 600; font-size: .85rem;
}

/* Summary */
.summary { margin-top: 12px; padding-top: 12px; border-top: 1px solid #eef2f7; }

/* Modal */
.modal {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  background: rgba(0,0,0,.4);
}
.modal-content  { width: 100%; max-width: 480px; text-align: center; }
.modal-actions  { display: flex; gap: 8px; justify-content: center; margin-top: 12px; }

/* Responsive learner view */
@media (max-width: 900px) {
  .layout-grid { grid-template-columns: 1fr; }
}

/* ── Kundplattform ─────────────────────────────────────────────────────────── */
.kp-platform-wrap {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.5rem;
  align-items: start;
}
.kp-platform-sidebar { min-width: 0; }
.kp-chart-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
}
@media (max-width: 900px) {
  .kp-platform-wrap { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .hero { padding: 22px; }
  .quiz-options { flex-direction: column; }
  .quiz-options .btn { width: 100%; }
  .modal-actions { flex-direction: column; }
  .modal-actions .btn { width: 100%; }
}

/* ── Startsidans hg-box tiles ──────────────────────────────────────────────── */
.hg-box {
  flex: 1 1 0;
  min-width: 0;
  background: linear-gradient(145deg, #0A3D6B, #1A6BB5);
  border-top: 2px solid rgba(90,171,245,0.4);
  color: #fff;
  font-weight: 700;
  text-align: center;
  padding: 20px 8px;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(10,61,107,0.18);
  transition: background 0.25s ease, transform 0.3s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.25s ease;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  overflow: hidden;
}
.hg-box i { width: 26px; height: 26px; margin-bottom: 8px; color: var(--hg-blue-light); flex-shrink: 0; }
.hg-box span { font-size: 0.78rem; line-height: 1.25; word-break: break-word; hyphens: auto; font-family: var(--font); }
.hg-box:hover {
  background: linear-gradient(145deg, #1A6BB5, #2E8CE8);
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(10,61,107,0.28);
  color: #fff;
  text-decoration: none;
}
.hg-box--admin {
  background: linear-gradient(145deg, #7a5c1a, #9a7520);
  border-top-color: rgba(245,217,138,0.4);
}
.hg-box--admin i { color: #f5d98a; }
.hg-box--admin:hover { background: linear-gradient(145deg, #9a7520, #b88c28); }

/* Box-badges (status under box-text) */
.hg-box-badge {
  font-size: .62rem;
  font-weight: 700;
  padding: .15rem .5rem;
  border-radius: 99px;
  margin-top: 4px;
  letter-spacing: .02em;
  line-height: 1;
}
.hg-box-badge--action {
  background: rgba(251,191,36,.9);
  color: #78350f;
}
.hg-box-badge--done {
  background: rgba(34,197,94,.85);
  color: #052e16;
}
.hg-box-badge--new {
  background: #fff;
  color: #0a4a2e;
  animation: hg-pulse 2s ease-in-out infinite;
}
@keyframes hg-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .5; }
}
