/* style.css — Inženierzinības pamatskolai
   Dizains pielāgots skolotājiem: skaidrs, profesionāls, viegli lasāms */

:root {
  /* Krāsas — atturīgas, profesionālas, ar Skola2030 nokrāsu */
  --ink:        #1f2937;
  --ink-soft:   #374151;
  --paper:      #fafaf7;
  --cream:      #f3efe6;
  --white:      #ffffff;

  --primary:    #b94a2c;       /* Skola2030 sarkans */
  --primary-dk: #8f3318;
  --primary-lt: #fef2ed;

  --accent:     #2c5282;       /* informatīvi akcenti */
  --accent-lt:  #ebf4fb;

  --success:    #2f7a3f;
  --warning:    #b88416;

  --muted:      #6b7280;
  --light:      #9ca3af;
  --border:     #e5e1d4;
  --border-strong: #d4cfbf;

  --shadow-sm:  0 1px 3px rgba(31,41,55,.06);
  --shadow:     0 4px 12px rgba(31,41,55,.08);
  --shadow-lg:  0 12px 32px rgba(31,41,55,.12);

  --r:          6px;
  --r-md:       10px;
  --r-lg:       14px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'DM Serif Display', Georgia, serif;
  line-height: 1.2;
  color: var(--ink);
  font-weight: 400;
}

p { color: var(--ink-soft); }

a { color: var(--primary); text-decoration: none; transition: color .15s; }
a:hover { color: var(--primary-dk); }

img { max-width: 100%; display: block; }

ul, ol { padding-left: 1.25rem; }

/* Layout */
.container,
.container-narrow {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 32px;
}

/* ── HEADER ── */
.site-header {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.header-inner {
  width: 100%;
  max-width: none;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 24px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink) !important;
  text-decoration: none;
}
.logo-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: var(--primary);
  color: #fff;
  font-family: 'DM Serif Display', serif;
  font-size: 1.1rem;
  border-radius: var(--r);
  flex-shrink: 0;
}
.logo-mark.small { width: 32px; height: 32px; font-size: .85rem; }
.logo-text {
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
}
.logo-text small {
  display: block;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 400;
  margin-top: 2px;
}
.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: .92rem;
  font-weight: 500;
}
.main-nav a { color: var(--ink-soft); transition: color .15s; }
.main-nav a:hover { color: var(--primary); }
.main-nav a.active { color: var(--primary); }
.mobile-nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
  font-size: .86rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.mobile-nav-toggle:hover,
.mobile-nav-toggle[aria-expanded="true"] {
  border-color: var(--primary);
  background: var(--primary-lt);
  color: var(--primary-dk);
}
.mobile-nav-toggle-icon {
  position: relative;
  width: 18px;
  height: 12px;
}
.mobile-nav-toggle-icon,
.mobile-nav-toggle-icon::before,
.mobile-nav-toggle-icon::after {
  display: block;
  border-top: 2px solid currentColor;
  transition: transform .18s ease, border-color .18s ease;
}
.mobile-nav-toggle-icon::before,
.mobile-nav-toggle-icon::after {
  content: '';
  position: absolute;
  left: 0;
  width: 18px;
}
.mobile-nav-toggle-icon::before { top: 4px; }
.mobile-nav-toggle-icon::after { top: 10px; }
.mobile-nav-toggle[aria-expanded="true"] .mobile-nav-toggle-icon {
  border-color: transparent;
}
.mobile-nav-toggle[aria-expanded="true"] .mobile-nav-toggle-icon::before {
  transform: translateY(-4px) rotate(45deg);
}
.mobile-nav-toggle[aria-expanded="true"] .mobile-nav-toggle-icon::after {
  transform: translateY(-10px) rotate(-45deg);
}
.btn-nav {
  background: var(--primary);
  color: #fff !important;
  padding: 8px 18px;
  border-radius: var(--r);
  transition: background .15s;
  font-weight: 600;
}
.btn-nav:hover { background: var(--primary-dk) !important; color: #fff !important; }
.nav-user {
  color: var(--ink) !important;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.nav-user::before {
  content: '';
  width: 8px; height: 8px;
  background: var(--success);
  border-radius: 50%;
}

/* ── HERO ── */
.hero {
  background: linear-gradient(135deg, #1f2937 0%, #2d3748 100%);
  color: var(--paper);
  padding: 88px 0 96px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 85% 30%, rgba(185,74,44,.15) 0, transparent 50%),
    radial-gradient(circle at 15% 80%, rgba(44,82,130,.15) 0, transparent 50%);
}
.hero-inner { position: relative; z-index: 1; width: 100%; max-width: none; }
.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  color: #fff;
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .04em;
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 24px;
}
.hero-label::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--primary);
  border-radius: 50%;
}
.hero h1 {
  font-size: clamp(2.2rem, 4.8vw, 3.6rem);
  color: #fff;
  margin-bottom: 22px;
  line-height: 1.15;
  font-weight: 400;
}
.hero h1 em { color: #f0c674; font-style: italic; font-weight: 400; }
.hero-lead {
  font-size: 1.12rem;
  color: #d1d5db;
  max-width: none;
  margin-bottom: 36px;
  font-weight: 400;
  line-height: 1.65;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--r);
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all .15s;
  font-family: 'DM Sans', sans-serif;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dk); border-color: var(--primary-dk); color: #fff; }

.btn-secondary { background: var(--white); color: var(--ink); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--cream); color: var(--ink); }

.btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.3); }
.btn-outline:hover { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.5); }

.btn-light { background: var(--white); color: var(--ink); border-color: var(--border-strong); }
.btn-light:hover { background: var(--cream); border-color: var(--ink-soft); color: var(--ink); }

.btn-sm { padding: 8px 16px; font-size: .85rem; }

/* ── SECTIONS ── */
.section { padding: 80px 0; }
.section-sm { padding: 56px 0; }
.section-alt { background: var(--cream); }
.section-white { background: var(--white); }

.section-header { max-width: 720px; margin-bottom: 48px; }
.section-label {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 12px;
}
.section-title {
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  margin-bottom: 16px;
  line-height: 1.15;
}
.section-lead {
  font-size: 1.05rem;
  color: var(--muted);
  font-weight: 400;
  line-height: 1.65;
}

/* ── ABOUT GRID ── */
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 56px;
  align-items: start;
}
.about-text p { color: var(--ink-soft); margin-bottom: 16px; line-height: 1.75; }
.about-text p strong { color: var(--ink); font-weight: 600; }
.about-stats {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.stats-header { padding-bottom: 20px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.stats-header strong {
  display: block;
  font-size: .75rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.stats-header h3 { font-size: 1.4rem; line-height: 1.2; }
.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
  font-size: .92rem;
}
.stat-row:last-child { border-bottom: none; }
.stat-row .label { color: var(--ink-soft); font-weight: 500; }
.stat-row .value {
  font-family: 'DM Serif Display', serif;
  color: var(--primary);
  font-size: 1.05rem;
}
.stats-total {
  margin-top: 16px;
  padding: 14px 16px;
  background: var(--primary-lt);
  border-radius: var(--r);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.stats-total strong { color: var(--primary-dk); font-size: .9rem; }
.stats-total .total-value {
  font-family: 'DM Serif Display', serif;
  font-size: 1.4rem;
  color: var(--primary);
}

.aprobacija-banner {
  display: block;
  position: relative;
  margin-top: 28px;
  padding: 22px 56px 22px 24px;
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, #24344f 0%, #1d2b43 100%);
  color: #fff;
  text-decoration: none;
  box-shadow: var(--shadow-lg);
  transition: transform .18s ease, box-shadow .18s ease;
}
.aprobacija-banner:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(31, 41, 55, .18);
}
.aprobacija-banner-label {
  display: block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .72);
  margin-bottom: 8px;
}
.aprobacija-banner-title {
  display: block;
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.35rem;
  line-height: 1.2;
  color: #fff;
  margin-bottom: 8px;
}
.aprobacija-banner-text {
  display: block;
  font-size: .94rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, .82);
}
.aprobacija-banner-arrow {
  position: absolute;
  top: 50%;
  right: 22px;
  transform: translateY(-50%);
  font-size: 1.4rem;
  color: rgba(255, 255, 255, .72);
  transition: transform .18s ease, color .18s ease;
}
.aprobacija-banner:hover .aprobacija-banner-arrow {
  transform: translate(4px, -50%);
  color: #fff;
}

/* ── APROBACIJAS REZULTĀTI ── */
.aprobacija-results {
  --aprobacija-ink: #172033;
  --aprobacija-muted: #5f6b7a;
  --aprobacija-brand: #b44b32;
  --aprobacija-brand-dark: #8f3726;
  --aprobacija-blue: #243b5a;
  --aprobacija-soft: #f7f4ef;
  --aprobacija-line: #e8e0d8;
  --aprobacija-green: #2f7d59;
  --aprobacija-shadow: 0 18px 45px rgba(23, 32, 51, 0.10);
  color: var(--aprobacija-ink);
  padding: 64px 0;
  background: #fff;
  line-height: 1.65;
}
.aprobacija-results .wrap {
  width: min(1120px, calc(100% - 64px));
  margin: 0 auto;
}
.aprobacija-results .label {
  color: var(--aprobacija-brand);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 800;
  font-size: 0.78rem;
  margin-bottom: 12px;
}
.aprobacija-results h2,
.aprobacija-results h3 { line-height: 1.14; }
.aprobacija-results h2 {
  margin: 0 0 20px;
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: clamp(2rem, 3vw, 3rem);
  letter-spacing: -0.03em;
}
.aprobacija-results h3 {
  margin: 0 0 12px;
  color: var(--aprobacija-blue);
  font-size: 1.34rem;
}
.aprobacija-results p {
  color: #30394a;
  margin: 0 0 18px;
  font-size: 1.04rem;
}
.aprobacija-results .lead-card {
  background: linear-gradient(135deg, #24344f, #1d2b43);
  color: #fff;
  border-radius: 22px;
  padding: 34px;
  margin-bottom: 36px;
  box-shadow: var(--aprobacija-shadow);
}
.aprobacija-results .lead-card p {
  color: rgba(255, 255, 255, 0.86);
  margin-bottom: 0;
}
.aprobacija-results .lead-card h2 {
  color: #fff;
}
.aprobacija-results .meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 22px;
}
.aprobacija-results .pill {
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.13);
  font-size: 0.92rem;
}
.aprobacija-results .grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 24px;
}
.aprobacija-results .card {
  background: #fff;
  border: 1px solid var(--aprobacija-line);
  border-radius: 20px;
  padding: 26px;
  box-shadow: 0 12px 34px rgba(23, 32, 51, 0.07);
}
.aprobacija-results .hours {
  display: inline-block;
  margin-bottom: 14px;
  padding: 7px 10px;
  border-radius: 999px;
  background: #f6e8df;
  color: var(--aprobacija-brand-dark);
  font-weight: 800;
  font-size: 0.88rem;
}
.aprobacija-results .positive { border-top: 5px solid var(--aprobacija-green); }
.aprobacija-results .improvement {
  border-top: 5px solid var(--aprobacija-brand);
  background: linear-gradient(180deg, #fff0ed, #fff 38%);
}
.aprobacija-results .quote {
  background: var(--aprobacija-soft);
  border: 1px solid var(--aprobacija-line);
  border-radius: 20px;
  padding: 28px;
  margin: 28px 0 0;
}
.aprobacija-results .quote strong { color: var(--aprobacija-brand-dark); }
.aprobacija-results .gallery {
  margin-top: 28px;
}
.aprobacija-results .gallery-compact {
  display: grid;
  grid-template-columns: minmax(240px, 340px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.aprobacija-results .gallery-subtitle {
  margin: 0 0 14px;
  color: var(--aprobacija-blue);
  font-size: 1.05rem;
  min-height: 2.6em;
}
.aprobacija-results .gallery-summary {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.aprobacija-results .gallery-summary .figure-portrait {
  width: 100%;
}
.aprobacija-results .gallery-topics {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.aprobacija-results .gallery-topics-visuals {
  display: grid;
  gap: 16px;
}
.aprobacija-results .figure-landscape {
  display: flex;
  flex-direction: column;
}
.aprobacija-results .figure-landscape .figure-media {
  overflow: hidden;
  background: #fff;
}
.aprobacija-results .figure-landscape .figure-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.aprobacija-results .figure-media .gallery-lightbox {
  display: block;
  width: 100%;
  height: 100%;
  color: inherit;
  text-decoration: none;
  cursor: zoom-in;
}
.aprobacija-results .figure-media .gallery-lightbox:hover img {
  opacity: 0.92;
}
.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 3vw, 40px);
  background: rgba(10, 16, 28, 0.92);
  cursor: zoom-out;
}
.image-lightbox img {
  max-width: 100%;
  max-height: calc(100% - 72px);
  object-fit: contain;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  cursor: default;
}
.image-lightbox-download {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  cursor: pointer;
  white-space: nowrap;
}
.image-lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}
.image-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.24);
}
body.is-image-lightbox-open {
  overflow: hidden;
}
.aprobacija-results .gallery-compact figcaption {
  padding: 12px 16px;
  font-size: 0.88rem;
  line-height: 1.5;
}
.aprobacija-results .gallery-link-hint {
  font-size: 0.84rem;
}
.aprobacija-results .gallery-link {
  display: block;
  color: inherit;
  text-decoration: none;
}
.aprobacija-results .gallery-link:hover {
  color: inherit;
}
.aprobacija-results .figure-clickable {
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  cursor: pointer;
}
.aprobacija-results .gallery-link:hover .figure-clickable {
  transform: translateY(-3px);
  box-shadow: 0 20px 48px rgba(23, 32, 51, 0.14);
  border-color: var(--aprobacija-brand);
}
.aprobacija-results .gallery-link-hint {
  display: block;
  margin-top: 10px;
  font-weight: 700;
  color: var(--aprobacija-brand);
}
.aprobacija-results .figure-portrait img {
  width: 100%;
  height: auto;
  object-fit: contain;
}
.aprobacija-results .figure-landscape img {
  width: 100%;
  height: auto;
  object-fit: contain;
}
.aprobacija-results .gallery-compact .figure-landscape .figure-media img {
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.aprobacija-results figure {
  margin: 0;
  overflow: hidden;
  border-radius: 20px;
  background: #fff;
  border: 1px solid var(--aprobacija-line);
  box-shadow: var(--aprobacija-shadow);
}
.aprobacija-results img {
  width: 100%;
  display: block;
  height: auto;
}
.aprobacija-results figcaption {
  padding: 18px 22px;
  color: var(--aprobacija-muted);
  font-size: 0.96rem;
  background: #fff;
}
.aprobacija-results .next {
  background: var(--aprobacija-soft);
  border: 1px solid var(--aprobacija-line);
  border-radius: 20px;
  padding: 30px;
  margin-top: 28px;
}
.aprobacija-results .next ol {
  margin: 0;
  padding-left: 22px;
  color: #3f4858;
}
.aprobacija-results .next li { margin: 10px 0; }
.aprobacija-results .block { margin-top: 66px; }

/* ── PROJECT TIMELINE ── */
.aprobacija-results .project-timeline {
  margin: 66px 0 0;
  padding: 30px;
  color: #f8fafc;
  background: radial-gradient(circle at top left, rgba(191, 87, 54, 0.30), transparent 32%), linear-gradient(135deg, #16243a 0%, #0e1726 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  box-shadow: 0 22px 55px rgba(15, 23, 42, 0.22);
}
.aprobacija-results .project-timeline .label {
  color: #e8a18b;
  margin-bottom: 0;
}
.aprobacija-results .project-timeline .timeline-copy h3 {
  margin: 8px 0 12px;
  color: #fff;
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  line-height: 1.15;
}
.aprobacija-results .project-timeline .timeline-copy p {
  max-width: 980px;
  margin: 0;
  color: rgba(248, 250, 252, 0.84);
  font-size: 1.04rem;
}
.aprobacija-results .timeline-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 24px 0 34px;
}
.aprobacija-results .timeline-stats > div {
  padding: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 18px;
}
.aprobacija-results .stat-label {
  display: block;
  margin-bottom: 6px;
  color: rgba(248, 250, 252, 0.62);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.aprobacija-results .timeline-stats strong {
  color: #fff;
  font-size: 1.05rem;
}
.aprobacija-results .timeline-track-wrap {
  padding: 22px 8px 4px;
}
.aprobacija-results .timeline-track {
  position: relative;
  height: 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  overflow: visible;
}
.aprobacija-results .timeline-track::before,
.aprobacija-results .timeline-track::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 20px;
  height: 20px;
  transform: translateY(-50%);
  border: 4px solid #fff;
  border-radius: 999px;
  background: #bf5736;
  box-shadow: 0 0 0 5px rgba(191, 87, 54, 0.18);
  z-index: 2;
}
.aprobacija-results .timeline-track::before { left: -2px; }
.aprobacija-results .timeline-track::after { right: -2px; }
.aprobacija-results .timeline-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #bf5736 0%, #f3b58f 100%);
  transition: width 0.8s ease;
}
.aprobacija-results .timeline-marker {
  position: absolute;
  top: 50%;
  left: 0%;
  transform: translate(-50%, -50%);
  z-index: 3;
  transition: left 0.8s ease;
}
.aprobacija-results .marker-dot {
  display: block;
  width: 28px;
  height: 28px;
  border: 5px solid #fff;
  border-radius: 999px;
  background: #f3b58f;
  box-shadow: 0 0 0 8px rgba(243, 181, 143, 0.20), 0 12px 28px rgba(0, 0, 0, 0.25);
}
.aprobacija-results .marker-label {
  position: absolute;
  left: 50%;
  bottom: 38px;
  min-width: 132px;
  padding: 8px 12px;
  transform: translateX(-50%);
  color: #172033;
  background: #fff;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 800;
  text-align: center;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
  white-space: nowrap;
}
.aprobacija-results .marker-label::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 12px;
  height: 12px;
  transform: translateX(-50%) rotate(45deg);
  background: #fff;
}
.aprobacija-results .timeline-dates {
  display: flex;
  justify-content: space-between;
  margin-top: 18px;
  color: rgba(248, 250, 252, 0.72);
  font-size: 0.88rem;
  font-weight: 700;
}

/* ── SEMINĀRA KOPSAVILKUMS ── */
.kopsavilkums-page .kopsavilkums-back {
  display: inline-block;
  margin-bottom: 28px;
  font-weight: 600;
  color: var(--aprobacija-blue);
  text-decoration: none;
}
.kopsavilkums-page .kopsavilkums-back:hover {
  color: var(--aprobacija-brand);
}
.kopsavilkums-page .kopsavilkums-intro {
  max-width: 760px;
  margin-bottom: 36px;
}
.kopsavilkums-layout {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}
.kopsavilkums-figure {
  position: sticky;
  top: 96px;
  margin: 0;
  overflow: hidden;
  border-radius: 20px;
  background: #fff;
  border: 1px solid var(--aprobacija-line);
  box-shadow: var(--aprobacija-shadow);
}
.kopsavilkums-figure img {
  width: 100%;
  height: auto;
  display: block;
}
.kopsavilkums-figure figcaption {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 20px;
  color: var(--aprobacija-muted);
  font-size: 0.92rem;
  background: #fff;
}
.kopsavilkums-download {
  margin-top: 2px;
}
.kopsavilkums-text {
  display: grid;
  gap: 24px;
}
.feedback-panel {
  border-radius: 20px;
  padding: 28px;
  border: 1px solid var(--aprobacija-line);
  box-shadow: 0 12px 34px rgba(23, 32, 51, 0.06);
}
.feedback-panel h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  font-size: 1.28rem;
}
.feedback-tag {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 999px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.feedback-positive {
  border-top: 5px solid var(--aprobacija-green);
  background: linear-gradient(180deg, #f3fbf6, #fff 28%);
}
.feedback-positive .feedback-tag {
  background: #dff5e8;
  color: #1f6640;
}
.feedback-negative {
  border-top: 5px solid var(--aprobacija-brand);
  background: linear-gradient(180deg, #fff0ed, #fff 28%);
}
.feedback-negative .feedback-tag {
  background: #f6e8df;
  color: var(--aprobacija-brand-dark);
}
.feedback-group + .feedback-group {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px dashed var(--aprobacija-line);
}
.feedback-group h4 {
  margin: 0 0 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--aprobacija-blue);
}
.feedback-group ul {
  margin: 0;
  padding-left: 1.2rem;
  color: #3f4858;
}
.feedback-group li {
  margin: 8px 0;
  line-height: 1.55;
}
.kopsavilkums-conclusion h3 {
  margin: 0 0 12px;
  font-size: 1.2rem;
  color: var(--aprobacija-blue);
}
.kopsavilkums-conclusion p {
  margin: 0;
}

/* ── TOPICS LIST ── */
.topics-list { display: grid; gap: 18px; }
.topic-row {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 28px;
  align-items: center;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px 24px;
  transition: all .2s;
}
.topic-row:hover {
  box-shadow: var(--shadow);
  transform: translateX(2px);
  border-color: var(--border-strong);
}
.topic-num-block {
  font-family: 'DM Serif Display', serif;
  font-size: 2rem;
  color: var(--primary);
  line-height: 1;
  border-left: 3px solid var(--primary);
  padding-left: 16px;
}
.topic-num-block small {
  display: block;
  font-family: 'DM Sans', sans-serif;
  font-size: .65rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-top: 4px;
}
.topic-info h3 { font-size: 1.1rem; margin-bottom: 6px; font-weight: 400; }
.topic-info p { font-size: .87rem; color: var(--muted); line-height: 1.55; }
.topic-meta {
  text-align: right;
  font-size: .85rem;
  color: var(--ink-soft);
  white-space: nowrap;
}
.topic-meta strong {
  display: block;
  font-family: 'DM Serif Display', serif;
  font-size: 1.5rem;
  color: var(--ink);
  margin-bottom: 2px;
}
.topic-meta small { color: var(--muted); font-size: .78rem; }

/* ── CTA STRIP ── */
.cta-strip {
  background: var(--ink);
  color: #fff;
  padding: 64px 0;
}
.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.cta-strip h2 { color: #fff; font-size: 1.8rem; margin-bottom: 8px; }
.cta-strip p { color: #d1d5db; font-size: 1.02rem; max-width: 540px; }

/* ── SEMINAR PAGE ── */
.seminar-hero {
  background: linear-gradient(135deg, #1f2937 0%, #2c5282 100%);
  color: #fff;
  padding: 72px 0 64px;
  position: relative;
  overflow: hidden;
}
.seminar-hero::before {
  content: '';
  position: absolute;
  top: -50%; right: -10%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(185,74,44,.2), transparent 70%);
}
.seminar-hero-inner { position: relative; z-index: 1; }
.seminar-hero h1 { color: #fff; font-size: clamp(1.9rem, 3.6vw, 2.8rem); margin: 12px 0 8px; }
.seminar-hero .subtitle {
  color: #cbd5e1;
  font-size: 1.1rem;
  font-weight: 400;
  margin-bottom: 28px;
}
.meta-row {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 18px;
  max-width: 100%;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 18px;
  padding: 14px 18px;
  box-shadow: 0 16px 40px rgba(15,23,42,.16);
}
.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
  font-size: .92rem;
  color: #fff;
  white-space: nowrap;
}
.meta-pill svg {
  color: #f3c7b7;
  flex: 0 0 auto;
}
.meta-pill + .meta-pill::before {
  content: '';
  width: 4px;
  height: 4px;
  margin-right: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.45);
}

.seminar-layout {
  display: grid;
  grid-template-columns: 8fr 4fr;
  gap: 56px;
  align-items: start;
  padding: 64px 0;
}
.seminar-content { min-width: 0; }
.seminar-content h2 {
  font-size: 1.7rem;
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.seminar-content h3 {
  font-size: 1.2rem;
  margin: 32px 0 12px;
}
.seminar-content p { color: var(--ink-soft); margin-bottom: 14px; line-height: 1.75; }
.seminar-content ul { margin: 0 0 16px; list-style: none; padding: 0; }
.seminar-content ul li {
  padding: 8px 0 8px 26px;
  position: relative;
  color: var(--ink-soft);
  font-size: .95rem;
}
.seminar-content ul li::before {
  content: '';
  position: absolute;
  left: 0; top: 18px;
  width: 14px; height: 2px;
  background: var(--primary);
}

/* Schedule table */
.schedule-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 16px 0 8px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.schedule-table th {
  text-align: left;
  background: var(--cream);
  padding: 12px 18px;
  font-size: .8rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: .04em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}
.schedule-table td {
  padding: 14px 18px;
  font-size: .92rem;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.schedule-table tr:last-child td { border-bottom: none; }
.schedule-table tr:hover td { background: #fcfaf5; }
.schedule-table td.time-cell {
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
  width: 140px;
}

.info-box {
  background: var(--accent-lt);
  border: 1px solid #c4d8e8;
  border-left: 4px solid var(--accent);
  border-radius: var(--r);
  padding: 16px 20px;
  margin: 24px 0;
  font-size: .92rem;
  color: var(--ink-soft);
}
.info-box strong { color: var(--accent); }

.note-box {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-left: 4px solid var(--warning);
  border-radius: var(--r);
  padding: 16px 20px;
  margin: 20px 0;
  font-size: .92rem;
  color: var(--ink-soft);
}
.note-box strong { color: var(--warning); }

/* ── FORM CARD (semināra reģistrācija) ── */
.form-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 96px;
}
.form-card h3 {
  font-size: 1.3rem;
  margin-bottom: 6px;
}
.form-card .sub {
  font-size: .87rem;
  color: var(--muted);
  margin-bottom: 24px;
  line-height: 1.5;
}
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 7px;
}
.form-group label .req { color: var(--primary); }
.form-control {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--r);
  font-family: 'DM Sans', sans-serif;
  font-size: .94rem;
  color: var(--ink);
  background: #fcfaf5;
  transition: all .15s;
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px var(--primary-lt);
}
textarea.form-control { resize: vertical; min-height: 100px; line-height: 1.55; }

.radio-group { display: flex; flex-direction: column; gap: 10px; }
.radio-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  position: relative;
  padding: 14px 16px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--r);
  cursor: pointer;
  transition: all .15s;
  background: #fcfaf5;
}
.radio-option:hover { border-color: var(--ink-soft); }
.radio-option:has(input:checked) {
  border-color: #16a34a;
  background: #ecfdf3;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, .12);
}
.radio-option:has(input:checked)::after {
  content: "✓";
  position: absolute;
  top: 12px;
  right: 14px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #16a34a;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: .9rem;
  font-weight: 700;
}
.radio-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.radio-option:has(input:checked) strong { color: #166534; }
.radio-option strong {
  display: block;
  font-size: .9rem;
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 3px;
}
.radio-option span { font-size: .8rem; color: var(--muted); line-height: 1.45; }
.form-hint { font-size: .8rem; color: var(--muted); margin-top: 6px; }

/* ── MATERIALS GRID ── */
.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 36px;
  padding: 8px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}
.filter-chip {
  padding: 8px 16px;
  font-size: .85rem;
  font-weight: 500;
  border-radius: var(--r);
  color: var(--ink-soft);
  transition: all .15s;
  text-decoration: none;
}
.filter-chip:hover { background: var(--cream); color: var(--ink); }
.filter-chip.active {
  background: var(--ink);
  color: #fff !important;
}

.materials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 22px;
}
.material-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 26px;
  display: flex;
  flex-direction: column;
  transition: all .2s;
  position: relative;
  overflow: hidden;
}
.material-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px;
  height: 100%;
  background: var(--topic-color, var(--primary));
}
.material-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  border-color: var(--border-strong);
}
.material-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 3px;
  margin-bottom: 12px;
  background: var(--topic-lt, var(--cream));
  color: var(--topic-color, var(--muted));
  align-self: flex-start;
}
.material-card h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
  line-height: 1.25;
  font-weight: 400;
}
.material-card .goal {
  font-size: .87rem;
  color: var(--ink-soft);
  font-style: italic;
  margin-bottom: 12px;
  padding-left: 12px;
  border-left: 2px solid var(--border-strong);
}
.material-card p.desc {
  font-size: .88rem;
  color: var(--muted);
  flex: 1;
  margin-bottom: 18px;
  line-height: 1.55;
}
.material-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.material-stats {
  font-size: .8rem;
  color: var(--muted);
  display: flex;
  gap: 14px;
}
.material-stats span { display: inline-flex; align-items: center; gap: 4px; }

/* ── AUTH FORMS ── */
.auth-wrap {
  min-height: calc(100vh - 250px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 24px;
  background: var(--cream);
}
.auth-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 44px 40px;
  width: 100%;
  max-width: 460px;
  box-shadow: var(--shadow-lg);
}
.auth-card-register {
  max-width: 620px;
}
.auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}
.auth-card h2 { margin-bottom: 6px; font-size: 1.6rem; }
.auth-card .sub { color: var(--muted); font-size: .92rem; margin-bottom: 28px; line-height: 1.5; }
.auth-footer { text-align: center; margin-top: 24px; font-size: .88rem; color: var(--muted); }

/* ── ALERTS ── */
.alert {
  padding: 14px 18px;
  border-radius: var(--r);
  font-size: .9rem;
  margin-bottom: 20px;
  border-left: 4px solid;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.alert-success { background: #ecfdf3; border-color: var(--success); color: #1f5b2c; }
.alert-error   { background: #fef2f2; border-color: var(--primary); color: var(--primary-dk); }
.alert-info    { background: var(--accent-lt); border-color: var(--accent); color: #1e3a5f; }

/* ── COMMENTS ── */
.comments-section { margin-top: 48px; padding-top: 40px; border-top: 1px solid var(--border); }
.comment {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.comment:last-child { border-bottom: none; }
.comment-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.comment-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .92rem;
  font-weight: 700;
  font-family: 'DM Serif Display', serif;
  flex-shrink: 0;
}
.comment-meta strong { font-size: .93rem; }
.comment-meta small { color: var(--muted); font-size: .8rem; margin-left: 8px; }
.comment p { font-size: .93rem; color: var(--ink-soft); line-height: 1.65; }

/* ── BREADCRUMB ── */
.breadcrumb {
  background: var(--cream);
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.breadcrumb .container {
  font-size: .87rem;
  color: var(--muted);
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--primary); }

/* ── MATERIAL DETAIL PAGE ── */
.material-detail-header {
  background: var(--white);
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
}
.material-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin: 16px 0;
  font-size: .87rem;
  color: var(--muted);
}
.material-meta span { display: inline-flex; align-items: center; gap: 6px; }
.material-detail-body {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: 48px 0;
}
.material-detail-body--lessons {
  padding-top: 20px;
}
.material-description {
  font-size: 1.02rem;
  line-height: 1.75;
  color: var(--ink-soft);
  margin-bottom: 28px;
}
.material-description p { margin: 0; }
.material-pdf-download {
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
  margin: 0 0 32px;
}
.material-pdf-download-icon {
  width: 48px;
  height: 48px;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r);
  font-weight: 700;
  flex-shrink: 0;
}
.material-pdf-download-text {
  flex: 1;
  min-width: 0;
}
.material-pdf-download-text strong {
  display: block;
  font-size: 1rem;
}
.material-pdf-download-text p {
  font-size: .87rem;
  color: var(--muted);
  margin: 4px 0 0;
}
.material-page-container {
  width: 100vw !important;
  max-width: 100vw !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  padding-left: clamp(24px, 3vw, 56px);
  padding-right: clamp(24px, 3vw, 56px);
}
.material-detail-header .container,
.material-detail-body .container,
.material-detail-body .section-header {
  width: 100%;
  max-width: none;
}
.material-goal-box {
  background: var(--primary-lt);
  border: 1px solid #f3c5b3;
  border-left: 4px solid var(--primary);
  border-radius: var(--r);
  padding: 18px 22px;
  margin-bottom: 32px;
}
.material-goal-box small {
  display: block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 6px;
}
.material-goal-box p {
  font-size: .98rem;
  color: var(--ink);
  line-height: 1.6;
  margin: 0;
}

/* ── LESSONS ── */
.lessons-section {
  margin: 48px 0 8px;
  padding-top: 36px;
  border-top: 1px solid var(--border);
}
.material-detail-body--lessons .lessons-section {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.lessons-section-header {
  margin-bottom: 28px;
}
.lessons-section-header--compact {
  margin-bottom: 20px;
}
.lessons-section-header--compact .section-title {
  font-size: 1.45rem;
  margin: 0;
}
.lessons-section-header .section-title {
  font-size: 1.8rem;
}
.lesson-workspace {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  width: 100%;
  min-width: 0;
}
.lesson-workspace.is-sidebar-hidden {
  grid-template-columns: minmax(0, 1fr);
}
.lesson-workspace.is-sidebar-hidden .lesson-content-area {
  grid-column: 1;
}
.lesson-workspace.is-sidebar-hidden .lesson-sidebar {
  position: fixed;
  left: 20px;
  bottom: 20px;
  top: auto;
  z-index: 30;
  width: auto;
  max-width: calc(100vw - 40px);
}
.lesson-workspace.is-sidebar-hidden .lesson-nav {
  display: none;
}
.lesson-sidebar,
.lesson-panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.lesson-sidebar {
  position: sticky;
  top: 96px;
  overflow: hidden;
}
.lesson-sidebar-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--border);
}
.lesson-sidebar-header strong {
  display: block;
  font-size: .95rem;
}
.lesson-sidebar-header span {
  display: block;
  color: var(--muted);
  font-size: .82rem;
  margin-top: 2px;
}
.lesson-sidebar-toggle {
  border: 1px solid var(--border-strong);
  background: var(--white);
  color: var(--ink);
  border-radius: 999px;
  padding: 6px 12px;
  font: inherit;
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.lesson-sidebar-toggle:hover {
  border-color: var(--topic-color, var(--primary));
  color: var(--topic-color, var(--primary));
  background: var(--topic-lt, var(--primary-lt));
}
.lesson-nav {
  display: grid;
  max-height: calc(100vh - 190px);
  overflow: auto;
}
.lesson-nav-group {
  border-bottom: 1px solid var(--border);
}
.lesson-nav-group:last-child {
  border-bottom: 0;
}
.lesson-nav-item {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  width: 100%;
  padding: 16px 18px;
  border: 0;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.lesson-nav-item:hover,
.lesson-nav-item.is-active {
  background: var(--topic-lt, var(--primary-lt));
}
.lesson-nav-item.is-active {
  box-shadow: inset 4px 0 0 var(--topic-color, var(--primary));
}
.lesson-nav-number {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--cream);
  border: 1px solid var(--border);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .82rem;
  font-weight: 800;
}
.lesson-nav-item.is-active .lesson-nav-number {
  background: var(--topic-color, var(--primary));
  border-color: var(--topic-color, var(--primary));
  color: #fff;
}
.lesson-nav-main {
  display: grid;
  gap: 4px;
}
.lesson-nav-main strong {
  font-size: .93rem;
  line-height: 1.35;
}
.lesson-nav-main small {
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.4;
}
.lesson-nav-resources {
  display: none;
  gap: 8px;
  padding: 0 14px 14px 64px;
  background: var(--topic-lt, var(--primary-lt));
}
.lesson-nav-group.is-active .lesson-nav-resources {
  display: grid;
}
.lesson-nav-resource {
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 10px;
  background: rgba(255,255,255,.74);
  border: 1px solid var(--border);
  border-radius: var(--r);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.lesson-nav-resource:hover,
.lesson-nav-resource.is-active {
  background: var(--white);
  border-color: var(--border-strong);
  color: var(--primary-dk);
}
.lesson-nav-resource--status-empty,
.lesson-nav-resource--status-empty:hover,
.lesson-nav-resource--status-empty.is-active {
  background: #fff1f1;
  border-color: #efb7b7;
}
.lesson-nav-resource--status-complete,
.lesson-nav-resource--status-complete:hover,
.lesson-nav-resource--status-complete.is-active {
  background: #eef9f1;
  border-color: #aad9b8;
}
.lesson-nav-resource strong {
  display: block;
  font-size: .86rem;
  line-height: 1.25;
}
.lesson-nav-resource small {
  display: block;
  color: var(--muted);
  font-size: .72rem;
  line-height: 1.35;
  margin-top: 2px;
}
.lesson-resource-status-markers {
  display: inline-flex;
  gap: 4px;
  vertical-align: middle;
}
.lesson-resource-status-markers span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--white);
  color: var(--primary-dk);
  border: 1px solid var(--border-strong);
  font-size: .66rem;
  font-weight: 800;
  line-height: 1;
}
.lesson-content-area {
  min-width: 0;
  scroll-margin-top: 96px;
}
.lesson-resource-panel {
  scroll-margin-top: 96px;
}
.lesson-panel {
  padding: 20px;
}
.lesson-panel .lesson-resource-preview {
  padding: 0;
  background: transparent;
  border: 0;
  min-height: 0;
}
.lesson-panel-heading {
  padding-bottom: 22px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--border);
}
.lesson-kicker {
  display: block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--topic-color, var(--primary));
  margin-bottom: 5px;
}
.lesson-panel-heading h3 {
  font-family: 'DM Sans', Arial, sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 8px;
}
.lesson-panel-heading p {
  max-width: 760px;
  color: var(--muted);
  font-size: .94rem;
}
.lesson-panel-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  min-width: 0;
}
.lesson-resource-list {
  display: grid;
  gap: 9px;
}
.lesson-resource-list h4 {
  font-family: 'DM Sans', sans-serif;
  font-size: .86rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.lesson-resource {
  display: flex;
  gap: 14px;
  align-items: center;
  width: 100%;
  padding: 14px;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--r);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.lesson-resource:hover,
.lesson-resource-open.is-active {
  background: var(--topic-lt, var(--primary-lt));
  border-color: var(--border-strong);
  color: var(--primary-dk);
}
.lesson-resource-file:hover {
  color: var(--primary-dk);
}
.lesson-resource-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-width: 32px;
  padding: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--topic-color, var(--primary));
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-align: center;
}
.lesson-resource-icon--pdf svg,
.lesson-resource-icon--file svg,
.lesson-resource-icon--simulation svg {
  width: 15px;
  height: 15px;
  fill: var(--white);
  stroke: currentColor;
  stroke-width: 2;
}
.lesson-resource-icon--pdf {
  color: #c62828;
}
.lesson-resource-icon--file svg,
.lesson-resource-icon--simulation svg {
  stroke-linecap: round;
  stroke-linejoin: round;
}
.lesson-resource-icon--simulation svg {
  fill: none;
}
.lesson-resource-icon--simulation circle {
  fill: currentColor;
  stroke: none;
}
.lesson-resource-icon--pdf text {
  fill: currentColor;
  stroke: none;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0;
}
.lesson-resource-main {
  display: grid;
  gap: 3px;
}
.lesson-resource-main strong {
  font-size: .96rem;
}
.lesson-resource-main small {
  color: var(--muted);
}
.lesson-resource-preview {
  min-width: 0;
  min-height: 360px;
  padding: 20px;
  background: #fcfaf5;
  border: 1px solid var(--border);
  border-radius: var(--r);
}
.lesson-file-download {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  min-height: 260px;
}
.lesson-resource-empty,
.lesson-empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  color: var(--muted);
  font-size: .94rem;
  text-align: center;
  background: var(--cream);
  border: 1px dashed var(--border-strong);
  border-radius: var(--r);
  padding: 24px;
}
.lesson-resource-panel-header {
  display: flex;
  gap: 12px;
  align-items: center;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.lesson-html-content {
  color: var(--ink-soft);
  line-height: 1.75;
  overflow-x: auto;
  min-width: 0;
}
.lesson-html-content table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}
.lesson-html-content th,
.lesson-html-content td {
  border: 1px solid var(--border);
  padding: 10px;
  vertical-align: top;
  word-break: normal;
}
.lesson-html-content p,
.lesson-html-content ul,
.lesson-html-content ol { margin-bottom: 12px; }
.lesson-html-content h1,
.lesson-html-content h2,
.lesson-html-content h3,
.lesson-html-content h4 {
  font-family: 'DM Sans', Arial, sans-serif;
  font-weight: 700;
  line-height: 1.45;
  margin: 18px 0 8px;
}
.lesson-resource-export-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 14px;
  margin-bottom: 16px;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--r);
}
.lesson-resource-export-actions span {
  color: var(--ink);
  font-size: .9rem;
  font-weight: 700;
}
.lesson-resource-export-actions div {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.lesson-resource-edit-btn {
  white-space: nowrap;
}
.lesson-html-frame {
  display: block;
  width: 100%;
  min-height: 320px;
  border: 0;
  background: var(--white);
  overflow: hidden;
}

/* ── ADMIN ── */
.admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
.admin-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.admin-stack {
  display: grid;
  gap: 22px;
}
.admin-stack-sm {
  gap: 10px;
}
.admin-nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 28px;
  padding: 10px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.admin-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 100px;
  color: var(--ink-soft);
  font-size: .9rem;
  font-weight: 700;
  text-decoration: none;
}
.admin-nav a:hover,
.admin-nav a.active {
  background: var(--primary);
  color: var(--white);
}
.admin-page-header {
  margin-bottom: 26px;
}
.admin-page-header h1 {
  font-size: 2rem;
  margin: 6px 0 8px;
}
.admin-stats-grid,
.admin-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}
.admin-dashboard-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.admin-stat-card {
  display: block;
  padding: 22px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  text-decoration: none;
}
.admin-stat-card span {
  display: block;
  color: var(--muted);
  font-size: .86rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.admin-stat-card strong {
  display: block;
  font-size: 2rem;
  line-height: 1;
}
.admin-card-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 20px;
}
.admin-card-heading h2 {
  margin-bottom: 6px;
}
.admin-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 100px;
  padding: 4px 10px;
  background: var(--cream);
  color: var(--ink-soft);
  font-size: .78rem;
  font-weight: 700;
  white-space: nowrap;
}
.admin-table-wrap {
  overflow-x: auto;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}
.admin-table th,
.admin-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}
.admin-table-top th,
.admin-table-top td {
  vertical-align: top;
}
.admin-table th {
  background: var(--cream);
  color: var(--ink);
  font-size: .78rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.admin-table tr:last-child td {
  border-bottom: 0;
}
.admin-inline-form,
.admin-filter-form,
.admin-schedule-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.admin-filter-form {
  max-width: 520px;
  margin-bottom: 24px;
}
.admin-filter-form .form-group {
  width: 100%;
}
.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.admin-edit-section {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}
.admin-section-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.05rem;
  margin-bottom: 14px;
}
.admin-schedule-row {
  display: grid;
  grid-template-columns: minmax(120px, 170px) minmax(0, 1fr) 90px auto;
}
.admin-schedule-row-new {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed var(--border);
}
.admin-delete-inline {
  margin: -6px 0 8px;
}
.form-control-sm {
  min-height: 36px;
  padding: 7px 10px;
  font-size: .85rem;
}
.admin-card h2 {
  font-size: 1.35rem;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.admin-card-heading h2 {
  margin-bottom: 6px;
  padding-bottom: 0;
  border-bottom: 0;
}
.code-input {
  font-family: Consolas, 'Courier New', monospace;
  font-size: .88rem;
}
.admin-form-row {
  display: grid;
  grid-template-columns: minmax(140px, 220px) 1fr;
  gap: 20px;
  align-items: center;
}
.checkbox-option {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  color: var(--ink-soft);
  font-size: .92rem;
  font-weight: 600;
}
.checkbox-option input { width: 18px; height: 18px; }
.resource-status-options {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.resource-status-option {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 13px 8px 10px;
  margin: 0;
  border: 1.5px solid var(--border-strong);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink-soft);
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.resource-status-option:hover {
  border-color: var(--primary);
  color: var(--ink);
  background: var(--cream);
}
.resource-status-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.resource-status-option span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--cream);
  color: var(--primary-dk);
  font-size: .72rem;
  font-weight: 800;
  line-height: 1;
}
.resource-status-option strong {
  font-size: .88rem;
  font-weight: 700;
  line-height: 1;
}
.resource-status-option:has(input:checked) {
  background: #eef9f1;
  border-color: #85c99b;
  color: #235b36;
  box-shadow: 0 0 0 3px rgba(133, 201, 155, .18);
}
.resource-status-option:has(input:checked) span {
  background: #235b36;
  color: var(--white);
}
.muted-text { color: var(--muted); font-size: .94rem; }
.admin-lessons-list { display: grid; gap: 14px; }
.admin-lesson-item {
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px;
  background: #fcfaf5;
}
.admin-lesson-item--draft {
  background: #f8f8f6;
  border-style: dashed;
}
.admin-lesson-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.admin-lesson-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.admin-publish-form { margin: 0; }
.admin-publish-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--muted);
  border-radius: 999px;
  padding: 5px 9px 5px 5px;
  font-size: .75rem;
  font-weight: 700;
  cursor: pointer;
  transition: .18s ease;
}
.admin-publish-toggle-control {
  position: relative;
  width: 30px;
  height: 16px;
  border-radius: 999px;
  background: #d7d2c8;
  transition: .18s ease;
}
.admin-publish-toggle-control::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 1px 3px rgba(0,0,0,.18);
  transition: .18s ease;
}
.admin-publish-toggle.is-active {
  border-color: #86c795;
  background: #eef9f1;
  color: #235b36;
}
.admin-publish-toggle.is-active .admin-publish-toggle-control {
  background: #2f9d55;
}
.admin-publish-toggle.is-active .admin-publish-toggle-control::after {
  transform: translateX(14px);
}
.admin-publish-status {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #f0eee8;
  color: var(--muted);
  font-size: .68rem;
  letter-spacing: .03em;
}
.admin-publish-status.is-published {
  background: #e7f6eb;
  color: #235b36;
}
.admin-lesson-edit-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.admin-lesson-item small {
  display: block;
  color: var(--primary);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.admin-lesson-item h3 {
  font-family: 'DM Sans', sans-serif;
  font-size: .98rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.admin-lesson-item p {
  color: var(--muted);
  font-size: .86rem;
  line-height: 1.45;
  margin-bottom: 10px;
}
.admin-lesson-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: .78rem;
  color: var(--muted);
}
.admin-lesson-meta span {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 3px 9px;
}
.admin-resource-list {
  display: grid;
  gap: 8px;
  padding-top: 12px;
  margin-top: 12px;
  border-top: 1px solid var(--border);
}
.admin-resource-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r);
}
.admin-resource-item strong {
  display: block;
  font-size: .88rem;
  margin-bottom: 2px;
}
.admin-resource-item span,
.admin-empty-resources {
  color: var(--muted);
  font-size: .78rem;
}
.admin-form-actions,
.admin-resource-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.admin-empty-resources {
  padding-top: 10px;
  margin-top: 10px;
  border-top: 1px solid var(--border);
}
.admin-order-btn,
.admin-edit-btn,
.admin-delete-btn {
  border: 1px solid #efb6a6;
  border-radius: 100px;
  padding: 5px 10px;
  background: #fff7f4;
  color: #9b2f1e;
  font: inherit;
  font-size: .75rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.admin-order-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  border-color: var(--border-strong);
  background: var(--white);
  color: var(--ink-soft);
  line-height: 1;
}
.admin-order-btn:hover:not(:disabled) {
  background: var(--cream);
  color: var(--ink);
}
.admin-order-btn:disabled {
  cursor: not-allowed;
  opacity: .35;
}
.admin-edit-btn {
  border-color: #b8d4c3;
  background: #f4fbf6;
  color: #235b36;
  text-decoration: none;
}
.admin-edit-btn:hover {
  background: #dff2e6;
  color: #235b36;
}
.admin-delete-btn:hover {
  background: #f8d8ce;
}
.wysiwyg-form {
  max-width: 980px;
  margin: 0 auto;
}
.wysiwyg-toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px;
  background: var(--cream);
  border: 1px solid var(--border);
  border-bottom: 0;
  border-radius: var(--r) var(--r) 0 0;
}
.wysiwyg-toolbar button {
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 7px 10px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
}
.wysiwyg-toolbar button:hover {
  background: #f7f0df;
}
.wysiwyg-editor {
  min-height: 420px;
  padding: 18px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 0 0 var(--r) var(--r);
  outline: none;
}
.wysiwyg-editor:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(184, 107, 58, .12);
}
.wysiwyg-editor table {
  border-collapse: collapse;
}
.wysiwyg-editor th,
.wysiwyg-editor td {
  border-width: .5px !important;
  border-color: #cfc7b8 !important;
  padding: 4px 6px !important;
}

/* ── FOOTER ── */
.site-footer {
  background: var(--ink);
  color: #cbd5e1;
  padding: 56px 0 24px;
  margin-top: 80px;
}
.footer-grid {
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  margin-bottom: 24px;
}
.footer-grid p { color: #9ca3af; font-size: .9rem; line-height: 1.6; margin: 0; max-width: 52rem; }
.footer-col h4 {
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.footer-col a {
  display: block;
  color: #cbd5e1;
  font-size: .9rem;
  padding: 5px 0;
}
.footer-col a:hover { color: #fff; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: .8rem;
  color: #6b7280;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .about-grid,
  .seminar-layout,
  .lesson-workspace,
  .lesson-panel-grid,
  .admin-layout,
  .admin-stats-grid,
  .admin-dashboard-grid,
  .admin-form-grid,
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .admin-card-heading,
  .admin-inline-form,
  .admin-schedule-row {
    align-items: stretch;
  }
  .admin-card-heading,
  .admin-inline-form {
    flex-direction: column;
  }
  .admin-schedule-row {
    grid-template-columns: 1fr;
  }
  .form-card,
  .lesson-sidebar { position: static; }
  .lesson-nav { max-height: none; }
  .lesson-content-area,
  .lesson-resource-panel {
    scroll-margin-top: 84px;
  }
  .lesson-panel {
    border-color: var(--border-strong);
    box-shadow: var(--shadow);
  }
  .lesson-resource-export-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .lesson-resource-export-actions div,
  .lesson-resource-export-actions .btn {
    width: 100%;
  }
  .lesson-resource-export-actions .btn {
    justify-content: center;
  }
  .cta-inner { flex-direction: column; align-items: flex-start; }
  .aprobacija-results .grid-2 { grid-template-columns: 1fr; }
  .aprobacija-results .gallery-compact {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .aprobacija-results .gallery-summary .figure-portrait {
    max-width: 420px;
    margin: 0 auto;
  }
  .kopsavilkums-layout {
    grid-template-columns: 1fr;
  }
  .kopsavilkums-figure {
    position: static;
    max-width: 520px;
    margin: 0 auto;
  }
  .aprobacija-results .project-timeline {
    padding: 22px;
    border-radius: 20px;
  }
  .aprobacija-results .timeline-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .aprobacija-results .timeline-track-wrap {
    padding-top: 50px;
  }
  .aprobacija-results .marker-label {
    bottom: 36px;
    font-size: 0.78rem;
  }
}
@media (max-width: 480px) {
  .aprobacija-results .timeline-stats {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 820px) {
  body.is-mobile-nav-open {
    overflow: hidden;
  }
  .site-header {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    z-index: 200;
  }
  .header-inner {
    position: relative;
    height: 64px;
    padding: 0 18px;
    gap: 12px;
  }
  .logo {
    min-width: 0;
  }
  .logo-mark {
    width: 38px;
    height: 38px;
  }
  .logo-text {
    min-width: 0;
    font-size: .9rem;
  }
  .logo-text small {
    display: none;
  }
  .mobile-nav-toggle {
    display: inline-flex;
    flex-shrink: 0;
  }
  .main-nav {
    position: absolute;
    top: calc(100% + 10px);
    left: 18px;
    right: 18px;
    display: grid;
    gap: 8px;
    max-height: calc(100vh - 86px);
    overflow-y: auto;
    padding: 14px;
    background: rgba(255,255,255,.98);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
  }
  .main-nav.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }
  .main-nav a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--ink) !important;
  }
  .main-nav a:hover,
  .main-nav a.active {
    background: var(--primary-lt);
    color: var(--primary-dk) !important;
  }
  .main-nav .btn-nav {
    justify-content: center;
    background: var(--primary);
    color: #fff !important;
    margin-top: 4px;
  }
  .main-nav .btn-nav:hover {
    background: var(--primary-dk) !important;
    color: #fff !important;
  }
}
@media (max-width: 640px) {
  .topic-row {
    grid-template-columns: 60px 1fr;
    gap: 16px;
  }
  .topic-meta { grid-column: 1 / -1; text-align: left; padding-top: 8px; border-top: 1px solid var(--border); display: flex; gap: 16px; align-items: baseline; }
  .topic-meta strong { font-size: 1.1rem; display: inline; }
  .hero { padding: 56px 0 64px; }
  .hero-actions,
  .material-footer {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-actions .btn,
  .material-footer .btn {
    justify-content: center;
    width: 100%;
  }
  .section { padding: 56px 0; }
  .container,
  .container-narrow { padding: 0 16px; }
  .materials-grid { grid-template-columns: 1fr; }
  .material-card,
  .auth-card,
  .form-card,
  .admin-card,
  .about-stats {
    padding: 22px;
  }
  .filter-bar {
    display: grid;
    grid-template-columns: 1fr;
  }
  .filter-chip {
    min-height: 42px;
    display: flex;
    align-items: center;
  }
  .schedule-table {
    display: block;
    overflow-x: auto;
  }
  .lesson-panel { padding: 20px; }
  .lesson-resource-preview {
    min-height: 0;
  }
  .lesson-html-frame {
    min-height: 420px;
  }
  .lesson-file-download .btn {
    width: 100%;
    justify-content: center;
  }
  .lesson-nav-item { padding: 14px; }
  .lesson-resource { align-items: flex-start; }
  .aprobacija-banner {
    padding: 20px 48px 20px 20px;
  }
  .aprobacija-results .wrap {
    width: min(1120px, calc(100% - 32px));
  }
}
