/* Strona publiczna. Bez zewnętrznych fontów i bibliotek — szybkie ładowanie i brak wycieku danych do stron trzecich. */

/* Kolory, czcionki i zaokrąglenia (zmienne CSS) są w theme.css — wspólnym dla strony i panelu administratora. */

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--primary-dark); text-underline-offset: 3px; }
a:hover { color: var(--primary); }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--serif); line-height: 1.2; font-weight: 600; margin: 0 0 0.6em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 4.5vw + 0.5rem, 3.1rem); }
h2 { font-size: clamp(1.5rem, 2vw + 1rem, 2.1rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

.skip-link {
  position: absolute; left: -9999px; top: 8px; z-index: 100;
  background: var(--primary-dark); color: #fff; padding: 10px 16px; border-radius: 8px;
}
.skip-link:focus { left: 8px; }

.container { width: min(1120px, 100% - 40px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 40px); }
.center { text-align: center; }
.muted { color: var(--muted); }
.plain { list-style: none; padding: 0; margin: 0; }
.plain li { margin: 0 0 0.35em; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.8rem; font-weight: 700; color: var(--primary); margin-bottom: 0.8em; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 40em; }
.meta { color: var(--muted); font-size: 0.92rem; margin-bottom: 0.4em; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }

/* ---- Nagłówek ---- */
.site-header { background: var(--header-bg); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; flex-wrap: wrap; }
.brand { text-decoration: none; color: var(--ink); display: flex; flex-direction: row; align-items: center; gap: 12px; line-height: 1.2; }
.brand-logo { height: 44px; width: auto; max-width: 220px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; }
.brand-tagline { font-size: 0.82rem; color: var(--muted); }
.main-nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.main-nav a:not(.btn) { color: var(--ink); text-decoration: none; padding: 8px 12px; border-radius: 999px; font-weight: 500; }
.main-nav a:not(.btn):hover { background: var(--soft); }
.main-nav a[aria-current="page"]:not(.btn) { background: var(--soft); color: var(--primary-dark); }

/* ---- Przyciski ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; border-radius: 999px; border: 2px solid var(--primary);
  background: var(--primary); color: #fff; font: 600 1rem/1.2 var(--font);
  text-decoration: none; cursor: pointer; transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
}
.btn:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; box-shadow: none; }
.btn-small { padding: 9px 18px; font-size: 0.95rem; }
.btn-ghost { background: transparent; color: var(--primary-dark); }
.btn-ghost:hover { background: var(--soft); color: var(--primary-dark); box-shadow: none; }
.btn-light { background: #fff; color: var(--primary-dark); border-color: #fff; }
.btn-light:hover { background: var(--soft); color: var(--primary-dark); border-color: var(--soft); }
.btn-danger { background: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: #8b2e20; border-color: #8b2e20; }

/* ---- Hero ---- */
.hero { padding: clamp(40px, 7vw, 88px) 0 clamp(32px, 5vw, 64px); background: radial-gradient(1100px 420px at 85% -10%, var(--soft) 0%, transparent 70%); }
.hero-grid { display: grid; gap: 36px; align-items: center; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 28px 28px 120px 28px; box-shadow: var(--shadow); background: var(--soft); }
@media (min-width: 860px) {
  .hero-grid { grid-template-columns: 1.25fr 0.75fr; gap: 64px; }
  .hero-grid:not(:has(.hero-photo)) { grid-template-columns: 1fr; }
}

/* ---- Sekcje ---- */
.section { padding: clamp(40px, 6vw, 80px) 0; }
.section-soft { background: var(--soft); }
.section-lead { color: var(--muted); margin-top: -0.2em; margin-bottom: 1.6em; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 1.2em; }
.section-head h2 { margin: 0; }
.page-head { padding: clamp(28px, 5vw, 56px) 0 8px; }
.breadcrumbs { font-size: 0.9rem; color: var(--muted); margin-bottom: 1.2em; }
.breadcrumbs a { color: var(--muted); }

.card-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: flex-start; }
.card h3 { margin-bottom: 0.3em; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--primary); text-decoration: underline; }
.card .btn { margin-top: auto; }
.read-more { margin-top: auto; font-weight: 600; text-decoration: none; }
.post-card { padding: 0 0 22px; overflow: hidden; }
.post-card > :not(.post-cover) { margin-inline: 24px; }
.post-card .meta { margin-top: 20px; }
.post-cover { display: block; width: 100%; }
.post-cover img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }

/* ---- Treść (Trix) ---- */
.prose { font-size: 1.08rem; }
/* Trix zapisuje każdy wiersz jako <div>, a odstęp między akapitami jako pusty <div><br></div> — więc dla <div> margines zerujemy. */
.prose > div { margin: 0; }
.prose p { margin: 0 0 1em; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose blockquote { margin: 1.4em 0; padding: 0.4em 1.2em; border-left: 4px solid var(--accent); color: var(--muted); font-family: var(--serif); font-size: 1.15em; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1em; }
.prose li { margin-bottom: 0.3em; }
.prose pre { background: var(--soft); padding: 14px 16px; border-radius: 10px; overflow-x: auto; font-size: 0.92em; }
.prose a { font-weight: 500; }
.prose figure { margin: 1.4em 0; }
.prose figure img { margin-inline: auto; border-radius: var(--radius); }
.prose figcaption { margin-top: 0.5em; text-align: center; font-size: 0.9em; color: var(--muted); }

.article-head { margin-bottom: 1.4em; }
.article-head h1 { margin-bottom: 0.3em; }
.article-cover { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); margin-bottom: 1.6em; background: var(--soft); }

.pagination { display: flex; justify-content: center; align-items: center; gap: 20px; margin-top: 40px; color: var(--muted); }

.cta-band { background: var(--primary-dark); color: #fff; padding: clamp(40px, 6vw, 72px) 0; text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band p { max-width: 36em; margin-inline: auto; color: rgba(255, 255, 255, 0.88); }
.cta-box { text-align: center; }

.notice { background: var(--ok-bg); border: 1px solid var(--soft-strong); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 20px; }
.notice p:last-child { margin-bottom: 0; }
.notice-warn { background: #fff3d6; border-color: #f0dca0; border-radius: 0; margin: 0; padding: 10px 0; text-align: center; }

/* ---- Stopka ---- */
.site-footer { background: var(--footer-bg); color: rgba(255, 255, 255, 0.82); padding: 48px 0 24px; margin-top: 0; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; gap: 28px; }
.footer-title { font-family: var(--serif); font-size: 1.1rem; color: #fff; margin: 0 0 0.6em; }
.footer-bottom { margin-top: 32px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, 0.12); font-size: 0.88rem; color: rgba(255, 255, 255, 0.62); }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.2fr 1fr 1fr; } }

/* ---- Formularze ---- */
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; }
.field input:not([type="checkbox"]), .field textarea, .field select {
  width: 100%; padding: 12px 14px; font: inherit; color: inherit; background: #fff;
  border: 1.5px solid var(--line-strong); border-radius: 10px;
}
.field input:focus, .field textarea:focus { border-color: var(--primary); outline: 3px solid var(--soft-strong); outline-offset: 0; }
.hint { color: var(--muted); font-size: 0.9rem; margin: 6px 0 0; }
.field-check { display: flex; gap: 12px; align-items: flex-start; }
.field-check input { margin-top: 5px; width: 20px; height: 20px; flex: none; accent-color: var(--primary); }
.field-check label { font-weight: 400; margin: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; margin-top: 24px; }
.alert { padding: 14px 18px; border-radius: 10px; margin-bottom: 20px; }
.alert-error { background: var(--danger-bg); color: #7d2616; border: 1px solid #f0c1b8; }

/* ---- Kreator rezerwacji ---- */
.wizard { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: clamp(18px, 4vw, 36px); box-shadow: var(--shadow); }
.steps { display: flex; gap: 8px; list-style: none; padding: 0; margin: 0 0 28px; counter-reset: step; }
.steps li { flex: 1; text-align: center; font-size: 0.85rem; color: var(--muted); padding-top: 34px; position: relative; counter-increment: step; }
.steps li::before {
  content: counter(step); position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 26px; height: 26px; border-radius: 50%; background: var(--soft); color: var(--muted);
  display: grid; place-items: center; font-weight: 700; font-size: 0.85rem;
}
.steps li.is-active { color: var(--ink); font-weight: 600; }
.steps li.is-active::before { background: var(--primary); color: #fff; }
.steps li.is-done::before { content: "✓"; background: var(--primary-dark); color: #fff; }
.wizard h2 { font-size: 1.4rem; }
.wizard h2:focus { outline: none; }

.type-list { display: grid; gap: 12px; }
.type-option { text-align: left; background: #fff; border: 2px solid var(--line); border-radius: 14px; padding: 16px 20px; cursor: pointer; font: inherit; color: inherit; display: grid; gap: 2px; transition: border-color 0.15s, background 0.15s; }
.type-option:hover { border-color: var(--primary); background: var(--soft); }
.type-name { font-weight: 700; font-size: 1.08rem; }
.type-meta { color: var(--primary-dark); font-weight: 600; font-size: 0.92rem; }
.type-desc { color: var(--muted); font-size: 0.95rem; }

.calendar { max-width: 420px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-size: 1.05rem; text-transform: capitalize; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--line); background: #fff; font-size: 1.4rem; line-height: 1; cursor: pointer; color: var(--ink); }
.icon-btn:hover:not(:disabled) { background: var(--soft); }
.icon-btn:disabled { opacity: 0.35; cursor: default; }
.cal-dow, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal-dow { font-size: 0.78rem; color: var(--muted); margin-bottom: 4px; font-weight: 600; }
.cal-day { aspect-ratio: 1; border: 0; border-radius: 50%; background: transparent; font: inherit; color: var(--day-off); cursor: default; }
.cal-day.is-available { background: var(--soft); color: var(--ink); font-weight: 700; cursor: pointer; }
.cal-day.is-available:hover { background: var(--soft-strong); }
.cal-day.is-selected, .cal-day.is-selected:hover { background: var(--primary); color: #fff; }
.slots { margin-top: 22px; min-height: 2em; color: var(--muted); }
.slots h3 { color: var(--ink); font-size: 1.1rem; font-family: var(--font); font-weight: 700; }
.slot-list { display: flex; flex-wrap: wrap; gap: 10px; }
.slot { padding: 10px 18px; border-radius: 999px; border: 2px solid var(--primary); background: #fff; color: var(--primary-dark); font: 700 1rem var(--font); cursor: pointer; }
.slot:hover, .slot:focus-visible { background: var(--primary); color: #fff; }

.summary { background: var(--soft); border-radius: 10px; padding: 12px 16px; font-weight: 600; margin-bottom: 20px; }
.code-input { font-size: 2rem !important; letter-spacing: 0.5em; text-align: center; max-width: 12em; font-variant-numeric: tabular-nums; }
.success { text-align: center; padding: 8px 0; }
.success .summary { display: inline-block; }

@media (max-width: 640px) {
  /* Na telefonie przyklejony nagłówek zabierałby ok. 15% ekranu. */
  .site-header { position: static; }
}

@media (max-width: 520px) {
  .steps li { font-size: 0.74rem; }
  .actions .btn { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
