/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --page-pad: clamp(16px, 4vw, 72px);
  --nav-pad-x: clamp(10px, 1.8vw, 28px);
  --nav-pad-y: 4px;
  --logo-h: 100px;
  --nav-height: calc(var(--logo-h) + (var(--nav-pad-y) * 2));
}

@media (min-width: 900px) {
  :root {
    --logo-h: 112px;
    --nav-pad-y: 6px;
  }
}

html, body {
  height: 100%;
  scroll-behavior: smooth;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #073b4c;
  overflow: hidden; /* zapobiega podwójnemu scrollowi */
}

button,
input,
textarea,
select,
table {
  font: inherit;
}

/* 🔵 MENU — ZAWSZE NA GÓRZE */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;

  height: var(--nav-height);

  z-index: 9999;

  background: #ffffffee;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #e2e8f0;
}

.nav-inner {
  width: 100%;
  height: 100%;
  padding: var(--nav-pad-y) var(--nav-pad-x);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
}

.logo {
  font-weight: 700;
  color: #1d4ed8;
  justify-self: start;
}

.logo-img {
  display: block;
  height: var(--logo-h);
  width: auto;
}

/* 🔵 TABS */
.tabs {
  display: flex;
  gap: 4px;
  flex: 1 1 auto;
  justify-content: center;
  justify-self: center;
  overflow-x: auto;
  white-space: nowrap;
  -ms-overflow-style: none;
  scrollbar-width: none;
  min-width: 0;
}

.tabs::-webkit-scrollbar {
  display: none;
}

/* MOBILE: pozwól zakładkom zawijać się w wiersze */
@media (max-width: 899px) {
  .top-nav {
    height: auto;
  }

  .nav-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "logo lang"
      "tabs tabs";
    align-items: center;
    gap: 10px;
  }

  .logo {
    grid-area: logo;
    justify-self: start;
  }

  .tabs {
    grid-area: tabs;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    overflow: visible;
    white-space: normal;
  }

  .tab-btn {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: 1.12rem;
    padding: 8px 10px 18px;
  }

  .tab-btn.active::after {
    bottom: 6px;
    width: 9px;
    height: 9px;
  }

  .lang-switch {
    grid-area: lang;
    width: auto;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
  }

  .lang-btn {
    font-size: 1.05rem;
    padding: 4px 8px;
  }
}

.tab-btn {
  border: none;
  background: transparent;
  padding: 6px 12px 10px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 1.45rem;
  line-height: 1.1;
  font-weight: 700;
  color: #1e293b;
  transition: 0.2s;
  position: relative;
}

.tab-btn:hover {
  background: #e8f0ff;
}

.tab-btn.active {
  background: #1d4ed8;
  color: white;
  box-shadow: 0 4px 10px rgba(29, 78, 216, 0.25);
}

.tab-btn.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -8px;
  transform: translateX(-50%);
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #1d4ed8;
}

/* 🔵 GŁÓWNY OBSZAR — SKROLUJE SIĘ TYLKO MAIN */
main {
  position: absolute;
  top: var(--nav-height);
  left: 0;
  width: 100%;
  height: calc(100vh - var(--nav-height));
  overflow-y: scroll;

  scroll-snap-type: y mandatory;
}

/* 🔵 SEKCJE */
section {
  min-height: calc(100vh - var(--nav-height));  /* pełny ekran poniżej menu */

  scroll-snap-align: start;

  padding: 40px var(--page-pad);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;

  text-align: left;
}

/* TŁA SEKCJI */
section:nth-of-type(1) {
  background: linear-gradient(135deg, #e0f2ff, #ffffff);
}

section:nth-of-type(2) {
  background: #ffffff;
}

section:nth-of-type(3) {
  background: #f1f9ff;
}

/* TREŚĆ */
.section-content {
  width: 100%;
  max-width: none;
  margin: 0;
}

.with-hero {
  display: block;
}

.with-hero .hero-image {
  margin-bottom: 0;
  justify-content: flex-start;
}

.with-hero .content-body {
  width: 100%;
}

@media (min-width: 900px) {
  .with-hero::after {
    content: "";
    display: block;
    clear: both;
  }

  .with-hero .hero-image {
    float: right;
    width: min(520px, 40vw);
    margin: 0 0 18px 48px;
    justify-content: flex-end;
    align-items: flex-start;
  }
}

h1, h2 {
  margin-bottom: 16px;
  font-weight: 700;
  color: #0f172a;
}

h1 {
  font-size: clamp(1.9rem, 4vw, 2.4rem);
}

h2 {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
}

p {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 16px;
  color: #1f2933;
}

/* CTA BUTTONS */
.cta-row {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.btn-primary,
.btn-outline {
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.9rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: 0.15s;
}

.btn-primary {
  background: #1d4ed8;
  color: white;
}

.btn-primary:hover {
  transform: translateY(-1px);
}

.btn-outline {
  background: white;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.btn-outline:hover {
  background: #e8f0ff;
}

/* FORMULARZ */
form {
  width: 100%;
  max-width: 420px;
  text-align: left;
}

label {
  font-weight: 600;
  margin-bottom: 4px;
  display: block;
}

input, textarea {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  margin-bottom: 10px;
}

input:focus, textarea:focus {
  border-color: #1d4ed8;
  outline: none;
}

textarea {
  min-height: 120px;
}

/* STOPKA */
footer {
  text-align: center;
  padding: 20px;
  font-size: 0.75rem;
  color: #64748b;
}
.lang-switch {
  display: flex;
  gap: 6px;
}

.lang-btn {
  padding: 4px 10px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 1.275rem;
  line-height: 1.1;
  font-weight: 700;
  border-radius: 6px;
  color: #1e293b;
  transition: 0.2s;
}

.lang-btn:hover {
  background: #e8f0ff;
}

.lang-btn.active {
  background: #1d4ed8;
  color: white;
  font-weight: 700;
}

#home {
  background: linear-gradient(135deg, #e0f2ff, #ffffff);
}

/* START: poprzedni wygląd (bez opływania tekstem) */
section#home {
  justify-content: center;
}

#home .section-content {
  max-width: 1200px;
  margin: 0 auto;
}

#home .with-hero {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

#home .with-hero .hero-image {
  float: none;
  width: 100%;
  margin: 0 0 24px 0;
}

#home .with-hero .content-body {
  width: 100%;
}

#home .subtitle {
  font-size: 1.35rem;
  line-height: 1.7;
}

@media (min-width: 900px) {
  #home .with-hero {
    flex-direction: row;
    align-items: center;
    gap: 56px;
  }

  #home .with-hero .hero-image {
    float: none;
    width: min(520px, 40vw);
    flex: 0 0 min(520px, 40vw);
    flex-shrink: 0;
    margin: 0 0 0 48px;
    justify-content: flex-end;
  }

  #home .with-hero .content-body {
    flex: 1 1 0;
    min-width: 0;
  }
}

#about {
  background: #ffffff;
}

#dla-opiekunow {
  background: #f1f9ff;
}

#dla-rodzin {
  background: #ffffff;
}

#praca {
  background: #ffffff;
}

#contact {
  background: #f1f9ff;
}

#footer {
  background: #ffffff;
}

.hero-image {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.hero-image img {
  width: 100%;
  max-width: 520px;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}
/* =============================== */
/*     TYPOGRAFIA MEDYCZNA         */
/* =============================== */

/* kolory tekstu — większy kontrast */
.section-content,
.text-box {
  color: #0f172a; /* ciemny navy-gray używany na stronach medycznych */
  font-size: 1.15rem;
  line-height: 1.85;
}

.text-box p,
.section-content p {
  font-size: inherit;
  line-height: inherit;
  color: #1e293b; /* medyczny ciemny granat */
  font-weight: 400;

  margin-bottom: 16px;
}

.section-content li,
.section-content td,
.section-content th {
  font-size: inherit;
  line-height: inherit;
  color: #1e293b;
}

.section-content ul,
.section-content ol {
  padding-left: 1.25em;
  margin: 12px 0 16px;
}

.section-content li {
  margin-bottom: 10px;
}

/* nagłówki – czysto, profesjonalnie */
.text-box h1,
.section-content h1 {
  font-size: clamp(2.1rem, 3.4vw, 3rem);
  font-weight: 700;
  color: #0a2540; /* medyczny navy-blue */
  line-height: 1.25;
}

.text-box h2,
.section-content h2 {
  font-size: clamp(1.6rem, 2.4vw, 2.2rem);
  font-weight: 600;
  color: #0a2540;
  line-height: 1.3;
}

/* responsywność */
@media (max-width: 768px) {
  .text-box p {
    font-size: 1rem;
  }

  .text-box h1 {
    font-size: 1.7rem;
  }
}
