/* =========================================================
   Adriana Szulińska DIETETYK — arkusz stylów
   Mobile-first, bez zewnętrznych frameworków/CDN.
   ========================================================= */

:root {
  --color-primary: #e0115f;
  --color-primary-dark: #b10e4c;
  --color-primary-light: #fce8ef;
  --color-ink: #2b2230;
  --color-body: #4a4149;
  --color-muted: #8a8189;
  --color-bg: #ffffff;
  --color-bg-alt: #fff8fa;
  --color-border: #ecdfe3;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --radius-sm: 8px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 10px 30px rgba(224, 17, 95, 0.1);
  --shadow-sm: 0 2px 10px rgba(43, 34, 48, 0.06);
  --container: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-ink: #f5eef1;
    --color-body: #d9cdd3;
    --color-muted: #a99fa6;
    --color-bg: #201a22;
    --color-bg-alt: #2a222c;
    --color-border: #3a2e34;
    --color-primary-light: #3a1f2b;
  }
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  /* Rezerwuje stałe miejsce na pasek przewijania, żeby krótsze strony
     (np. pusty wynik filtra) nie powodowały przesunięcia treści w bok. */
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-body);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  color: var(--color-ink);
  line-height: 1.25;
  font-weight: 700;
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(2rem, 4vw + 1rem, 3rem); }
h2 { font-size: clamp(1.5rem, 2.5vw + 1rem, 2.1rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; }

a { color: var(--color-primary); text-decoration: underline; text-decoration-thickness: 1px; }
a:hover { color: var(--color-primary-dark); }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* Skip link (dostępność) */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-primary);
  color: #fff;
  padding: 12px 18px;
  z-index: 1000;
  border-radius: 0 0 var(--radius-sm) 0;
  text-decoration: none;
}
.skip-link:focus {
  left: 0;
}

:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

/* ---------- Nagłówek / nawigacja ---------- */
.site-header {
  border-bottom: 1px solid var(--color-border);
  background: var(--color-primary-light);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  max-width: var(--container);
  margin: 0 auto;
}
.brand {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--color-ink);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.brand span { color: var(--color-primary); }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(43, 34, 48, 0.18);
  border-radius: var(--radius-sm);
  background: none;
  cursor: pointer;
}
.nav-toggle svg { width: 22px; height: 22px; }

.main-nav {
  display: none;
  flex-direction: column;
  width: 100%;
  gap: 4px;
  padding: 10px 20px 20px;
  border-top: 1px solid var(--color-border);
}
.main-nav.is-open { display: flex; }
.main-nav a {
  display: block;
  padding: 10px 6px;
  color: var(--color-ink);
  text-decoration: none;
  font-weight: 600;
  border-radius: var(--radius-sm);
}
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--color-primary-dark); background: var(--color-bg); }
.main-nav a.btn:hover { color: #fff; background: var(--color-primary-dark); transform: none; }
.main-nav .btn { margin-top: 6px; border-width: 0; color: #fff; }

@media (min-width: 860px) {
  .nav-toggle { display: none; }
  .main-nav {
    display: flex;
    flex-direction: row;
    width: auto;
    align-items: center;
    padding: 0;
    border-top: none;
    gap: 6px;
  }
  .main-nav a { padding: 8px 12px; }
  .main-nav .btn { margin-top: 0; }
}

/* ---------- Przyciski ---------- */
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid var(--color-primary);
  cursor: pointer;
  font-size: 1rem;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { background: var(--color-primary-dark); border-color: var(--color-primary-dark); color: #fff; transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  color: var(--color-primary);
}
.btn-outline:hover { background: var(--color-primary-light); color: var(--color-primary-dark); }
.btn-sm { padding: 8px 16px; font-size: 0.9rem; }
.btn-danger { background: #a4133c; border-color: #a4133c; }
.btn-danger:hover { background: #7f0e2f; border-color: #7f0e2f; }

/* ---------- Sekcje / karty ---------- */
.section { padding-top: 56px; padding-bottom: 56px; }
.section-alt { background: var(--color-bg-alt); }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--color-primary);
  font-size: 0.85rem;
}

.hero {
  padding-top: 56px;
  padding-bottom: 40px;
  display: grid;
  gap: 32px;
  align-items: start;
}
.hero__photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.hero__sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.hero__card {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 22px 24px;
}
.hero__card h3 { margin-bottom: 12px; font-size: 1.05rem; }
.hero__card-location { margin-bottom: 14px; font-size: 0.92rem; line-height: 1.45; }
.hero__card-location:last-of-type { margin-bottom: 16px; }
.hero__card .card__link { font-size: 0.92rem; }
@media (min-width: 860px) {
  .hero { grid-template-columns: 3fr 1fr; padding-top: 56px; padding-bottom: 64px; }
  .hero__sidebar { position: sticky; top: 96px; }
}

.card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  height: 100%;
}
.card img { aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.card__body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card__tag {
  align-self: flex-start;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-primary);
  background: var(--color-primary-light);
  padding: 4px 10px;
  border-radius: 999px;
}
.card h3 { margin: 4px 0 0; font-size: 1.15rem; }
.card p { color: var(--color-muted); font-size: 0.95rem; margin-bottom: 6px; }
.card__link { margin-top: auto; font-weight: 700; text-decoration: none; }

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

/* ---------- Filtry listy ---------- */
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 28px; }
.filters a {
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  color: var(--color-ink);
  font-weight: 600;
  font-size: 0.9rem;
}
.filters a[aria-current="true"], .filters a:hover { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }

/* ---------- Treść artykułu / strony ---------- */
.prose { max-width: 760px; margin-left: auto; margin-right: auto; }
.prose--wide { max-width: none; }
.prose h2 { margin-top: 1.4em; }
.prose h3 { margin-top: 1.2em; }
.prose img { border-radius: var(--radius); margin: 1.2em 0; box-shadow: var(--shadow-sm); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose blockquote {
  margin: 1.5em 0;
  padding: 4px 20px;
  border-left: 4px solid var(--color-primary);
  color: var(--color-ink);
  font-style: italic;
  background: var(--color-bg-alt);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
/* Edytor Quill nie potrafi zachować listy zagnieżdżonej w cytacie (blockquote > ul)
   i przy zapisie po cichu usuwa opakowujący blockquote - dlatego pierwsza lista na
   stronie głównej dostaje to samo wyróżnienie także bez blockquote, niezależnie od tego. */
.hero__text .prose > ul:first-child {
  margin: 1.5em 0;
  padding: 12px 20px;
  border-left: 4px solid var(--color-primary);
  background: var(--color-bg-alt);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  list-style-position: inside;
}
.prose table { width: 100%; border-collapse: collapse; margin: 1.2em 0; }
.prose td, .prose th { border: 1px solid var(--color-border); padding: 8px 10px; text-align: left; }

.post-meta { color: var(--color-muted); font-size: 0.9rem; margin-bottom: 1.5em; }
.post-cover { width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow); margin-bottom: 2rem; aspect-ratio: 16/9; object-fit: cover; }

.recipe-facts {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin: 1.5em 0;
  padding: 16px 20px;
  background: var(--color-bg-alt);
  border-radius: var(--radius);
}
.recipe-facts div { font-size: 0.9rem; color: var(--color-muted); }
.recipe-facts strong { display: block; color: var(--color-ink); font-size: 1rem; }

/* ---------- Galeria / lightbox (Kwalifikacje) ---------- */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 1.5em 0; }
@media (min-width: 640px) { .gallery { grid-template-columns: repeat(3, 1fr); } }
.gallery img { aspect-ratio: 3/4; object-fit: cover; border-radius: var(--radius-sm); cursor: zoom-in; box-shadow: var(--shadow-sm); }

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 12, 16, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
}
.lightbox.is-open { display: flex; }
.lightbox img { max-height: 90vh; max-width: 90vw; border-radius: var(--radius-sm); }
.lightbox__close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: #fff;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.4rem;
  cursor: pointer;
}

/* ---------- Formularze ---------- */
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; color: var(--color-ink); }
.field .hint { font-size: 0.85rem; color: var(--color-muted); margin-top: 4px; }
input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="password"], input[type="url"], textarea, select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  background: var(--color-bg);
  color: var(--color-ink);
}
textarea { min-height: 140px; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--color-primary); }
.checkbox-field { display: flex; align-items: flex-start; gap: 10px; }
.checkbox-field input { width: auto; margin-top: 4px; }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-weight: 600;
}
.alert-success { background: #e4f6ea; color: #1c6b3c; }
.alert-error { background: #fdeaea; color: #a4133c; }
.alert ul { margin: 6px 0 0; padding-left: 1.2em; font-weight: 500; }

/* ---------- Gabinety / lokalizacje ---------- */
.location-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px 22px;
  background: var(--color-bg);
}
.location-card h3 { margin-bottom: 6px; }
.location-card a { font-weight: 700; }

/* ---------- Stopka ---------- */
.site-footer {
  background: var(--color-ink);
  color: #eadde2;
  padding: 48px 0 28px;
  margin-top: 64px;
}
.site-footer a { color: #f6c9da; }
.site-footer .grid { margin-bottom: 24px; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 10px; }
.site-footer .legal { font-size: 0.85rem; color: #c9b9c1; border-top: 1px solid #40323a; padding-top: 20px; }
.site-footer .legal p { margin: 0 0 6px; }
.footer-location { margin-bottom: 16px; }
.footer-location:last-child { margin-bottom: 0; }

/* ---------- Baner cookies ---------- */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-ink);
  color: #f2e8ec;
  padding: 18px 20px;
  z-index: 999;
  display: none;
}
.cookie-banner.is-visible { display: block; }
.cookie-banner__inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}
.cookie-banner a { color: #f6c9da; }
.cookie-banner p { margin: 0; font-size: 0.9rem; max-width: 640px; }

/* ---------- 404 ---------- */
.error-page { text-align: center; padding-top: 100px; padding-bottom: 100px; }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  min-width: 0; min-height: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
