/* =====================================================================
   CZCIONKA WŁASNA (SELF-HOSTED): Work Sans
   Pliki leżą na naszym serwerze w /assets/fonts/ – przeglądarka NIE łączy się
   z Google Fonts ani z żadnym CDN, więc nie ma zapytań do stron trzecich
   (nie wyciekają adresy IP odwiedzających, nie jest potrzebny baner cookies).
   Licencja: SIL Open Font License 1.1 (plik LICENSE-WorkSans-OFL.txt obok fontów).
   Zakres "latin" zawiera polskie i szwedzkie znaki podstawowe (å, ä, ö, é itd.).
   font-display: swap = tekst pokazuje się od razu czcionką systemową,
   a po wczytaniu fontu płynnie się podmienia.
   Wagi używane w projekcie: 400, 500, 600, 700, 800.
   ===================================================================== */
@font-face { font-family: 'Work Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('/assets/fonts/work-sans-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Work Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url('/assets/fonts/work-sans-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Work Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('/assets/fonts/work-sans-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Work Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url('/assets/fonts/work-sans-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Work Sans'; font-style: normal; font-weight: 800; font-display: swap; src: url('/assets/fonts/work-sans-latin-800-normal.woff2') format('woff2'); }

/* --- ZMIENNE I BAZA --- */
:root { 
  --fg: #0b192c; 
  --bg: #f8fafc; 
  --accent: #008dda; 
  --accent-dark: #0f2a4a;
  --accent-light: #ebf4f6;
  --sun: #ff6b6b;
  --muted: #5f6b76; 
  --max-w: 72rem;
  --radius: 12px;
}

* { box-sizing: border-box; }

body { 
  margin: 0; 
  font-family: 'Work Sans', system-ui, -apple-system, sans-serif; 
  color: var(--fg); 
  background: var(--bg); 
  line-height: 1.6;

  /* Układ Flexbox rozciągający stronę na 100% wysokości okna */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* --- ACCESSIBILITY / SKIP LINK --- */
.skip {
  position: absolute;
  top: -9999px;
  left: -9999px;
  background: var(--accent);
  color: #fff !important;
  padding: 0.8rem 1.2rem;
  z-index: 9999;
  text-decoration: none;
  font-weight: 700;
  border-radius: 0 0 var(--radius) var(--radius);
}

.skip:focus {
  top: 0;
  left: 1rem;
}

/* --- NAGŁÓWEK STRONY --- */
.site-header { 
  background: var(--accent-dark);
  color: #fff;
  padding: 1rem 2rem; 
  display: flex; 
  flex-wrap: wrap; 
  gap: 1.5rem; 
  align-items: center; 
  justify-content: space-between; 
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.site-header a { color: #fff; text-decoration: none; font-weight: 500; }
.site-header a:hover { color: #41c9e2; }
.brand { font-size: 1.3rem; font-weight: 800; color: #fff; letter-spacing: -0.5px; }

.site-header ul { 
  display: flex; 
  flex-wrap: wrap; 
  gap: 1.5rem; 
  list-style: none; 
  margin: 0; 
  padding: 0; 
}

/* PRZEŁĄCZNIK JĘZYKÓW */
.langs {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.langs a {
  padding: 0.3rem 0.6rem;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 6px;
  font-size: 0.85rem;
}

.langs a[aria-current="true"] {
  background: #41c9e2;
  color: var(--accent-dark);
  border-color: #41c9e2;
  font-weight: 700;
}

/* NAWIGACJA I HAMBURGER MENU */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 101;
}

.hamburger {
  display: block;
  width: 26px;
  height: 3px;
  background: #fff;
  position: relative;
  transition: background 0.2s ease;
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  width: 26px;
  height: 3px;
  background: #fff;
  left: 0;
  transition: transform 0.3s ease, top 0.3s ease;
}

.hamburger::before { top: -8px; }
.hamburger::after { top: 8px; }

.nav-toggle.open .hamburger { background: transparent; }
.nav-toggle.open .hamburger::before { top: 0; transform: rotate(45deg); }
.nav-toggle.open .hamburger::after { top: 0; transform: rotate(-45deg); }

/* --- HERO SECTION --- */
.hero {
  background: linear-gradient(135deg, rgba(15, 42, 74, 0.92), rgba(11, 25, 44, 0.88)), 
              url('https://images.unsplash.com/photo-1530549387789-4c1017266635?auto=format&fit=crop&w=1600&q=80') center/cover no-repeat;
  color: #fff;
  padding: 5rem 1.5rem;
  text-align: center;
}
.hero-inner { max-width: 50rem; margin: 0 auto; }
.hero-badge {
  display: inline-block;
  background: rgba(65, 201, 226, 0.2);
  color: #41c9e2;
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(65, 201, 226, 0.4);
}
.hero h1 { font-size: 3rem; margin: 0 0 1.2rem; line-height: 1.15; font-weight: 800; color: #fff; }
.hero p { font-size: 1.25rem; color: #e2e8f0; margin-bottom: 2rem; }
.hero-btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* --- BUTTONY --- */
.btn-primary {
  background: var(--accent);
  color: #fff !important;
  padding: 0.85rem 1.8rem;
  border-radius: var(--radius);
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(0, 141, 218, 0.4);
}
.btn-primary:hover { background: #0077b6; transform: translateY(-2px); }

.btn-secondary {
  background: rgba(255, 255, 255, 0.15);
  color: #fff !important;
  padding: 0.85rem 1.8rem;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255,255,255,0.3);
  transition: all 0.2s ease;
}
.btn-secondary:hover { background: rgba(255, 255, 255, 0.25); transform: translateY(-2px); }

/* --- SIATKA ATUTÓW / FEATURES BAR --- */
.features-bar {
  max-width: var(--max-w);
  margin: -3rem auto 3rem;
  padding: 0 1.5rem;
  position: relative;
  z-index: 10;
  width: 100%;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  width: 100%;
}

.feature-card {
  background: #fff;
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  border: 1px solid #e2e8f0;
  text-align: center;
  transition: transform 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-3px);
}

.feature-icon {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
  display: block;
}

/* Ikony SVG w pasku atutów (zamiast emotikon – te wyglądały inaczej na każdym telefonie).
   Rysowane kolorem currentColor, więc kolor ustawia ta jedna reguła (var(--accent)). */
.feature-icon svg {
  width: 2.6rem;
  height: 2.6rem;
  color: var(--accent);
  margin: 0 auto;
  display: block;
}

.feature-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.1rem;
  color: var(--accent-dark);
}

.feature-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

/* --- KARTY KURSÓW (GRID) --- */
.section { max-width: var(--max-w); margin: 4rem auto; padding: 0 1.5rem; }
.section-title { text-align: center; margin-bottom: 3rem; }
.section-title h2 { font-size: 2.2rem; color: var(--accent-dark); margin: 0 0 0.5rem; }
.section-title p { color: var(--muted); font-size: 1.1rem; }

.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}
.course-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
  border: 1px solid #e2e8f0;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
}
.course-card:hover { transform: translateY(-5px); box-shadow: 0 12px 30px rgba(0,0,0,0.12); }
.course-img { height: 180px; background-size: cover; background-position: center; position: relative; }
.course-badge {
  position: absolute;
  top: 1rem; right: 1rem;
  background: rgba(15, 42, 74, 0.85);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.7rem;
  border-radius: 4px;
}
.course-body { padding: 1.5rem; display: flex; flex-direction: column; flex-grow: 1; }
.course-body h3 { margin: 0 0 0.8rem; font-size: 1.3rem; color: var(--accent-dark); }
.course-body p { color: var(--muted); font-size: 0.95rem; margin-bottom: 1.5rem; flex-grow: 1; }
.course-link {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.course-link:hover { text-decoration: underline; }

/* --- BANER OM MIG --- */
.about-banner {
  background: var(--accent-light);
  border-radius: var(--radius);
  padding: 3rem;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2.5rem;
  align-items: center;
  margin-top: 4rem;
}
/* Ramka zdjęcia Leili: pionowa 4:5 (tak jak zdjęcie 600x750), więc nic nie jest ucinane.
   Dawne wartości: height: 420px (na telefonie 200px) – ucinało to głowę/twarz. */
.about-img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  /* height: 420px; */
  border-radius: var(--radius);
  object-fit: cover;
  object-position: 50% 20%;   /* gdyby kadr był przycinany, trzymamy twarz u góry */
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}
.about-text h2 { color: var(--accent-dark); margin-top: 0; }

/* --- UKŁAD KONTENERA GŁÓWNEGO I PODSTRON --- */
main#main {
  flex: 1 0 auto;
  width: 100%;
  max-width: var(--max-w);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.content {
  max-width: 100%;
  margin: 0 auto;
}

.content h1 {
  font-size: 2.2rem;
  color: var(--accent-dark);
  margin-top: 1rem;
  margin-bottom: 1.5rem;
  border-bottom: 3px solid var(--accent-light);
  padding-bottom: 0.8rem;
}

.content h2 {
  font-size: 1.5rem;
  color: var(--accent-dark);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.content h3 {
  font-size: 1.25rem;
  color: var(--fg);
  margin-top: 1.8rem;
}

.content blockquote {
  background: var(--accent-light);
  border-left: 4px solid var(--accent);
  margin: 2rem 0;
  padding: 1.2rem 1.5rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 1.05rem;
}

.content ul {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem;
  margin: 1.8rem 0;
}

.content ul li {
  background: #fff;
  padding: 1.2rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
}

.content ul li strong {
  display: block;
  color: var(--accent-dark);
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}

.download-box {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 2rem 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

/* --- DYSKRETNY LINK / PRZYCISK PDF (BEZ DUŻEGO BLOKU) --- */
.btn2-pdf,
.content a.btn2-pdf {
  display: inline-flex !important;
  align-items: center;
  gap: 0.35rem;
  background: var(--accent-light) !important;
  color: var(--accent-dark) !important;
  border: 1px solid rgba(0, 141, 218, 0.25) !important;
  padding: 0.25rem 0.65rem !important;
  border-radius: 6px !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  box-shadow: none !important;
  margin: 0 0 0 0.3rem !important;
  transition: all 0.2s ease;
}

.btn2-pdf:hover,
.content a.btn2-pdf:hover {
  background: var(--accent) !important;
  color: #fff !important;
  border-color: var(--accent) !important;
  transform: translateY(-1px);
}

.btn2-pdf::before {
  content: "📄";
  font-size: 0.85rem;
}

/* --- FORMULARZ KONTAKTOWY & STATUSY --- */
.hp {
  display: none !important;
}

form.contact {
  background: #fff;
  padding: 2rem;
  border-radius: var(--radius);
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  max-width: 38rem;
  margin: 2rem 0 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

form.contact label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-weight: 600;
  color: var(--accent-dark);
  font-size: 0.95rem;
}

form.contact input[type="text"],
form.contact input[type="email"],
form.contact textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--fg);
  background: #f8fafc;
  transition: all 0.2s ease;
}

form.contact input[type="text"]:focus,
form.contact input[type="email"]:focus,
form.contact textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0, 141, 218, 0.15);
}

form.contact textarea {
  resize: vertical;
  min-height: 130px;
}

form.contact button[type="submit"] {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.85rem 1.8rem;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  align-self: flex-start;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(0, 141, 218, 0.3);
}

form.contact button[type="submit"]:hover {
  background: #0077b6;
  transform: translateY(-2px);
}

.notice {
  padding: 1rem 1.2rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.notice.ok {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.notice.err {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

/* --- STOPKA STRONY --- */
.site-footer { 
  background: var(--accent-dark);
  color: rgba(255,255,255,0.7);
  padding: 3rem 1.5rem 1.5rem;
  margin-top: 2rem;
  text-align: center;
}

.site-footer a { color: #41c9e2; text-decoration: none; }

/* ==========================================
   RESPONSYWNOŚĆ I URZĄDZENIA MOBILNE (< 768px)
   ========================================== */
@media (max-width: 768px) {
  /* NAGŁÓWEK I MENU HAMBURGER */
  .nav-toggle {
    display: block;
  }

  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--accent-dark);
    flex-direction: column;
    align-items: stretch;
    padding: 1.5rem 2rem;
    gap: 1.5rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: none;
  }

  .nav-menu.active {
    display: flex;
  }

  .nav-menu ul {
    flex-direction: column;
    gap: 1rem;
    width: 100%;
  }

  .nav-menu ul li a {
    display: block;
    font-size: 1.1rem;
    padding: 0.4rem 0;
  }

  .langs {
    display: flex;
    justify-content: flex-start;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
  }

  /* SEKCJA HERO & ATUTY */
  .hero h1 { 
    font-size: 2rem; 
  }

  .features-bar {
    margin-top: 1.5rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  /* KAFELKI I BANERY */
  .courses-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .about-banner { 
    grid-template-columns: 1fr; 
    text-align: center; 
    padding: 1.5rem;
  }

  /* Telefon: zdjęcie Leili wyśrodkowane, max 300px szerokości, proporcje 4:5 bez przycinania.
     Dawna wartość: height: 200px (wąski pasek, ucinał twarz). */
  .about-img {
    /* height: 200px; */
    width: min(100%, 300px);
    margin: 0 auto;
  }
}


/* =====================================================================
   ZDJĘCIA SZKOLEŃ (kafelki 3:4 – 372x496 px, pliki assets/img/kurs-*.jpg)
   Komputer: zdjęcie po lewej (240px), tekst po prawej.
   Telefon:  nagłówek, potem zdjęcie wyśrodkowane (max 280px), potem tekst.
   ===================================================================== */
.course-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 1.5rem 2rem;
  align-items: start;
}
.course-photo,
.photo-row figure { margin: 0; }
.course-photo img,
.photo-row img,
.extra-photo {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}
.course-text { min-width: 0; }
.course-text > :first-child { margin-top: 0; }

/* Szkolenia 7 i 8 (lista "Ytterligare utbildningar"): mniejsze zdjęcie obok krótkiego opisu */
.extra-course {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 1.5rem;
  align-items: center;
  margin: 1.5rem 0;
}
.extra-course h3 { margin-top: 0; }

/* Dwa zdjęcia w rzędzie (strona HLR) */
.photo-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 260px));
  gap: 1.5rem;
  margin: 2rem 0;
}

@media (max-width: 768px) {
  .course-layout { grid-template-columns: 1fr; gap: 1.2rem; }
  .course-photo { width: min(100%, 280px); margin: 0 auto; }
  .extra-course { grid-template-columns: 1fr; gap: 1rem; }
  .extra-photo { width: min(100%, 220px); margin: 0 auto; }
  /* Telefon: dwa zdjęcia obok siebie (oszczędza ok. 700px wysokości strony) */
  .photo-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }

  /* Telefon: ciaśniejsze listy w ramkach szkoleń (strona była bardzo długa).
     Dotyczy tylko .download-box; zwykłe listy na innych stronach bez zmian. */
  .download-box ul { gap: .7rem; margin: 1.2rem 0; }
  .download-box ul li { padding: .8rem 1rem; }
}

/* Nagłówek h2 na samej górze ramki szkolenia nie potrzebuje dużego marginesu (był pusty odstęp nad nim) */
.download-box > h2:first-child { margin-top: 0; }

/* Zdjęcie Leili na telefonie: pełne, bez ucinania (zabezpieczenie również przed starymi, inline'owymi rozmiarami) */
@media (max-width: 768px) {
  .about-banner .about-img { width: min(100%, 300px); height: auto; aspect-ratio: 4 / 5; }
}


/* =====================================================================
   JĘZYK PERSKI (RTL) – czcionka Vazirmatn z własnego serwera (licencja OFL), bez CDN.
   unicode-range: przeglądarka pobiera plik TYLKO gdy na stronie są znaki arabskie/perskie,
   więc szwedzkie i angielskie strony nie ładują tych fontów.
   ===================================================================== */
@font-face { font-family: 'Vazirmatn'; font-style: normal; font-weight: 400; font-display: swap; src: url('/assets/fonts/vazirmatn-arabic-400-normal.woff2') format('woff2'); unicode-range: U+0600-06FF, U+200C-200E, U+2010-2011, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: 'Vazirmatn'; font-style: normal; font-weight: 600; font-display: swap; src: url('/assets/fonts/vazirmatn-arabic-600-normal.woff2') format('woff2'); unicode-range: U+0600-06FF, U+200C-200E, U+2010-2011, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: 'Vazirmatn'; font-style: normal; font-weight: 700; font-display: swap; src: url('/assets/fonts/vazirmatn-arabic-700-normal.woff2') format('woff2'); unicode-range: U+0600-06FF, U+200C-200E, U+2010-2011, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: 'Vazirmatn'; font-style: normal; font-weight: 800; font-display: swap; src: url('/assets/fonts/vazirmatn-arabic-800-normal.woff2') format('woff2'); unicode-range: U+0600-06FF, U+200C-200E, U+2010-2011, U+FB50-FDFF, U+FE70-FEFF; }

/* Perski: Vazirmatn dla znaków perskich, Work Sans dla łacińskich (np. "Nordic Rescue Academy") */
html[dir="rtl"] body,
html[dir="rtl"] button,
html[dir="rtl"] input,
html[dir="rtl"] textarea { font-family: 'Vazirmatn', 'Work Sans', system-ui, -apple-system, sans-serif; line-height: 1.8; }

/* RTL: pasek cytatu po prawej stronie, plakietka na kafelku po lewej, hamburger po prawej */
html[dir="rtl"] .content blockquote { border-left: 0; border-right: 4px solid var(--accent); border-radius: var(--radius) 0 0 var(--radius); }
html[dir="rtl"] .course-badge { right: auto; left: 1rem; }
html[dir="rtl"] .btn2-pdf, html[dir="rtl"] .content a.btn2-pdf { margin: 0 .3rem 0 0 !important; }

/* Zdjęcie poziome (Badvärd 3:2) – na całą szerokość ramki szkolenia, pod nagłówkiem */
.course-banner { margin: 0 0 1.2rem; }
.course-banner img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); box-shadow: 0 8px 20px rgba(0,0,0,.1); }
