/* ============================================================
   Gabinet flebologiczny — lek. med. Wojciech Jusza
   Nowoczesny, czytelny design przyjazny seniorom
   ============================================================ */

:root {
  --navy: #14324f;
  --navy-dark: #0d2338;
  --teal: #0e7c86;
  --teal-dark: #0a616a;
  --teal-light: #e3f2f3;
  --bg: #f7fafb;
  --white: #ffffff;
  --text: #22333f;
  --muted: #5a6b76;
  --border: #dde6ea;
  --shadow: 0 2px 10px rgba(20, 50, 79, .10);
  --shadow-lg: 0 12px 34px rgba(20, 50, 79, .22);
  --radius: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  font-size: 19px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}

/* Tryb powiększonego tekstu */
body.duzy-tekst { font-size: 22px; }

img { max-width: 100%; display: block; }

a { color: var(--teal); }
a:hover { color: var(--teal-dark); }

.container { max-width: 1100px; margin: 0 auto; padding: 0 22px; }

/* ---------- Pasek górny ---------- */
.topbar {
  background: var(--navy-dark);
  color: #cfe0ea;
  font-size: .85em;
  padding: 7px 0;
}
.topbar .container {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
}
.topbar a { color: #fff; text-decoration: none; font-weight: 600; }
.topbar a:hover { text-decoration: underline; }
.btn-tekst {
  background: transparent; border: 1px solid #4a6a85; color: #cfe0ea;
  border-radius: 8px; padding: 2px 12px; cursor: pointer; font-size: 1em;
}
.btn-tekst:hover { background: #1d3d5c; }

/* ---------- Nagłówek / nawigacja ---------- */
header.site {
  background: var(--white);
  box-shadow: var(--shadow);
  position: sticky; top: 0; z-index: 50;
}
.nav-wrap {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0; gap: 18px;
}
.logo { text-decoration: none; line-height: 1.25; }
.logo strong { display: block; color: var(--navy); font-size: 1.15em; }
.logo span { color: var(--teal); font-size: .8em; font-weight: 600; }

nav.main ul { list-style: none; display: flex; gap: 4px; flex-wrap: wrap; }
nav.main a {
  display: block; padding: 10px 14px; text-decoration: none;
  color: var(--navy); font-weight: 600; border-radius: 10px; font-size: .93em;
}
nav.main a:hover { background: var(--teal-light); color: var(--teal-dark); }
nav.main a.aktywny { background: var(--teal); color: #fff; }

.hamburger {
  display: none; background: var(--teal); color: #fff; border: none;
  font-size: 1.35em; padding: 8px 16px; border-radius: 10px; cursor: pointer;
}

@media (max-width: 900px) {
  .hamburger { display: block; }
  nav.main { display: none; width: 100%; }
  nav.main.otwarte { display: block; }
  nav.main ul { flex-direction: column; padding-bottom: 12px; }
  nav.main a { font-size: 1.05em; padding: 14px; }
  .nav-wrap { flex-wrap: wrap; }
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--teal-dark) 100%);
  color: #fff; padding: 72px 0 80px; text-align: center;
}
.hero h1 { font-size: 2.5em; line-height: 1.2; margin-bottom: 14px; }
.hero p.lead { font-size: 1.25em; color: #d9ecee; max-width: 640px; margin: 0 auto 34px; }
.hero .akcje { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-block; text-decoration: none; font-weight: 700;
  padding: 16px 30px; border-radius: 12px; font-size: 1.05em;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-glowny { background: #fff; color: var(--navy); }
.btn-glowny:hover { color: var(--navy); }
.btn-kontur { border: 2px solid #ffffffaa; color: #fff; }
.btn-kontur:hover { background: #ffffff22; color: #fff; }
.btn-teal { background: var(--teal); color: #fff; }
.btn-teal:hover { color: #fff; background: var(--teal-dark); }

/* ---------- Sekcje ---------- */
section.blok { padding: 60px 0; }
section.blok.jasny { background: var(--white); }
h2.tytul { color: var(--navy); font-size: 1.9em; margin-bottom: 8px; }
p.podtytul { color: var(--muted); margin-bottom: 34px; max-width: 700px; }
h3 { color: var(--navy); margin: 28px 0 10px; font-size: 1.3em; }

.karty { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; }
.karta {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow);
}
.karta .ikona {
  width: 54px; height: 54px; border-radius: 12px; background: var(--teal-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6em; margin-bottom: 16px;
}
.karta h3 { margin-top: 0; }
.karta p { color: var(--muted); font-size: .95em; }
.karta a.wiecej { display: inline-block; margin-top: 12px; font-weight: 700; text-decoration: none; }

/* ---------- Treść artykułu ---------- */
.tresc { max-width: 800px; }
.tresc p { margin-bottom: 18px; }
.tresc ul { margin: 0 0 18px 26px; }
.tresc li { margin-bottom: 6px; }

.wyroznienie {
  background: var(--teal-light); border-left: 5px solid var(--teal);
  padding: 20px 24px; border-radius: 0 var(--radius) var(--radius) 0; margin: 26px 0;
}

.uklad-foto { display: grid; grid-template-columns: 300px 1fr; gap: 36px; align-items: start; }
.uklad-foto img { border-radius: var(--radius); box-shadow: var(--shadow-lg); }
@media (max-width: 760px) { .uklad-foto { grid-template-columns: 1fr; } }

/* ---------- Cennik ---------- */
table.cennik { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
table.cennik th { background: var(--navy); color: #fff; text-align: left; padding: 15px 18px; }
table.cennik td { padding: 14px 18px; border-bottom: 1px solid var(--border); }
table.cennik tr:nth-child(even) td { background: #f2f7f8; }
table.cennik td.cena { white-space: nowrap; font-weight: 700; color: var(--navy); }

/* ---------- Ściana certyfikatów ---------- */
.sciana {
  display: grid;
  gap: 26px;
  margin-bottom: 44px;
}
/* Rząd certyfikatów pionowych — wszystkie kafelki tej samej wielkości */
.sciana.pionowe { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
/* Rząd certyfikatów poziomych — szersze kafelki, też równe między sobą */
.sciana.poziome { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.cert {
  background: #fff; padding: 10px; border-radius: 10px;
  box-shadow: var(--shadow); cursor: zoom-in; border: 1px solid var(--border);
  transition: transform .3s ease, box-shadow .3s ease;
  animation: unoszenie 6s ease-in-out infinite;
  opacity: 0; transform: translateY(24px);
}
.cert.widoczny { opacity: 1; transform: translateY(0); transition: opacity .6s ease, transform .6s ease, box-shadow .3s ease; }
.cert:nth-child(3n)   { animation-delay: -2s; }
.cert:nth-child(3n+1) { animation-delay: -4s; }
.cert:nth-child(4n)   { animation-duration: 7s; }
.cert img {
  width: 100%;
  object-fit: contain;          /* cały certyfikat widoczny, bez przycinania */
  background: #fff; border-radius: 6px;
}
.sciana.pionowe .cert img { height: 280px; }
.sciana.poziome .cert img { height: 230px; }
@media (max-width: 560px) {
  .sciana.pionowe .cert img { height: 230px; }
  .sciana.poziome .cert img { height: 180px; }
}
.cert:hover, .cert:focus-visible {
  transform: scale(1.09) rotate(0deg) !important;
  box-shadow: var(--shadow-lg);
  z-index: 5; position: relative;
  animation-play-state: paused;
  outline: 3px solid var(--teal);
}
.cert:nth-child(odd).widoczny  { transform: rotate(-1.2deg); }
.cert:nth-child(even).widoczny { transform: rotate(1.2deg); }

@keyframes unoszenie {
  0%, 100% { margin-top: 0; }
  50% { margin-top: -8px; }
}

@media (prefers-reduced-motion: reduce) {
  .cert { animation: none; }
}

/* ---------- Podgląd certyfikatu (lightbox) ---------- */
.podglad {
  display: none; position: fixed; inset: 0; z-index: 200;
  background: rgba(13, 35, 56, .88);
  align-items: center; justify-content: center; padding: 30px;
}
.podglad.otwarty { display: flex; }
.podglad img {
  max-height: 88vh; max-width: 92vw; border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5); background: #fff; padding: 8px;
  animation: pojawienie .25s ease;
}
@keyframes pojawienie { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.podglad .zamknij {
  position: absolute; top: 18px; right: 22px;
  background: #fff; color: var(--navy); border: none; border-radius: 50%;
  width: 52px; height: 52px; font-size: 1.5em; font-weight: 700; cursor: pointer;
  box-shadow: var(--shadow-lg);
}
.podglad .strzalka {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: #ffffffd9; color: var(--navy); border: none; border-radius: 50%;
  width: 56px; height: 56px; font-size: 1.6em; cursor: pointer; box-shadow: var(--shadow-lg);
}
.podglad .strzalka:hover, .podglad .zamknij:hover { background: var(--teal-light); }
.podglad .poprzedni { left: 20px; }
.podglad .nastepny { right: 20px; }
@media (max-width: 700px) { .podglad .strzalka { display: none; } }

/* ---------- Formularz ---------- */
form.zamow {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 32px; box-shadow: var(--shadow); max-width: 620px;
}
form.zamow label { display: block; font-weight: 700; color: var(--navy); margin: 18px 0 6px; }
form.zamow label:first-of-type { margin-top: 0; }
form.zamow .podpowiedz { font-weight: 400; color: var(--muted); font-size: .85em; }
form.zamow input, form.zamow textarea {
  width: 100%; padding: 15px 16px; font-size: 1em; font-family: inherit;
  border: 2px solid var(--border); border-radius: 10px; background: #fbfdfe;
}
form.zamow input:focus, form.zamow textarea:focus {
  outline: none; border-color: var(--teal); background: #fff;
}
form.zamow button {
  margin-top: 24px; width: 100%; border: none; cursor: pointer;
  background: var(--teal); color: #fff; font-weight: 700; font-size: 1.1em;
  padding: 17px; border-radius: 12px; transition: background .15s ease;
}
form.zamow button:hover { background: var(--teal-dark); }

/* ---------- Kontakt ---------- */
.gabinety { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.gabinet {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 24px; box-shadow: var(--shadow);
}
.gabinet h3 { margin: 0 0 4px; font-size: 1.05em; color: var(--teal-dark); text-transform: uppercase; letter-spacing: .04em; }
.gabinet p { color: var(--text); font-size: .95em; }

.telefon-box {
  background: var(--navy); color: #fff; border-radius: var(--radius);
  padding: 30px; text-align: center; margin: 34px 0;
}
.telefon-box a.numer {
  display: inline-block; color: #fff; text-decoration: none;
  font-size: 2em; font-weight: 800; letter-spacing: .03em; margin: 6px 0;
}
.telefon-box a.numer:hover { text-decoration: underline; }
.telefon-box p { color: #c9dde8; }

/* ---------- Pasek CTA ---------- */
.cta-pas { background: var(--teal); color: #fff; padding: 46px 0; text-align: center; }
.cta-pas h2 { font-size: 1.7em; margin-bottom: 8px; }
.cta-pas p { color: #dff3f4; margin-bottom: 24px; }

/* ---------- Stopka ---------- */
footer.site { background: var(--navy-dark); color: #b9cbd8; padding: 40px 0 26px; font-size: .9em; }
footer.site .kolumny { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px; margin-bottom: 24px; }
footer.site h4 { color: #fff; margin-bottom: 10px; }
footer.site a { color: #cfe0ea; text-decoration: none; }
footer.site a:hover { text-decoration: underline; }
footer.site ul { list-style: none; }
footer.site li { margin-bottom: 6px; }
footer.site .dol { border-top: 1px solid #2a4a68; padding-top: 16px; text-align: center; color: #7d93a5; }

/* ---------- Animacja pojawiania ---------- */
.pojawia { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.pojawia.widoczny { opacity: 1; transform: translateY(0); }
