/* Style publicznej strony DutchTarnovian. Kolory jako zmienne CSS na :root - zmień je tu,
   żeby przefarbować całą stronę (home.html, page.html, blog-*.html korzystają z tych samych). */
:root {
  --teal: #1a7664;
  --navy: #1c3e61;
  --orange: #ff6b35;
  --ink: #1d1d1d;
  --light: #f5f5f5;
  --white: #ffffff;
  --muted: #6b625d;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
}

a { color: inherit; }

/* --- topbar (wspólny dla wszystkich stron) --- */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 999;
  background: var(--white);
  border-bottom: 2px solid var(--teal);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
}

.bar {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* znaczek wersji w rogu - position:absolute celowo, żeby nie dołączał się do .bar (flex)
   i nie zaburzał odstępów/zawijania dopracowanych dla telefonu/tabletu */
.site-version { position: absolute; bottom: 2px; right: 8px; font-size: .62rem; color: var(--muted); opacity: .55; pointer-events: none; }

.brand { display: flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.brand-logo { height: 46px; width: auto; transition: transform .25s ease; }
.brand:hover .brand-logo { transform: scale(1.05); }

.menu { display: none; gap: 0.25rem; flex: 1; }

.menu a {
  display: inline-block;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
}

.menu a:hover, .menu a.active { background: var(--teal); color: #fff; }

.toggle {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  background: none;
  cursor: pointer;
}

.toggle span { display: block; width: 20px; height: 2px; background: var(--teal); margin: 0 auto; }

.menu-mobile { display: none; flex-direction: column; padding: 0.25rem 1.5rem 0.75rem; }
.menu-mobile.open { display: flex; }
.menu-mobile a { padding: 0.65rem 0.25rem; color: var(--muted); text-decoration: none; border-top: 1px solid var(--light); font-weight: 600; }

@media (min-width: 860px) {
  .menu { display: flex; }
  .toggle { display: none; }
  .menu-mobile { display: none !important; }
}

/* --- przełącznik języka (wspólny) --- */
.lang-switch { position: relative; flex-shrink: 0; }

.lang-toggle {
  padding: 0.5rem 1rem;
  background: var(--teal);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.lang-toggle:hover { background: var(--navy); }

.lang-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  background: var(--white);
  border: 2px solid var(--teal);
  border-radius: 8px;
  min-width: 150px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .15);
  overflow: hidden;
  z-index: 10;
}

.lang-menu.open { display: block; }

.lang-option { display: block; width: 100%; padding: 0.7rem 1.1rem; background: none; border: none; text-align: left; text-decoration: none; font-size: 0.92rem; color: var(--ink); }
.lang-option:hover { background: var(--light); color: var(--teal); }
.lang-option.active { background: var(--teal); color: #fff; font-weight: 700; }

/* --- strona główna: sekcje pełnoekranowe ze scroll-snapem --- */
.scroller { padding-top: 80px; padding-bottom: 100px; scroll-snap-type: y mandatory; }

.section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.tone-splash { min-height: calc(100vh - 80px); background: linear-gradient(135deg, #ffffff 0%, #f0f8fc 100%); }

.section:nth-of-type(4n+2) { background: linear-gradient(135deg, #e8f4f8 0%, #f0f8fc 100%); }
.section:nth-of-type(4n+3) { background: linear-gradient(135deg, #f0f5e8 0%, #f8fcf0 100%); }
.section:nth-of-type(4n+4) { background: linear-gradient(135deg, #fef8f0 0%, #fffaf5 100%); }
.section:nth-of-type(4n+5) { background: linear-gradient(135deg, #eef6ff 0%, #f8fbff 100%); }

.section-inner { max-width: 1000px; width: 100%; text-align: center; }

.home-inner { display: flex; align-items: center; justify-content: center; }
.home-logo { width: min(80vw, 720px); height: auto; filter: drop-shadow(0 16px 40px rgba(0, 0, 0, .15)); }

.section-title {
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: 900;
  margin: 0 0 2rem;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--navy);
}

.section-image { margin: 2rem 0; min-height: 300px; display: flex; align-items: center; justify-content: center; }
.section-img { width: min(92vw, 820px); max-height: 380px; height: auto; object-fit: contain; filter: drop-shadow(0 10px 30px rgba(0, 0, 0, .1)); }

.section-body { max-width: 70ch; margin: 0 auto; text-align: left; }
.section-body h2, .section-body h3, .section-body h4 { color: var(--teal); margin: 1.75rem 0 0.5rem; }
.section-body h4:first-child { margin-top: 0; }
.section-body p { margin: 0 0 1rem; line-height: 1.8; }
.section-body ul { margin: 0 0 1rem; padding-left: 1.25rem; line-height: 1.8; }
.section-body a { color: var(--orange); font-weight: 600; text-decoration: underline; }
.section-body img { display: block; max-width: 100%; height: auto; border-radius: 12px; margin: 1.25rem auto; }
.section-body strong { color: var(--navy); }

/* --- burger w nagłówku (mobile/tablet - patrz @media max-width:1024px niżej) --- */
.header-burger {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 2.1rem;
  height: 2.1rem;
  flex-shrink: 0;
  border: none;
  background: none;
  cursor: pointer;
}
.header-burger .burger-line { display: block; width: 20px; height: 2px; background: var(--teal); margin: 2px 0; }

/* --- footer stały: pasek postępu + wskaźnik Femke + menu (desktop - patrz @media niżej) --- */
.footer-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #fff;
  border-top: 3px solid var(--teal);
  z-index: 1000;
  box-shadow: 0 -5px 20px rgba(0, 0, 0, .1);
}

.progress-wrapper { width: 100%; height: 6px; background: var(--light); }
.progress-bar { height: 100%; width: 0%; background: linear-gradient(90deg, var(--teal), var(--navy), var(--orange)); transition: width .1s linear; }

.nav-items { display: flex; flex-wrap: nowrap; padding: 0; margin: 0; list-style: none; position: relative; }

.femke-indicator { position: absolute; top: -34px; width: 40px; height: 40px; z-index: 3; pointer-events: none; transition: left .35s ease; left: 0; }
.femke-indicator img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0,0,0,.2)); }

.nav-item {
  flex: 1 1 0;
  padding: .72rem .5rem;
  text-decoration: none;
  font-size: clamp(.64rem, 1vw, .85rem);
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: all .3s ease;
  min-height: 52px;
}

.nav-item:hover, .nav-item.active { background: rgba(26,118,100,.1); color: var(--teal); }

/* .nav-items-mobile MUSI być zadeklarowane PO ogólnym .nav-items (wyżej) - obie klasy mają tę
   samą specyficzność (jedna klasa), więc o tym, czy element jest domyślnie flex czy none,
   decyduje wyłącznie kolejność w pliku. Zadeklarowane przed .nav-items, .nav-items (display:flex)
   zawsze by wygrywało i menu mobilne było stale rozwinięte, niezależnie od klasy .open. */
.nav-items-mobile {
  display: none;
  flex-direction: column;
  max-height: 72vh;
  overflow-y: auto;
  border-top: 1px solid rgba(26, 118, 100, .2);
}
.nav-items-mobile.open { display: flex; }
.nav-items-mobile .nav-item { justify-content: flex-start; text-align: left; border-bottom: 1px solid rgba(26, 118, 100, .08); }

/* Mobile + tablet (wszystko poniżej desktopa): menu jako burger w nagłówku zamiast rzędu w
   stopce, i wyraźnie mniejsze odstępy między elementami sekcji (mniej pustej przestrzeni przy
   przewijaniu na mniejszych ekranach). */
@media (max-width: 1024px) {
  .header-burger { display: flex; }
  .nav-items-desktop { display: none !important; }

  .section { padding: 1.5rem 1.25rem; }
  .section-title { margin-bottom: 1.1rem; }
  .section-image { margin: .75rem 0; min-height: 0; }
  .section-body p { margin-bottom: .75rem; }
}

@media (min-width: 1025px) {
  .nav-items-mobile { display: none !important; }
}

@media (max-width: 768px) {
  .bar { padding: .7rem 1rem; }
  .brand-logo { height: 36px; }
  .lang-toggle { padding: .4rem .7rem; font-size: .78rem; }
  .section { padding: 1rem 1rem; }
  .section-title { font-size: clamp(1.8rem, 6vw, 2.5rem); margin-bottom: .85rem; }
  .section-image { min-height: 0; margin: .5rem 0; }
  .section-img { max-height: 260px; }
}

/* --- osobne podstrony (page.html) --- */
.card { max-width: 760px; margin: 0 auto; padding: calc(80px + 2rem) 1.25rem 4rem; display: grid; gap: 2rem; }
.card.with-photo { max-width: 1080px; }

.photo { width: min(100%, 320px); margin: 0 auto; border-radius: 20px; overflow: hidden; background: #eef6ff; }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.about { max-width: 68ch; margin: 0 auto; }
.about h1 { margin: 0 0 1rem; font-size: clamp(2rem, 1.6rem + 1.5vw, 2.75rem); color: var(--navy); font-weight: 900; }

@media (min-width: 861px) {
  .card.with-photo { grid-template-columns: 38% 1fr; align-items: start; column-gap: 3rem; }
  .card.with-photo .photo { position: sticky; top: calc(80px + 1.5rem); }
}

/* --- blog --- */
.blog-wrap { max-width: 1080px; margin: 0 auto; padding: calc(80px + 2rem) 1.25rem 4rem; }
.blog-wrap h1 { color: var(--navy); font-weight: 900; }
.filter { margin: -0.5rem 0 1.5rem; color: var(--muted); font-size: .9rem; }
.filter .clear { margin-left: .5rem; color: var(--orange); font-weight: 700; text-decoration: none; }
.status { color: var(--muted); }

.grid { display: grid; grid-template-columns: 1fr; gap: 1.75rem; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid { grid-template-columns: repeat(3, 1fr); } }

.card2 { display: flex; flex-direction: column; text-decoration: none; color: inherit; background: var(--light); border-radius: 16px; overflow: hidden; transition: transform .2s ease, box-shadow .2s ease; }
.card2:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(0,0,0,.12); }
.thumb { aspect-ratio: 16/10; background: #eef6ff; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card2 .body { padding: 1.1rem 1.25rem 1.3rem; display: flex; flex-direction: column; gap: .4rem; }
.card2 .cats { margin: 0; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--orange); font-weight: 700; }
.card2 h2 { margin: 0; font-size: 1.25rem; color: var(--navy); }
.card2 .excerpt { margin: 0; font-size: .92rem; line-height: 1.5; }
.card2 .date { margin: .2rem 0 0; font-size: .8rem; color: var(--muted); }

.post-wrap { max-width: 760px; margin: 0 auto; padding: calc(80px + 2rem) 1.25rem 4rem; }
.back a { color: var(--muted); text-decoration: none; font-size: .9rem; }
.post-wrap h1 { color: var(--navy); font-weight: 900; }
.post-wrap .cats { margin: 0 0 .5rem; display: flex; gap: .5rem; flex-wrap: wrap; }
.post-wrap .cats a { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--orange); text-decoration: none; font-weight: 700; }
.post-wrap .date { margin: 0 0 1.5rem; font-size: .85rem; color: var(--muted); }
.hero { margin: 0 0 1.5rem; border-radius: 16px; overflow: hidden; }
.hero img { width: 100%; display: block; }
.tags { margin: 2rem 0 0; display: flex; gap: .6rem; flex-wrap: wrap; }
.tag { background: var(--light); border-radius: 999px; padding: .3rem .8rem; font-size: .82rem; color: var(--muted); text-decoration: none; }
