/*
Theme Name: Good Place Therapy
Theme URI: https://goodplacetherapy-lublin.pl
Author: Good Place Therapy
Description: Motyw GoodPlaceTherapy
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: goodplacetherapy
*/

:root {
  --bg: #FFF8EF;
  --text: #343638;
  --muted: #5b5f63;
  --line: #D8E9EE;
  --navy: #23384A;
  --accent: #FF6B35;
  --accent-dark: #C84A18;
  --sun: #FFD166;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a { color: var(--navy); text-decoration-color: var(--accent); }
a:hover { color: var(--accent-dark); text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

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

.screen-reader-text {
  position: absolute !important;
  clip: rect(1px, 1px, 1px, 1px);
  width: 1px; height: 1px; overflow: hidden;
}

/* ---------- Nagłówek ---------- */
.site-header {
  width: 100%;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 50;
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  max-width: 1040px;
  margin: 0 auto;
  padding: 20px;
}

.site-title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: var(--navy);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.site-title:hover { color: var(--navy); }

/* Menu */
.site-nav ul {
  display: flex;
  align-items: center;
  gap: 4px 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav li { position: relative; }

.site-nav a {
  display: block;
  padding: 6px 0;
  color: var(--muted);
  font-size: 0.97rem;
  text-decoration: none;
  background: linear-gradient(var(--accent), var(--accent)) no-repeat 0 100% / 0 2px;
  transition: color .2s, background-size .25s;
}
.site-nav a:hover,
.site-nav .current-menu-item > a,
.site-nav .current-menu-ancestor > a {
  color: var(--navy);
  background-size: 100% 2px;
}

/* Strzałka przy pozycjach z podmenu */
.site-nav .menu-item-has-children > a::after {
  content: "";
  display: inline-block;
  width: 5px; height: 5px;
  margin: 0 0 3px 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
}

/* Rozwijane podmenu (komputer) */
.site-nav .sub-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: -18px;
  min-width: 240px;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 8px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(35, 56, 74, 0.10);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .2s, transform .2s, visibility .2s;
}
/* niewidzialny mostek, żeby menu nie znikało przy przejeździe myszką */
.site-nav .sub-menu::before {
  content: "";
  position: absolute;
  top: -14px; left: 0; right: 0;
  height: 14px;
}
.site-nav li:hover > .sub-menu,
.site-nav li:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.site-nav .sub-menu a {
  padding: 10px 14px;
  border-radius: 8px;
  background: none;
  white-space: nowrap;
}
.site-nav .sub-menu a:hover,
.site-nav .sub-menu .current-menu-item > a {
  background: var(--line);
  color: var(--navy);
}

/* Przycisk menu (telefon) */
.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  padding: 0;
  background: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 20px; height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform .25s, background .25s;
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before,
.nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after  { top: 6px; }
.nav-toggle.is-open .nav-toggle-bars { background: transparent; }
.nav-toggle.is-open .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle.is-open .nav-toggle-bars::after  { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 760px) {
  .site-header-inner { flex-wrap: wrap; padding: 14px 20px; }
  .nav-toggle { display: inline-flex; }

  .site-nav { display: none; width: 100%; padding: 8px 0 12px; }
  .site-nav.is-open { display: block; }

  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav a { padding: 12px 0; background: none; border-bottom: 1px solid var(--line); }
  .site-nav .menu-item-has-children > a::after { display: none; }

  .site-nav .sub-menu {
    position: static;
    opacity: 1; visibility: visible; transform: none;
    min-width: 0;
    padding: 0 0 0 16px;
    border: 0; border-radius: 0;
    box-shadow: none;
    background: none;
  }
  .site-nav .sub-menu::before { display: none; }
  .site-nav .sub-menu a { padding: 10px 0; border-radius: 0; }
}

/* ---------- Strona główna ---------- */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
}
.hero h1 {
  margin: 0 0 12px;
  font-family: var(--font-serif);
  font-size: clamp(2.25rem, 7vw, 4rem);
  font-weight: normal;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--navy);
}
.hero p {
  margin: 0;
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  color: var(--muted);
}

/* ---------- Treść ---------- */
.site-main {
  flex: 1;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 20px;
}
.entry-title {
  margin: 0 0 24px;
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: normal;
  line-height: 1.2;
  color: var(--navy);
}
.page .entry-title { display: none; }

.entry-meta { margin: -12px 0 24px; color: var(--muted); font-size: 0.9rem; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content h2, .entry-content h3 {
  font-family: var(--font-serif);
  font-weight: normal;
  line-height: 1.3;
  color: var(--navy);
}

.post-list { list-style: none; margin: 0; padding: 0; }
.post-list li { padding: 20px 0; border-bottom: 1px solid var(--line); }
.post-list h2 { margin: 0 0 4px; font-family: var(--font-serif); font-weight: normal; font-size: 1.4rem; color: var(--navy); }
.post-list a { text-decoration: none; }

.pagination { display: flex; justify-content: space-between; margin-top: 32px; }

/* ---------- Przyciski i sekcje (do bloków HTML) ---------- */
.button {
  display: inline-block;
  padding: 12px 28px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  border-radius: 999px;
  transition: background .2s;
}
.button:hover { background: var(--accent-dark); color: #fff; }
.bg-soft { background: var(--line); }
.bg-sun  { background: var(--sun); color: var(--navy); }

/* ================= STOPKA ================= */
.site-footer {
  --ink: #1B2B3A;
  --curve-h: clamp(50px, 7vw, 100px);
  position: relative;
  margin: 40px 0 0;
  padding: 0;
  border: 0;
  background: var(--accent);
  color: #fff;
  text-align: center;
}

/* Łuk: kremowe tło + pomarańczowy kształt (bez szwu) */
.footer-curve { display: block; line-height: 0; background: var(--bg); }
.footer-curve svg { display: block; width: 100%; height: var(--curve-h); }
.footer-curve path { fill: var(--accent); }

/* treść podciągnięta wyżej, bliżej łuku */
.footer-inner {
  margin-top: calc(var(--curve-h) * -0.12);
  padding: 0 24px;
}

/* Sekcje Kontakt i Znajdź nas: nagłówki równo w jednej linii */
.footer-grid {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 40px clamp(90px, 14vw, 240px);
}
.footer-col { text-align: center; }

.footer-heading {
  margin: 0 0 16px;
  font-family: var(--font);
  font-size: 0.8rem;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}

/* Linki: białe, po najechaniu ciemne */
.site-footer a { color: #fff; text-decoration: none; font-weight: 500; transition: color .2s; }
.site-footer a:hover { color: var(--ink); }

.footer-col address {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin: 0;
  font-style: normal;
  font-size: 1.02rem;
  line-height: 1.5;
}
.footer-col address a { white-space: nowrap; }

.with-icon { display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
.with-icon svg { flex: none; width: 18px; height: 18px; }

/* Ikony social media */
.footer-social { display: flex; justify-content: center; gap: 20px; list-style: none; margin: 0; padding: 0; }
.footer-social a { display: block; width: 28px; height: 28px; transition: transform .2s, color .2s; }
.footer-social a:hover { transform: translateY(-3px); }
.footer-social svg { display: block; width: 100%; height: 100%; }

/* Sekcja Adres: osobno, wyśrodkowana, wyraźnie niżej niż e-mail */
.footer-inner .footer-address {
  margin: 72px 0 0;
  padding: 0 0 10px;
  text-align: center;
  font-size: 1.02rem;
}

/* Dolny pasek: na komputerze długa linia z odstępem po bokach */
.footer-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: calc(100% - 96px);
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 0 24px;
  border-top: 1px solid rgba(255, 255, 255, .5);
  font-size: 0.85rem;
}
.footer-bottom p { margin: 0; }
.footer-legal { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 12px; }

/* Zakładka "Umów wizytę" (komputer i telefon) */
.site-footer .side-tab {
  position: absolute;
  top: calc(var(--curve-h) + 16px);
  left: 0;
  padding: 20px 13px;
  background: #fff;
  color: var(--accent-dark);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  border-radius: 12px 0 0 12px;
  box-shadow: 0 4px 14px rgba(27, 43, 58, .15);
  transition: color .2s, box-shadow .25s;
}
.site-footer .side-tab:hover,
.site-footer .side-tab:focus-visible {
  color: var(--navy);
  box-shadow: -7px 0 0 #fff, 0 4px 14px rgba(27, 43, 58, .15);
}

/* ---------- Telefon ---------- */
@media (max-width: 760px) {
  .footer-inner { margin-top: 0; padding: 8px 16px 0; }

  /* tylko Kontakt i Znajdź nas są odsunięte w prawo (od zakładki) */
  .footer-grid {
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding-left: 72px;
  }

  .footer-col address { gap: 14px; font-size: 0.95rem; }
  .footer-col address a {
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: center;
  }

  /* adres: na środku całego ekranu */
  .footer-inner .footer-address { margin-top: 48px; padding-bottom: 6px; font-size: 0.95rem; }

  /* krótsza linia, z odstępem od krawędzi ekranu */
  .footer-bottom { width: calc(100% - 64px); max-width: none; }

  .site-footer .side-tab { padding: 16px 11px; font-size: 0.88rem; }
}

/* Bardzo wąskie ekrany */
@media (max-width: 380px) {
  .footer-grid { padding-left: 62px; }
  .footer-col address { font-size: 0.85rem; }
}

/* ---------- 404 ---------- */
.not-found { text-align: center; padding-top: 80px; }