/* ============================================================
   Sprawdź Psychoterapeutę — style
   Paleta: #faf2ea (tło) · #0a2a48 (główny) · #b7daf6 (akcent)
          · szary (tekst) · #e7f2fb (sekcje)
   ============================================================ */

:root {
  --bg: #faf2ea;
  --primary: #0a2a48;
  --primary-hover: #123c63;
  --accent: #b7daf6;
  --accent-soft: #e7f2fb;
  --card: #ffffff;
  --ink: #3b3f46;
  --ink-soft: #6b7078;
  --line: #d8e5f0;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(10, 42, 72, 0.10);
  --shadow-sm: 0 3px 12px rgba(10, 42, 72, 0.08);
  --maxw: 1100px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Manrope", "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}
.container-narrow { max-width: 760px; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 242, 234, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(10, 42, 72, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--primary);
}

.brand-icon {
  flex-shrink: 0;
  border-radius: 6px;
}

.brand-name {
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}
.brand-name span { color: #4a7fb5; }

.site-nav { display: flex; gap: 28px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.nav-toggle:hover { border-color: var(--primary); }
.nav-toggle:focus-visible { outline: 3px solid rgba(183, 218, 246, 0.9); outline-offset: 2px; }

.nav-icon { display: flex; flex-direction: column; gap: 4px; }
.nav-icon span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--primary);
  transition: transform 0.2s, opacity 0.2s;
}
.nav-toggle.nav-open .nav-icon span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.nav-open .nav-icon span:nth-child(2) { opacity: 0; }
.nav-toggle.nav-open .nav-icon span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.site-nav a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.site-nav a:hover { color: var(--primary); border-bottom-color: var(--accent); }

/* ---------- Hero + wyszukiwarka ---------- */

.hero {
  padding: 72px 0 64px;
  background:
    radial-gradient(600px 300px at 85% 0%, rgba(183, 218, 246, 0.35), transparent 70%),
    radial-gradient(500px 260px at 0% 100%, rgba(183, 218, 246, 0.25), transparent 70%);
}

.hero-copy {
  max-width: 640px;
  margin: 0 auto 36px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(1.9rem, 4.2vw, 2.9rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--primary);
  font-weight: 800;
}
.hero-sub {
  margin-top: 16px;
  font-size: 1.05rem;
  color: var(--ink-soft);
}

/* Wariant kompaktowy — strony informacyjne (tylko tytuł) */
.hero-compact { padding: 40px 0 16px; }
.hero-compact .hero-copy { margin-bottom: 0; }

.search-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  border: 1px solid var(--line);
  max-width: 720px;
  margin: 0 auto;
}

.search-grid {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 18px;
  align-items: end;
}
.field-wide { grid-column: 1 / -1; }

.search-submit {
  white-space: nowrap;
  justify-self: end;
  padding: 12px 20px;
}

.field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  margin-bottom: 7px;
}

.field input,
.field select {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: #f6f9fc;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.field input::placeholder { color: #a3a9b3; }

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(183, 218, 246, 0.55);
}

.search-source {
  text-align: center;
  margin-top: 20px;
  font-size: 0.88rem;
  color: var(--ink-soft);
}
.search-source a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.search-source a:hover { color: var(--primary-hover); }

/* ---------- Przyciski ---------- */

.btn {
  font: inherit;
  font-weight: 700;
  border: none;
  border-radius: 10px;
  padding: 13px 28px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.1s, box-shadow 0.2s;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--primary-hover); box-shadow: var(--shadow); }

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-outline:hover { background: var(--accent); }

.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  padding: 8px 12px;
}
.btn-ghost:hover { color: var(--primary); }

/* ---------- Wyniki ---------- */

.results { padding: 56px 0; }

.results-head {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.results-count {
  font-weight: 700;
  color: var(--primary);
  background: var(--accent);
  padding: 3px 14px;
  border-radius: 999px;
  font-size: 0.9rem;
}

.results-list { list-style: none; display: grid; gap: 14px; }

.result-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
}
.result-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }

.result-body { flex: 1; min-width: 0; }

.result-name {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.01em;
}

.result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 6px;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.result-meta .meta-item { display: inline-flex; align-items: center; gap: 6px; }
.result-meta svg { color: #4a7fb5; flex-shrink: 0; }

.source-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  color: #4a7fb5;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  transition: background 0.2s, color 0.2s;
}
.source-icon:hover {
  color: var(--primary);
  background: var(--accent);
}

.result-badges { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex-shrink: 0; }

.result-typs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.result-typs .badge { font-size: 0.75rem; }

.badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--primary);
  border: 1px solid var(--accent);
  white-space: nowrap;
}
.badge-cert { background: var(--primary); color: #fff; border-color: var(--primary); }

.no-results {
  text-align: center;
  background: var(--card);
  border: 1.5px dashed var(--accent);
  border-radius: var(--radius);
  padding: 48px 24px;
  color: var(--ink-soft);
}
.no-results strong { display: block; color: var(--primary); font-size: 1.1rem; margin-bottom: 8px; }

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 28px;
}

.page-info {
  font-weight: 800;
  color: var(--primary);
  font-size: 0.95rem;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

/* ---------- Statystyki ---------- */

.stats {
  background: var(--accent-soft);
  padding: 64px 0;
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--primary);
  text-align: center;
}
.section-sub {
  margin-top: 8px;
  color: var(--ink-soft);
  text-align: center;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 36px;
}

.stat-card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.stat-value {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.stat-label {
  margin-top: 6px;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--ink);
}

.stat-note {
  margin-top: 4px;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

/* ---------- Obecny stan prawny ---------- */

.legal {
  background: var(--accent-soft);
  padding: 64px 0 80px;
}
.legal .section-sub { margin-bottom: 36px; }

.legal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.legal-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 32px 24px 26px;
  text-decoration: none;
  transition: box-shadow 0.2s, transform 0.2s;
}
.legal-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.legal-card:focus-visible { outline: 3px solid rgba(183, 218, 246, 0.9); outline-offset: 2px; }

.legal-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  color: #4a7fb5;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  margin-bottom: 6px;
}

.legal-card h3 {
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.4;
  color: var(--primary);
}

.legal-domain {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-soft);
}

/* strzałka "link zewnętrzny" w rogu */
.legal-ext {
  position: absolute;
  top: 14px;
  right: 14px;
  color: #a3b8cc;
  transition: color 0.2s, transform 0.2s;
}
.legal-card:hover .legal-ext {
  color: var(--primary);
  transform: translate(2px, -2px);
}

/* ---------- FAQ (akordeon) ---------- */

.faq { padding: 64px 0 80px; }
.faq .section-title { margin-bottom: 28px; }

.faq-group { margin-bottom: 32px; }
.faq-group:last-child { margin-bottom: 0; }

.faq-group-title {
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  margin-bottom: 14px;
}

.faq-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  font-size: 1rem;
  font-weight: 800;
  color: var(--primary);
  transition: background 0.2s;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { background: var(--accent-soft); }

.faq-item summary::after {
  content: "+";
  flex-shrink: 0;
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1;
  color: #4a7fb5;
  transition: transform 0.2s;
}
.faq-item[open] summary::after { transform: rotate(45deg); }

.faq-answer {
  padding: 16px 24px 20px;
  border-top: 1px solid var(--line);
}
.faq-answer p {
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.faq-answer p + p { margin-top: 12px; }

.faq-cta {
  margin-top: 32px;
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}
.faq-cta a {
  color: var(--primary);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.faq-cta a:hover { color: var(--primary-hover); }

/* Wariant FAQ jako osobnej strony (faq.html) — bliżej kompaktowego hero */
.faq-page { padding-top: 24px; }

/* ---------- "Po co to?" (strona główna) ---------- */

.about { padding: 64px 0 80px; }
.about .section-title { margin-bottom: 8px; }
.about .section-sub { margin-bottom: 36px; }

.about-faq-link {
  margin-top: 22px;
  text-align: center;
  font-weight: 700;
  color: var(--primary);
}
.about-faq-link a {
  color: var(--primary);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.about-faq-link a:hover { color: var(--primary-hover); }

/* ---------- Oś czasu (sekcja "Po co to?") ---------- */

.timeline {
  list-style: none;
  position: relative;
  max-width: 880px;
  margin: 0 auto;
  padding: 8px 0;
}
/* pionowa linia po lewej */
.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 6px;
  width: 2px;
  background: var(--line);
}

.timeline-item {
  position: relative;
  padding: 0 0 44px 40px;
}
.timeline-item:last-child { padding-bottom: 8px; }

/* niebieski kwadrat zakotwiczony w linii */
.timeline-item::before {
  content: "";
  position: absolute;
  top: 24px;
  left: 1px;
  width: 12px;
  height: 12px;
  background: #4a7fb5;
}

.timeline-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px 24px;
}
.timeline-card p {
  color: var(--ink);
  font-size: 0.95rem;
}

/* ---------- Proza / strony informacyjne ---------- */

.prose { padding: 24px 0 80px; }

.prose-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px 40px;
  box-shadow: var(--shadow-sm);
}

.prose-card > p {
  color: var(--ink);
  font-size: 1rem;
  margin-bottom: 18px;
}
.prose-card > p:last-child { margin-bottom: 0; }

.prose-card h3 {
  color: var(--primary);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 34px 0 12px;
}
.prose-card h3:first-child { margin-top: 0; }

.contact-cta {
  font-weight: 700;
  color: var(--primary);
}
.contact-cta a {
  color: var(--primary);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.contact-cta a:hover { color: var(--primary-hover); }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--primary);
  color: #cfe1f2;
  padding: 40px 0;
}
.footer-inner { display: grid; gap: 10px; }
.footer-brand { font-weight: 800; color: #fff; font-size: 1.05rem; }
.footer-note { font-size: 0.85rem; max-width: 560px; }
.footer-contact { font-size: 0.85rem; }
.footer-contact a {
  color: #b7daf6;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.footer-contact a:hover { color: #fff; }
.footer-copy { font-size: 0.8rem; color: #8fb3d1; margin-top: 8px; }
.footer-copy a { color: #b7daf6; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Responsywność ---------- */

@media (max-width: 860px) {
  .search-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .legal-grid { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
}

/* Tablet / mały ekran: nawigacja jako menu rozwijane (hamburger) */
@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    gap: 2px;
    padding: 10px 16px 16px;
    background: var(--bg);
    border-bottom: 1px solid rgba(10, 42, 72, 0.12);
    box-shadow: var(--shadow);
  }
  .site-nav.nav-open { display: flex; }
  .site-nav a {
    padding: 11px 10px;
    border-bottom: none;
    border-radius: 10px;
    font-size: 1rem;
  }
  .site-nav a:hover { background: var(--accent-soft); border-bottom: none; }
}

@media (max-width: 600px) {
  .container { padding: 0 16px; }

  .header-inner { height: 60px; }
  .brand-icon { width: 24px; height: 24px; }
  .brand-name { font-size: 1rem; }

  .hero { padding: 44px 0 36px; }
  .hero-sub { font-size: 0.98rem; }
  .hero-compact { padding: 32px 0 12px; }

  .search-card { padding: 20px 16px; }
  .search-grid { grid-template-columns: 1fr; gap: 14px; }
  .field-wide { grid-column: auto; }
  .search-source { font-size: 0.82rem; }

  .btn { padding: 12px 20px; }
  .btn-primary { width: 100%; }

  .results { padding: 40px 0; }
  .results-head { flex-direction: column; align-items: flex-start; gap: 10px; margin-bottom: 18px; }
  .results-count { font-size: 0.85rem; }

  .result-card { flex-direction: column; align-items: flex-start; gap: 12px; padding: 16px; }
  .result-name { font-size: 1.05rem; }
  .result-meta { gap: 6px 14px; font-size: 0.85rem; }
  .result-badges {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
    gap: 6px 10px;
  }

  .pagination { flex-wrap: wrap; gap: 10px; }
  .pagination .btn-outline { width: 100%; }

  .stats { padding: 44px 0; }
  .legal { padding: 44px 0 56px; }
  .legal-grid { max-width: 100%; }
  .legal-card { padding: 26px 18px 22px; }

  .stats-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat-card { padding: 20px 14px; }

  .faq { padding: 44px 0 56px; }
  .faq .section-title { margin-bottom: 20px; }
  .faq-item summary { padding: 15px 16px; font-size: 0.95rem; }
  .faq-answer { padding: 14px 16px 18px; }
  .faq-answer p { font-size: 0.9rem; }

  .about { padding: 44px 0 56px; }
  .timeline-item { padding: 0 0 30px 40px; }
  .timeline-card { padding: 16px 18px; }

  .prose { padding: 16px 0 56px; }
  .prose-card { padding: 24px 18px; }
  .prose-card h3 { margin: 26px 0 10px; }

  .site-footer { padding: 30px 0; }
}

/* Drobne ekrany */
@media (max-width: 380px) {
  .stats-grid { grid-template-columns: 1fr; }
  .stat-card { padding: 18px 14px; }
}
