/* Platforma PZ — Materiały Dodatkowe. Brand: #c5a44e złoto, #3369B1 niebieski,
   #2C2C2C grafit, #F5F3EF krem; granat login/header wg zrzutów Publigo. */

:root {
  --gold: #c5a44e;
  --gold-dark: #af8f3e;
  --blue: #3369B1;
  --graphite: #2C2C2C;
  --cream: #F5F3EF;
  --navy: #2b2d3a;       /* tło ekranu logowania */
  --header: #3f4451;     /* pasek nagłówka */
  --text: #4a5568;
  --heading: #333a56;
  --bg: #f4f5f7;
  --card-shadow: 0 2px 10px rgba(0, 0, 0, .08);
  --radius: 6px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}

h1, h2, h3, h4, .btn, .card-title, .site-nav {
  font-family: 'Poppins', 'Segoe UI', system-ui, sans-serif;
}

h1, h2, h3, h4 { color: var(--heading); line-height: 1.25; }
h1 { font-size: 2.2rem; font-weight: 700; }
h2 { font-size: 1.6rem; font-weight: 600; }
h3 { font-size: 1.25rem; font-weight: 600; }

a { color: var(--blue); }
img { max-width: 100%; height: auto; }

/* ─── Header ─────────────────────────────────────────────── */

.site-header {
  background: var(--header);
  color: #fff;
  padding: 0 24px;
}
.site-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
}
.site-logo img { height: 34px; display: block; }
.site-nav { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.site-nav a {
  color: #e7e9ee;
  text-decoration: none;
  font-size: .92rem;
  font-weight: 500;
}
.site-nav a:hover { color: #fff; }
.site-nav .nav-logout { color: #b9bdc9; font-size: .85rem; }

/* ─── Hero ───────────────────────────────────────────────── */

.hero {
  position: relative;
  background: linear-gradient(105deg, #274067 0%, #3d5f95 55%, #7d8db0 100%);
  color: #fff;
  overflow: hidden;
}
.hero-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
}
.hero-inner {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  padding: 88px 24px;
}
.hero h1 {
  color: #fff;
  margin: 0;
  font-size: 2.6rem;
  text-shadow: 0 2px 12px rgba(20, 30, 50, .45);
}

/* ─── Layout / breadcrumb ────────────────────────────────── */

.container { max-width: 1100px; margin: 0 auto; padding: 28px 24px 64px; }

.breadcrumb { font-size: .85rem; margin: 4px 0 22px; color: #98a0ad; }
.breadcrumb a { color: var(--gold); text-decoration: none; }
.breadcrumb .sep { margin: 0 6px; }

/* ─── Karty biblioteki ───────────────────────────────────── */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 26px;
  margin-top: 10px;
}
.card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.13); }
.card-img { width: 100%; aspect-ratio: 16 / 8.9; object-fit: cover; display: block; }
.card-body { padding: 18px 20px 26px; }
.card-title {
  color: var(--heading);
  font-size: 1.06rem;
  font-weight: 600;
  margin: 0;
}

/* ─── Lekcja ─────────────────────────────────────────────── */

.lesson-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}
.lesson-nav-btns { display: flex; gap: 10px; flex-shrink: 0; margin-top: 10px; }

.lesson-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 34px;
  margin-top: 18px;
}
@media (max-width: 860px) {
  .lesson-layout { grid-template-columns: 1fr; }
  .hero-inner { padding: 56px 24px; }
  .hero h1 { font-size: 2rem; }
}

/* Sidebar nawigacji */
.lesson-sidebar {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  padding: 8px 0;
  align-self: start;
  font-size: .93rem;
}
.lesson-sidebar .group-label {
  display: block;
  font-weight: 600;
  color: var(--heading);
  padding: 12px 18px 8px;
  border-top: 1px solid #eef0f3;
}
.lesson-sidebar .group-label:first-child { border-top: none; }
.lesson-sidebar a {
  display: block;
  padding: 9px 18px 9px 34px;
  color: var(--text);
  text-decoration: none;
  border-left: 3px solid transparent;
}
.lesson-sidebar a:hover { background: #f7f8fa; }
.lesson-sidebar a.active {
  color: var(--gold);
  font-weight: 600;
  border-left-color: var(--gold);
  background: #faf8f2;
}

/* Treść */
.lesson-content {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  padding: 34px 38px;
  overflow-wrap: break-word;
}
.lesson-content figure { margin: 26px auto; text-align: center; }
.lesson-content figure.aligncenter img { margin: 0 auto; }
.lesson-content figcaption { font-size: .8rem; color: #98a0ad; margin-top: 6px; }
.lesson-content hr {
  border: none;
  border-top: 1px solid #e3e6ea;
  margin: 30px 0;
}
.lesson-video-wrap { margin: 24px 0; }
.lesson-video {
  width: 100%;
  border-radius: var(--radius);
  background: #000;
  display: block;
}

/* ─── Pliki do pobrania ──────────────────────────────────── */

.files-section { margin-top: 34px; }
.files-box {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  padding: 10px 26px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 0 40px;
}
.file-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 2px;
  border-bottom: 1px solid #eef0f3;
  text-decoration: none;
  color: var(--heading);
  font-size: .95rem;
}
.file-row:hover { color: var(--gold-dark); }
.file-row .file-ico { color: var(--gold); flex-shrink: 0; }

/* ─── Przyciski ──────────────────────────────────────────── */

.btn {
  display: inline-block;
  background: var(--gold);
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 11px 26px;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s ease;
}
.btn:hover { background: var(--gold-dark); }
.btn-nav { padding: 10px 18px; }
.btn-nav .arrow { font-size: .9em; }

/* ─── Login ──────────────────────────────────────────────── */

.login-page {
  min-height: 100vh;
  background: var(--navy);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-logo { margin-bottom: 42px; }
.login-logo img { height: 96px; }
.login-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .35);
  padding: 38px 34px;
  width: 100%;
  max-width: 400px;
  text-align: center;
}
.login-card h1 { font-size: 1.25rem; margin: 0 0 8px; }
.login-card .login-sub { font-size: .88rem; color: #7a828f; margin: 0 0 24px; }
.login-input {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid #d5d9e0;
  border-radius: 5px;
  font-size: .95rem;
  margin-bottom: 16px;
}
.login-input:focus { outline: none; border-color: var(--gold); }
.login-btn { width: 100%; padding: 13px; font-size: .85rem; }
.login-note { font-size: .8rem; color: #98a0ad; margin-top: 22px; }
.login-note a { color: var(--gold); }
.login-msg {
  border-radius: 5px;
  padding: 12px 15px;
  font-size: .9rem;
  margin-bottom: 18px;
  text-align: left;
}
.login-msg.ok { background: #eef7ee; color: #2f6b39; border: 1px solid #cfe7d2; }
.login-msg.err { background: #fdf0ef; color: #a03a32; border: 1px solid #f2d5d2; }

/* ─── Pakiet Prawny ──────────────────────────────────────── */

.legal-group { margin-top: 30px; }
.legal-group h2 { margin-bottom: 6px; }
.legal-group .group-desc { font-size: .9rem; color: #7a828f; margin: 0 0 14px; }

.notice-box {
  background: #fdf9ee;
  border: 1px solid #ecdcae;
  border-radius: var(--radius);
  color: #7c6a33;
  padding: 16px 20px;
  font-size: .93rem;
  margin: 22px 0;
}

/* ─── Stopka ─────────────────────────────────────────────── */

.site-footer {
  background: var(--header);
  color: #b9bdc9;
  text-align: center;
  font-size: .82rem;
  padding: 26px 24px;
  margin-top: 40px;
}
