:root {
  --blue-900: #0c3c5a;
  --blue-700: #13618f;
  --blue-500: #1b7fb5;
  --blue-100: #e3f1f9;
  --sun-500: #f2b705;
  --sun-100: #fff6d9;
  --ink: #1d2a33;
  --muted: #55636d;
  --line: #d9e4ea;
  --bg: #fbfcfd;
  --card: #ffffff;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(12, 60, 90, .06), 0 6px 20px rgba(12, 60, 90, .07);
  --wrap: 1080px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-700); text-underline-offset: 3px; }
a:hover { color: var(--blue-900); }
h1, h2, h3 { line-height: 1.25; color: var(--blue-900); margin: 0 0 .6em; }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.7rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
ul { padding-left: 1.2em; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--blue-900); color: #fff; padding: .6em 1em; z-index: 10;
}
.skip:focus { left: 1rem; top: 1rem; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem; }

/* Nagłówek */
.topbar { background: var(--blue-900); color: #dbe9f2; font-size: .9rem; }
.topbar .wrap { display: flex; flex-wrap: wrap; gap: .3rem 1.4rem; justify-content: flex-end; padding-top: .45rem; padding-bottom: .45rem; }
.topbar a { color: #fff; text-decoration: none; font-weight: 600; }
.topbar a:hover { text-decoration: underline; }

.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; }
.brand { text-decoration: none; color: var(--blue-900); display: flex; flex-direction: column; line-height: 1.2; }
.brand strong { font-size: 1.15rem; }
.brand span { font-size: .85rem; color: var(--muted); }
.brand::before {
  content: ""; width: 34px; height: 6px; border-radius: 3px; background: var(--sun-500); margin-bottom: .35rem;
}

.nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .2rem; }
.nav a {
  display: block; padding: .5rem .8rem; border-radius: 999px; text-decoration: none;
  color: var(--ink); font-weight: 500; font-size: .97rem;
}
.nav a:hover { background: var(--blue-100); color: var(--blue-900); }
.nav a[aria-current="page"] { background: var(--blue-500); color: #fff; }

.menu-toggle { display: none; }

@media (max-width: 860px) {
  .site-header { position: static; }
  .site-header .wrap { flex-wrap: wrap; padding-top: .7rem; padding-bottom: .7rem; }
  .brand { flex: 1 1 0; min-width: 0; }
  .topbar .wrap { justify-content: flex-start; }
  .menu-toggle {
    display: inline-flex; align-items: center; gap: .4rem; font: inherit; font-weight: 600;
    background: var(--blue-100); color: var(--blue-900); border: 0; border-radius: 999px; padding: .5rem 1rem; cursor: pointer;
  }
  .nav { width: 100%; display: none; }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; padding: .4rem 0 .2rem; }
  .nav a { border-radius: 10px; }
  .no-js .nav { display: block; }
  .no-js .menu-toggle { display: none; }
}

/* Hero */
.hero { background: linear-gradient(135deg, var(--blue-100) 0%, #f6fbfe 55%, var(--sun-100) 100%); }
.hero .wrap { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2.5rem; align-items: center; padding-top: 3.2rem; padding-bottom: 3.2rem; }
.hero .eyebrow { display: inline-block; font-weight: 700; color: var(--blue-700); background: #fff; border-radius: 999px; padding: .25rem .8rem; font-size: .85rem; margin-bottom: 1rem; box-shadow: var(--shadow); }
.hero p.lead { font-size: 1.15rem; color: var(--muted); max-width: 34em; }
.hero-photo { justify-self: center; position: relative; isolation: isolate; }
.hero-photo img { border-radius: 24px; box-shadow: var(--shadow); width: 260px; }
.hero-photo::before {
  content: ""; position: absolute; inset: 18px -18px -18px 18px; border-radius: 24px; background: var(--sun-500); z-index: -1; opacity: .85;
}
.actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.4rem; }
.btn {
  display: inline-flex; align-items: center; gap: .5rem; padding: .75rem 1.25rem; border-radius: 999px;
  font-weight: 700; text-decoration: none; border: 2px solid transparent;
}
.btn-primary { background: var(--blue-500); color: #fff; }
.btn-primary:hover { background: var(--blue-700); color: #fff; }
.btn-ghost { background: #fff; color: var(--blue-900); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--blue-500); color: var(--blue-900); }

@media (max-width: 760px) {
  .hero .wrap { grid-template-columns: 1fr; padding-top: 2.2rem; padding-bottom: 2.6rem; }
  .hero-photo { order: -1; }
  .hero-photo img { width: 160px; }
}

/* Sekcje i karty */
main { display: block; }
.section { padding: 3rem 0; }
.section.alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 860px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); }
.card h3 { margin-bottom: .4em; }
.card.accent { border-top: 5px solid var(--sun-500); }
.card .more { font-weight: 700; text-decoration: none; }
.card .more::after { content: " →"; }

.hours { width: 100%; border-collapse: collapse; }
.hours th, .hours td { text-align: left; padding: .45rem 0; border-bottom: 1px dashed var(--line); vertical-align: top; }
.hours th { font-weight: 600; padding-right: 1rem; white-space: nowrap; }
.note { color: var(--muted); font-size: .95rem; }

.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { padding: .25rem 0; }

/* Treść podstron */
.page-head { background: linear-gradient(135deg, var(--blue-100), #f7fbfe); border-bottom: 1px solid var(--line); }
.page-head .wrap { padding-top: 2.4rem; padding-bottom: 2rem; }
.page-head p { color: var(--muted); margin: 0; max-width: 46em; }
.prose { max-width: 46em; }
.prose ul li { margin-bottom: .35em; }
.cv { display: grid; grid-template-columns: 220px 1fr; gap: 2rem; align-items: start; }
.cv img { border-radius: var(--radius); box-shadow: var(--shadow); }
@media (max-width: 680px) { .cv { grid-template-columns: 1fr; } .cv img { width: 180px; } }

.services { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
.services li {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem;
  font-weight: 600; color: var(--blue-900); box-shadow: var(--shadow); display: flex; gap: .7rem; align-items: center;
}
.services li::before { content: ""; flex: 0 0 12px; height: 12px; border-radius: 50%; background: var(--sun-500); }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.gallery a { display: block; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #fff; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .25s ease; }
.gallery a:hover img { transform: scale(1.03); }

.cert-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.cert-list a {
  display: flex; gap: .8rem; align-items: flex-start; padding: .8rem 1rem; background: #fff;
  border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink);
}
.cert-list a:hover { border-color: var(--blue-500); }
.cert-list a::before {
  content: ""; flex: 0 0 18px; height: 22px; margin-top: .15rem; border-radius: 3px;
  background: var(--blue-100); border: 2px solid var(--blue-500);
}

.book { display: grid; grid-template-columns: 160px 1fr; gap: 2rem; align-items: start; }
.book img { border-radius: 8px; box-shadow: var(--shadow); width: 160px; }
@media (max-width: 600px) { .book { grid-template-columns: 1fr; } }
.downloads { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .6rem; }
.downloads a { display: block; padding: .7rem 1rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; text-decoration: none; }
.downloads a:hover { border-color: var(--blue-500); }
.downloads small { color: var(--muted); }

/* Podgląd zdjęć */
dialog.lightbox { border: 0; padding: 0; background: transparent; max-width: 94vw; max-height: 92vh; }
dialog.lightbox::backdrop { background: rgba(8, 25, 38, .82); }
dialog.lightbox img { max-width: 94vw; max-height: 84vh; width: auto; border-radius: 10px; background: #fff; }
dialog.lightbox p { color: #fff; margin: .6rem 0 0; font-size: .95rem; max-width: 80ch; }
dialog.lightbox button {
  position: absolute; top: .4rem; right: .4rem; border: 0; border-radius: 999px; width: 2.4rem; height: 2.4rem;
  font-size: 1.4rem; line-height: 1; cursor: pointer; background: #fff; color: var(--ink);
}

/* Stopka */
.site-footer { background: var(--blue-900); color: #cfe0ea; margin-top: 3rem; font-size: .95rem; }
.site-footer .wrap { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 2rem; padding-top: 2.4rem; padding-bottom: 2rem; }
.site-footer h2 { color: #fff; font-size: 1.05rem; margin-bottom: .6em; }
.site-footer a { color: #fff; }
.site-footer .hours th, .site-footer .hours td { border-color: rgba(255, 255, 255, .15); padding: .25rem 0; }
.site-footer .bottom { border-top: 1px solid rgba(255, 255, 255, .12); }
.site-footer .bottom .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; padding-top: 1rem; padding-bottom: 1rem; grid-template-columns: none; }
@media (max-width: 760px) { .site-footer .wrap { grid-template-columns: 1fr; } }

:focus-visible { outline: 3px solid var(--sun-500); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
