/* ==========================================================================
   EndoLaMed – arkusz stylów
   Kolory i podstawowe wymiary są w zmiennych poniżej – zmiana w jednym
   miejscu działa na całej stronie.
   ========================================================================== */

@font-face{font-family:'Comfortaa';font-style:normal;font-weight:400 700;font-display:swap;src:url(../fonts/comfortaa-latin-ext.woff2) format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF}
@font-face{font-family:'Comfortaa';font-style:normal;font-weight:400 700;font-display:swap;src:url(../fonts/comfortaa-latin.woff2) format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:'Montserrat';font-style:normal;font-weight:300 700;font-display:swap;src:url(../fonts/montserrat-latin-ext.woff2) format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF}
@font-face{font-family:'Montserrat';font-style:normal;font-weight:300 700;font-display:swap;src:url(../fonts/montserrat-latin.woff2) format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}

:root {
  --kolor-marki: #291770;        /* fiolet z logo: menu, linki, baner */
  --kolor-tekstu: #383838;       /* podstawowy tekst */
  --kolor-szary-tlo: #ebebeb;    /* baner, linia pod nagłówkiem, stopka */
  --kolor-linii-cennika: #d4d4d4;
  --kolor-podmenu: #f7f7f7;
  --kolor-podmenu-hover: #dbdbdb;

  --font-tekst: "Montserrat", Arial, sans-serif;
  --font-link: "Comfortaa", "Montserrat", Arial, sans-serif;
  --gruby: 700;                  /* grubość pogrubień (nagłówki, <strong>) */

  --szerokosc-strony: 1200px;
  --szerokosc-tekstu: 800px;
  --wciecie-tekstu: 223px;       /* odsunięcie kolumny tekstu od lewej (desktop) */
}

/* ---------- Podstawy ---------- */

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-tekst);
  font-weight: 300;
  font-size: 17px;
  line-height: 24px;
  color: var(--kolor-tekstu);
  background: #fff;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

img { max-width: 100%; height: auto; }

a { text-decoration: none; }

h1, h2, h3, h4, h5, h6, p, ul, ol { margin: 0; }

h1 { font-size: 34px; line-height: 40px; font-weight: var(--gruby); margin-bottom: 15px; }
h2 { font-size: 26px; line-height: 36px; font-weight: var(--gruby); margin-bottom: 15px; }
h3 { font-size: 18px; line-height: 26px; font-weight: var(--gruby); margin-bottom: 15px; }
h4 { font-size: 17px; line-height: 24px; font-weight: var(--gruby); margin-bottom: 15px; }
p  { margin-bottom: 10px; }
strong, b { font-weight: var(--gruby); }

ul, ol { padding-left: 30px; margin-bottom: 10px; }
li > h1, li > h2, li > h3, li > h4 { margin-bottom: 0; }

/* Linki w treści w stylu strony (fiolet, czcionka Comfortaa) */
.link { font-family: var(--font-link); font-weight: 400; color: var(--kolor-marki); text-decoration: none; }
a.link:hover, a.link:focus-visible { text-decoration: underline; }
.link.szary { color: var(--kolor-tekstu); }
u a.link { text-decoration: underline; }
.kolor-marki { color: var(--kolor-marki); }

:focus-visible { outline: 2px solid var(--kolor-marki); outline-offset: 2px; }

.przejdz-do-tresci {
  position: absolute; left: -9999px; top: 0;
  background: var(--kolor-marki); color: #fff; padding: 10px 20px; z-index: 100;
}
.przejdz-do-tresci:focus { left: 10px; }

.kontener {
  width: 100%;
  max-width: var(--szerokosc-strony);
  margin: 0 auto;
}

/* ---------- Nagłówek ---------- */

.naglowek {
  border-bottom: 3px solid var(--kolor-szary-tlo);
  position: relative;
  z-index: 10;
  background: #fff;
}

.naglowek-wnetrze {
  position: relative;
  height: 200px;
}

.logo {
  position: absolute;
  left: 15px;
  top: 35px;
  display: block;
  line-height: 0;
}
.logo img { width: 316px; height: 114px; }

.jezyki {
  position: absolute;
  right: 0;
  top: 0;
  display: flex;
  line-height: 0;
}
.jezyki img { width: 25px; height: 25px; }

/* Menu – desktop */
.menu { position: absolute; right: 0; top: 58px; }
.menu ul { list-style: none; margin: 0; padding: 0; }
.menu > ul { display: flex; }
.menu li { position: relative; }

.menu a {
  display: block;
  padding: 10px 20px;
  font-size: 16px;
  line-height: 24px;
  font-weight: 700;
  color: var(--kolor-marki);
  text-decoration: none;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}
.menu > ul > li > a[aria-current="page"],
.menu > ul > li > a:hover { border-bottom-color: var(--kolor-marki); }

.podmenu {
  position: absolute;
  left: 0;
  top: 100%;
  min-width: 100%;
  background: var(--kolor-podmenu);
  display: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .08);
}
.podmenu a { border-bottom: 0; }
.podmenu a:hover, .podmenu a:focus-visible { background: var(--kolor-podmenu-hover); }
.ma-podmenu:hover > .podmenu,
.ma-podmenu:focus-within > .podmenu { display: block; }

.menu-przycisk { display: none; }

/* ---------- Treść ---------- */

.tresc {
  flex: 1 0 auto;
  width: 100%;
  max-width: var(--szerokosc-strony);
  margin: 0 auto;
  padding: 59px 0 80px var(--wciecie-tekstu);
}
.tresc > * { max-width: var(--szerokosc-tekstu); }
.tresc { overflow-wrap: break-word; }
.tresc a { overflow-wrap: anywhere; }

/* Szeroka kolumna (np. Edukacja) */
.uklad-szeroki .tresc { padding-left: 25px; padding-right: 10px; }
.uklad-szeroki .tresc > * { max-width: none; }

/* ---------- Strona główna ---------- */

.uklad-glowna .tresc { padding: 0 0 80px; max-width: none; }
.uklad-glowna .tresc > * { max-width: none; }

.baner {
  background: var(--kolor-szary-tlo);
  padding: 110px 20px 61px;
  text-align: center;
}
.baner p {
  margin: 0;
  font-size: 48px;
  line-height: 57px;
  font-weight: 700;
  color: var(--kolor-marki);
}

.rejestracja {
  text-align: center;
  padding: 62px 20px 0;
  max-width: var(--szerokosc-tekstu);
  margin: 0 auto;
}
.rejestracja .zl-kalendarz { margin-top: 10px; text-align: left; }
.zl-kalendarz iframe { display: block; width: 100%; min-height: 480px; }

/* ---------- Cennik ---------- */

.uklad-cennik .tresc { padding-left: 0; padding-top: 47px; }
.uklad-cennik h1 {
  font-size: 40px;
  line-height: 48px;
  text-align: center;
  max-width: none;
  margin-bottom: 32px;
}
.cennik {
  list-style: none;
  padding: 0;
  margin: 0 auto 60px;
  max-width: 685px;
}
.cennik li {
  display: flex;
  align-items: flex-end;
  min-height: 50px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--kolor-linii-cennika);
  color: #333;
}
.cennik li span   { flex: 1; padding: 0 5px 1px; }
.cennik li strong { flex: 0 0 85px; padding-bottom: 1px; white-space: nowrap; }

/* ---------- Kontakt ---------- */

.uklad-kontakt .tresc { padding: 37px 0 80px 84px; }
.uklad-kontakt .tresc > * { max-width: none; }
.kontakt {
  display: grid;
  grid-template-columns: 381px 540px;
  column-gap: 155px;
  align-items: start;
}
.kontakt-dane { text-align: center; }
.kontakt-dane > img { display: block; margin: 0 auto 32px; width: 100px; height: auto; }
.kontakt-mapa { margin-top: 50px; }
.kontakt-mapa iframe { display: block; width: 100%; height: 597px; border: 0; }

/* ---------- Strona 404 ---------- */

.uklad-404 .tresc { padding-left: 350px; padding-top: 29px; }

/* ---------- Stopka ---------- */

.stopka {
  background: var(--kolor-szary-tlo);
  padding: 27px 0;
  min-height: 295px;
}
.stopka-kolumny {
  display: grid;
  grid-template-columns: 430px 375px 1fr;   /* 3. kolumna szersza – e-mail w jednej linii */
}
.stopka section { display: flex; align-items: flex-start; }
.stopka .ikona { flex: 0 0 36px; width: 36px; height: 36px; }
.stopka section > div { padding: 8px 8px 0; }
.stopka-misja > div { max-width: 321px; }
.stopka h4 { line-height: 20px; }
.stopka-misja h4 { line-height: 24px; }
.stopka-adres p, .stopka-kontakt p { line-height: 20px; }
.stopka-misja p { margin: 0; }
.stopka a { color: inherit; text-decoration: none; overflow-wrap: anywhere; }
.stopka a:hover { text-decoration: underline; }

/* ==========================================================================
   Tablet i telefon (poniżej 1200 px) – menu chowa się pod przyciskiem
   ========================================================================== */

@media (max-width: 1199px) {
  .menu-przycisk {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    position: absolute;
    right: 10px;
    top: 58px;
    width: 47px;
    height: 47px;
    padding: 6px;
    background: none;
    border: 0;
    cursor: pointer;
  }
  .menu-przycisk span {
    display: block;
    height: 6px;
    border-radius: 3px;
    background: var(--kolor-marki);
    transition: transform .2s, opacity .2s;
  }
  .menu-otwarte .menu-przycisk span:nth-child(1) { transform: translateY(12px) rotate(45deg); }
  .menu-otwarte .menu-przycisk span:nth-child(2) { opacity: 0; }
  .menu-otwarte .menu-przycisk span:nth-child(3) { transform: translateY(-12px) rotate(-45deg); }

  /* Flagi języków w jednym rzędzie z przyciskiem menu */
  .jezyki { top: 58px; right: 64px; height: 47px; align-items: center; gap: 4px; }
  .jezyki a { padding: 6px 3px; }

  .menu {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 3px);           /* tuż pod szarą linią nagłówka */
    background: #fff;
    box-shadow: 0 8px 16px rgba(0, 0, 0, .12);
    max-height: calc(100vh - 203px);
    overflow-y: auto;
  }
  html:not(.js) .menu { position: static; box-shadow: none; max-height: none; padding-top: 200px; }
  html:not(.js) .naglowek-wnetrze { height: auto; }
  .menu > ul { display: block; padding: 10px 0; }
  .menu a { white-space: normal; border-bottom: 0; }
  .menu > ul > li > a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 3px; }
  .menu .podmenu { position: static; display: block; box-shadow: none; background: none; padding-left: 20px; }
  .podmenu a { font-weight: 600; }

  /* Bez JavaScriptu menu jest zawsze widoczne; z JS chowa się pod przyciskiem */
  .js .menu { display: none; }
  .js .menu-otwarte .menu { display: block; }
  html:not(.js) .menu-przycisk { display: none; }

  .tresc { padding: 51px 20px 80px; }
  .tresc > * { margin-left: auto; margin-right: auto; }
  .uklad-szeroki .tresc { padding-left: 20px; padding-right: 20px; }
  .uklad-404 .tresc { padding-left: 20px; }

  .uklad-kontakt .tresc { padding: 37px 20px 80px; }
  .kontakt { grid-template-columns: minmax(0, 381px) minmax(0, 540px); column-gap: 40px; justify-content: center; }

  /* Stopka na tablecie: misja po lewej, adres i kontakt po prawej */
  .stopka-kolumny {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "misja kontakt" "misja adres";
    grid-template-rows: auto 1fr;      /* „Adres” zaraz pod „Kontaktem” */
    align-items: start;
    gap: 20px 30px;
    padding: 0 20px;
  }
  .stopka-misja   { grid-area: misja; }
  .stopka-kontakt { grid-area: kontakt; }
  .stopka-adres   { grid-area: adres; }
  .stopka-misja > div { max-width: none; }
  .stopka section > div { min-width: 0; }
}

/* ==========================================================================
   Telefon (poniżej 768 px) – wszystko w jednej kolumnie, wyśrodkowane
   ========================================================================== */

@media (max-width: 767px) {
  .naglowek-wnetrze { height: 200px; }
  .logo { left: 12px; }
  .logo img { width: min(316px, calc(100vw - 90px)); height: auto; }
  .logo img { width: min(316px, calc(100vw - 160px)); }

  .tresc { text-align: center; padding-left: 5px; padding-right: 5px; }
  .tresc ul, .tresc ol { text-align: center; list-style-position: inside; padding-left: 0; }
  .tresc li > h3 { display: inline; }

  .baner { padding: 115px 10px 120px; }
  .baner p { font-size: 34px; line-height: 40px; }
  .rejestracja { padding-top: 0; }

  .tresc .cennik { text-align: left; }
  .cennik li strong { flex-basis: 80px; }

  .kontakt { grid-template-columns: minmax(0, 1fr); row-gap: 30px; }
  .kontakt-mapa { margin-top: 0; }
  .kontakt-mapa iframe { height: 400px; }

  .stopka { padding: 37px 0; text-align: center; }
  .stopka-kolumny { gap: 10px 12px; padding: 0 8px; }
  .stopka .ikona { display: none; }
  .stopka section { display: block; }
  .stopka section > div { padding: 0; max-width: none; }
  .stopka-misja p { line-height: 24px; }
}

@media (max-width: 400px) {
  .stopka-kolumny { grid-template-columns: minmax(0, 1fr); grid-template-areas: "misja" "kontakt" "adres"; }
  .baner p { font-size: 30px; line-height: 36px; }
  h2 { font-size: 23px; line-height: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
