/*
Theme Name: Perspektywy
Theme URI: https://centrumperspektywy.pl
Author: GO WEB
Author URI: https://goweb.pl
Description: Motyw dedykowany dla Centrum Psychologicznego Perspektywy. Specjaliści, specjalizacje i usługi jako typy treści, pola ACF PRO oraz formularz Contact Form 7.
Version: 1.0.6
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: perspektywy
Tags: custom-menu, featured-images, translation-ready
*/

/* ==========================================================================
   1. Tokeny
   ========================================================================== */
:root {
  --navy: #3A4A63;
  --navy-dark: #2A374B;
  --ink: #1E2A3A;
  --muted: #5A6A83;
  --muted-2: #667891;
  --line: #E4EBF3;
  --line-2: #DDE5EE;
  --soft: #F4F7FA;
  --img-bg: #EAF0F6;
  --accent: #C6D6E6;
  --btn-border: #C6D2E0;
  --foot-text: #C3D0E0;
  --foot-muted: #93A6BF;
  --radius: 12px;
  --pill: 999px;
  --wrap: 1200px;
  --padx: 28px;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

@media (max-width: 759px) {
  :root { --padx: 18px; }
}

/* ==========================================================================
   2. Reset i podstawy
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: #ffffff;
  color: var(--ink);
  font-family: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a { color: var(--navy); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--ink); }

button, input, select, textarea { font: inherit; color: inherit; }

h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 500; letter-spacing: -0.025em; line-height: 1.15; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

::selection { background: var(--accent); color: var(--ink); }
:focus-visible { outline: 2.5px solid var(--navy); outline-offset: 3px; border-radius: 6px; }

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; color: #fff; }

/* ==========================================================================
   3. Layout
   ========================================================================== */
.site { min-height: 100vh; display: flex; flex-direction: column; background: #fff; }
.site-main { flex: 1 1 auto; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--padx); }

.section { padding-top: 88px; }
@media (max-width: 1079px) { .section { padding-top: 40px; } }
@media (max-width: 759px) { .section { padding-top: 56px; } }

.band { background: var(--soft); border-bottom: 1px solid var(--line); }
.band > .wrap { padding-top: 60px; padding-bottom: 58px; }

.pad-b { padding-bottom: 104px; }
.pad-b-sm { padding-bottom: 96px; }

/* ==========================================================================
   4. Typografia uzytkowa
   ========================================================================== */
.h1 { font-size: clamp(34px, 4.2vw, 52px); line-height: 1.08; letter-spacing: -0.032em; color: var(--ink); }
.h2 { font-size: clamp(28px, 3.3vw, 40px); line-height: 1.12; letter-spacing: -0.028em; color: var(--ink); }
.h3 { font-size: 24px; line-height: 1.25; letter-spacing: -0.022em; color: var(--ink); }
.h4 { font-size: 18px; line-height: 1.35; letter-spacing: -0.018em; color: var(--ink); }

.lead { font-size: 16px; line-height: 1.72; color: var(--muted); text-wrap: pretty; }
.body-text { font-size: 16px; line-height: 1.78; color: var(--muted); text-wrap: pretty; }
.body-text p { margin: 0 0 20px; }
.body-text p:last-child { margin-bottom: 0; }
.meta { font-size: 13px; color: var(--muted-2); }
.caption { font-size: 14px; color: var(--muted-2); }

.eyebrow {
  font-size: 13px; font-weight: 600; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--muted-2);
}

.rule-soft { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.rule-strong { padding-bottom: 14px; border-bottom: 1px solid var(--ink); }

.maxw-20 { max-width: 20em; }
.maxw-22 { max-width: 22em; }
.maxw-32 { max-width: 32em; }
.maxw-34 { max-width: 34em; }
.maxw-40 { max-width: 40em; }
.maxw-42 { max-width: 42em; }
.maxw-44 { max-width: 44em; }
.maxw-46 { max-width: 46em; }
.maxw-50 { max-width: 50em; }

/* ==========================================================================
   5. Przyciski
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; cursor: pointer; font: inherit;
  padding: 15px 30px; border-radius: var(--pill);
  font-size: 16px; font-weight: 600; text-align: center; white-space: nowrap;
  transition: background .25s ease, border-color .2s ease, color .2s ease, transform .15s ease;
}
.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--navy); color: #fff; }
.btn--primary:hover { background: var(--navy-dark); color: #fff; }

.btn--ghost { background: #fff; color: var(--navy); border: 1.5px solid var(--btn-border); padding: 14px 28px; }
.btn--ghost:hover { border-color: var(--navy); color: var(--ink); }

.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: var(--soft); color: var(--ink); }

.btn--outline-light { background: none; color: #fff; border: 1.5px solid rgba(255,255,255,.4); padding: 14px 30px; }
.btn--outline-light:hover { border-color: #fff; color: #fff; }

.btn--sm { padding: 12px 24px; font-size: 14px; }
.btn--md { padding: 14px 26px; font-size: 15px; }
.btn--block { display: flex; width: 100%; }

.link-underline {
  display: inline-block; background: none; border: 0; padding: 0; cursor: pointer;
  font-size: 14px; font-weight: 600; color: var(--navy);
  border-bottom: 1.5px solid var(--accent); transition: color .2s ease, border-color .2s ease;
}
.link-underline:hover { color: var(--ink); border-bottom-color: var(--navy); }

.back-link {
  display: inline-block; background: none; border: 0; padding: 6px 0; cursor: pointer;
  font-size: 14px; color: var(--muted-2);
}
.back-link:hover { color: var(--ink); }

/* ==========================================================================
   6. Naglowek
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: #fff; border-bottom: 1px solid var(--line);
}

.topbar { background: var(--ink); color: var(--foot-text); font-size: 13px; }
.topbar__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  padding-top: 8px; padding-bottom: 8px;
}
.topbar__left { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.topbar__phone { color: #fff; font-weight: 500; }
.topbar__phone:hover { color: var(--accent); }
.topbar__addr { color: var(--foot-muted); }
.topbar__mail { color: var(--foot-text); }
.topbar__mail:hover { color: #fff; }

.header-bar {
  height: 72px; display: flex; align-items: center; gap: 24px;
}
.brand { display: flex; align-items: center; }
/* Logo trzyma lewa krawedz, nawigacja i przycisk lada razem po prawej. */
.header-bar > .brand { margin-right: auto; }
.brand img { height: 40px; width: auto; display: block; }
.brand__text { font-size: 18px; font-weight: 600; color: var(--ink); letter-spacing: -0.02em; }

.nav { display: flex; align-items: center; gap: 2px; }
.nav__item { position: static; }
.nav__link {
  background: none; border: 0; cursor: pointer;
  padding: 9px 13px; font-size: 14px; font-weight: 500; color: var(--navy);
  border-radius: var(--pill); display: inline-flex; align-items: center; gap: 7px;
  transition: background .2s ease;
}
.nav__link:hover, .nav__item:hover > .nav__link { background: var(--soft); }
.nav__link.is-current { background: var(--soft); color: var(--ink); }
.nav__caret {
  display: inline-block; width: 6px; height: 6px;
  border-right: 1.6px solid #8494AB; border-bottom: 1.6px solid #8494AB;
  transform: rotate(45deg) translateY(-2px);
}

.mega {
  position: absolute; left: 0; right: 0; top: 100%;
  background: #fff; border-bottom: 1px solid var(--line);
  box-shadow: 0 24px 48px -24px rgba(30, 42, 58, .3);
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity .22s var(--ease), transform .22s var(--ease), visibility .22s;
}
.nav__item:hover .mega,
.nav__item:focus-within .mega { opacity: 1; visibility: visible; transform: none; }

.mega__inner { max-width: var(--wrap); margin-inline: auto; padding: 32px var(--padx) 30px; }
.mega__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 20px; margin-bottom: 22px;
}
.mega__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px 12px; }
.mega__cols { display: grid; grid-template-columns: 1.9fr 1fr; gap: 40px; }
.mega__services { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px; }

.person-chip {
  display: flex; align-items: center; gap: 13px; text-align: left;
  padding: 9px 11px; border-radius: var(--radius);
  transition: background .2s ease;
}
.person-chip:hover { background: var(--soft); }
.person-chip img {
  width: 46px; height: 46px; border-radius: 10px; flex: 0 0 auto;
  object-fit: cover; object-position: center 22%; background: var(--img-bg);
}
.person-chip__name { display: block; font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.3; }
.person-chip__role { display: block; font-size: 13px; color: var(--muted-2); line-height: 1.35; margin-top: 2px; }

.service-chip { display: block; text-align: left; padding: 14px 16px; border-radius: var(--radius); transition: background .2s ease; }
.service-chip:hover { background: var(--soft); }
.service-chip__title { display: block; font-size: 16px; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.service-chip__note { display: block; font-size: 13px; color: var(--muted-2); line-height: 1.5; }

.mega__price { background: var(--soft); border-radius: var(--radius); padding: 26px; }
.mega__price-value { font-size: 40px; font-weight: 500; letter-spacing: -0.03em; color: var(--ink); line-height: 1; }
.mega__price-note { font-size: 13px; color: var(--muted-2); margin: 8px 0 18px; }

.burger {
  width: 44px; height: 44px; border: 0; background: none; cursor: pointer;
  display: none; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px; border-radius: var(--pill);
}
.burger span { display: block; width: 22px; height: 2px; background: var(--ink); border-radius: 2px; }

@media (max-width: 1079px) {
  .nav, .header-cta { display: none; }
  .burger { display: flex; }
  .topbar__addr, .topbar__mail { display: none; }
}

/* Panel mobilny */
.drawer {
  position: fixed; inset: 0; z-index: 90; background: #fff;
  display: none; flex-direction: column; overflow-y: auto;
}
.drawer.is-open { display: flex; animation: drawerIn .26s var(--ease) both; }
body.drawer-open { overflow: hidden; }

.drawer__top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: #fff;
}
.drawer__top img { height: 34px; width: auto; }
.drawer__close { width: 44px; height: 44px; border: 0; background: none; cursor: pointer; font-size: 24px; line-height: 1; color: var(--ink); }
.drawer__body { padding: 12px 18px 40px; display: grid; gap: 2px; }
.drawer__link {
  text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line);
  cursor: pointer; padding: 18px 4px; font-size: 18px; font-weight: 500; color: var(--ink);
  min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.drawer__sign { font-size: 22px; color: var(--muted-2); line-height: 1; }
.drawer__sub { display: none; gap: 2px; padding: 6px 0 14px; }
.drawer__sub.is-open { display: grid; animation: panelIn .24s var(--ease) both; }
.drawer__sub .person-chip { min-height: 56px; padding: 10px 8px; }
.drawer__sub .person-chip img { width: 42px; height: 42px; }
.drawer__sub .person-chip__name { font-size: 16px; }
.drawer__sub .service-chip { min-height: 56px; padding: 13px 8px; }
.drawer__more { text-align: left; background: none; border: 0; cursor: pointer; padding: 14px 8px; font-size: 14px; font-weight: 600; color: var(--navy); min-height: 48px; }
.drawer__cta { margin-top: 22px; }

/* ==========================================================================
   7. Animacje
   ========================================================================== */
@keyframes kb { from { transform: scale(1) translate(0, 0); } to { transform: scale(1.09) translate(-1.5%, -1%); } }
@keyframes lineUp { from { transform: translateY(112%); } to { transform: translateY(0); } }
@keyframes panelIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes drawerIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

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