/* --- 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;
}


/* --- 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; 
}

.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 ORAZ 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); }

/* RESPONSYWNOŚĆ DLA NAV-MENU (PONIŻEJ 768px) */
@media (max-width: 768px) {
  .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);
  }
}

/* --- 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 CECH / USP --- */
.features-bar {
  max-width: var(--max-w);
  margin: -3rem auto 3rem;
  padding: 0 1.5rem;
  position: relative;
  z-index: 10;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}
.feature-card {
  background: #fff;
  padding: 1.5rem;
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
  border: 1px solid #e2e8f0;
  text-align: center;
}
.feature-icon { font-size: 2.2rem; margin-bottom: 0.5rem; display: block; }
.feature-card h3 { margin: 0 0 0.3rem; 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;
}
.about-img {
  width: 100%;
  height: 280px;
  border-radius: var(--radius);
  object-fit: cover;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}
.about-text h2 { color: var(--accent-dark); margin-top: 0; }

@media (max-width: 768px) {
  .hero h1 { font-size: 2.2rem; }
  .about-banner { grid-template-columns: 1fr; text-align: center; }
}




/* --- UKŁAD KONTENERA GŁÓWNEGO I PODSTRON --- */

/* Wypełnienie wolnej przestrzeni przez główną treść */
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;
}

/* --- STYLIZACJA TREŚCI MARKDOWN (.content) --- */
.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);
}

.content a[href$=".pdf"] {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent);
  color: #fff !important;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius);
  font-weight: 700;
  text-decoration: none;
  margin: 1rem 0;
  box-shadow: 0 4px 14px rgba(0, 141, 218, 0.3);
  transition: all 0.2s ease;
}

.content a[href$=".pdf"]:hover {
  background: #0077b6;
  transform: translateY(-2px);
}

/* --- STOPKA STRONY --- */
/* Margines górny stopki zmniejszony z 5rem na 2rem */
.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; }




/* --- ACCESSIBILITY / SKIP LINK  --- */
/* standardowy element ułatwiający dostępność (Accessibility / a11y) dla osób poruszających się po stronie klawiaturą lub czytnikiem ekranu. */
/* Powinien być domyślnie niewidoczny, a pojawiać się na ekranie tylko wtedy, gdy ktoś wciśnie klawisz TAB po wejściu na stronę. */
.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;
}



/* do poczty */
/* --- PUŁAPKA NA BOTY (HONEYPOT) --- */
.hp {
  display: none !important;
}

/* --- STYLIZACJA FORMULARZA KONTAKTOWEGO --- */
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);
}

/* KOMUNIKATY STATUSU FORMULARZA */
.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;
}