/*
Theme Name: Dobra4
Theme URI: https://www.dobra4.waw.pl/
Author: Codex
Description: Lekki motyw WordPress inspirowany spokojna, gabinetowa strona osrodka psychoterapii Dobra4.
Version: 1.9.3
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
Text Domain: dobra4
*/

:root {
  --d4-ink: #26211d;
  --d4-muted: #685f58;
  --d4-line: #ded7ce;
  --d4-bg: #f7f3ed;
  --d4-panel: #fffdfa;
  --d4-sage: #75836b;
  --d4-sage-dark: #4f6248;
  --d4-clay: #b27a5b;
  --d4-blue: #516a77;
  --d4-shadow: 0 18px 44px rgba(52, 43, 36, 0.09);
  --d4-font-body: "Lora", Georgia, "Times New Roman", serif;
  --d4-font-heading: "Lora", Georgia, "Times New Roman", serif;
  --d4-font-ui: "Inter", Arial, sans-serif;
  --d4-size-body: 18px;
  --d4-size-nav: 14px;
  --d4-size-hero: 82px;
  --d4-size-section: 52px;
  --d4-size-lead: 22px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--d4-ink);
  background: var(--d4-bg);
  font-family: var(--d4-font-body);
  font-size: var(--d4-size-body);
  line-height: 1.65;
}

a {
  color: var(--d4-sage-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

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

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

.site-shell {
  min-height: 100vh;
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid rgba(222, 215, 206, 0.85);
  background: rgba(247, 243, 237, 0.94);
  backdrop-filter: blur(12px);
}

.header-inner,
.section-inner,
.footer-inner {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 82px;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--d4-ink);
  text-decoration: none;
}

.custom-logo {
  max-width: 130px;
  max-height: 58px;
  width: auto;
}

.brand-mark {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 1px solid var(--d4-line);
  color: var(--d4-sage-dark);
  font-family: var(--d4-font-ui);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0;
}

.brand-title {
  display: block;
  font-size: 26px;
  line-height: 1.05;
}

.brand-subtitle {
  display: block;
  color: var(--d4-muted);
  font-family: var(--d4-font-ui);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.main-navigation ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--d4-font-ui);
  font-size: var(--d4-size-nav);
}

.main-navigation a {
  color: var(--d4-ink);
  text-decoration: none;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a {
  color: var(--d4-sage-dark);
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--d4-line);
  background: var(--d4-panel);
  color: var(--d4-ink);
}

.menu-toggle-lines,
.menu-toggle-lines::before,
.menu-toggle-lines::after {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  transition: transform 180ms ease, opacity 180ms ease;
}

.menu-toggle-lines {
  position: relative;
}

.menu-toggle-lines::before,
.menu-toggle-lines::after {
  content: "";
  position: absolute;
  left: 0;
}

.menu-toggle-lines::before {
  top: -7px;
}

.menu-toggle-lines::after {
  top: 7px;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-lines {
  background: transparent;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-lines::before {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle-lines::after {
  transform: translateY(-7px) rotate(-45deg);
}

.hero {
  padding: 86px 0 70px;
  border-bottom: 1px solid var(--d4-line);
  background:
    linear-gradient(90deg, rgba(247, 243, 237, 0.96), rgba(247, 243, 237, 0.78)),
    repeating-linear-gradient(135deg, rgba(117, 131, 107, 0.09) 0 1px, transparent 1px 22px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 48px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--d4-sage-dark);
  font-family: var(--d4-font-ui);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero h1,
.page-title,
.section-title {
  margin: 0;
  color: var(--d4-ink);
  font-family: var(--d4-font-heading);
  font-weight: 400;
  line-height: 1.08;
}

.hero h1 {
  max-width: 760px;
  font-size: clamp(44px, 8vw, var(--d4-size-hero));
}

.hero-lead {
  max-width: 680px;
  margin: 26px 0 0;
  color: var(--d4-muted);
  font-size: var(--d4-size-lead);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button,
.wp-block-button__link,
button,
input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 20px;
  border: 1px solid var(--d4-sage-dark);
  border-radius: 0;
  background: var(--d4-sage-dark);
  color: #fffdfa;
  font-family: var(--d4-font-ui);
  font-size: 14px;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.button.secondary {
  background: transparent;
  color: var(--d4-sage-dark);
}

.hero-card {
  padding: 32px;
  border: 1px solid var(--d4-line);
  background: rgba(255, 253, 250, 0.78);
  box-shadow: var(--d4-shadow);
}

.hero-card h2 {
  margin: 0 0 16px;
  font-size: 27px;
  font-weight: 400;
}

.hero-card p {
  margin: 0 0 12px;
  color: var(--d4-muted);
}

.section {
  padding: 74px 0;
}

.section.alt {
  border-top: 1px solid var(--d4-line);
  border-bottom: 1px solid var(--d4-line);
  background: var(--d4-panel);
}

.section-header {
  display: grid;
  grid-template-columns: minmax(220px, 0.45fr) minmax(0, 0.55fr);
  gap: 36px;
  margin-bottom: 38px;
}

.section-title {
  font-size: clamp(34px, 5vw, var(--d4-size-section));
}

.section-intro {
  margin: 0;
  color: var(--d4-muted);
  font-size: 20px;
}

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

.service-grid > :not(.service):not(.service-link) {
  display: none;
}

.service,
.team-member,
.contact-panel {
  border: 1px solid var(--d4-line);
  background: var(--d4-panel);
}

.service,
.team-member {
  padding: 26px;
}

.service-link {
  position: relative;
  display: block;
  min-height: 100%;
  color: var(--d4-ink);
  text-decoration: none;
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease, color 180ms ease, transform 180ms ease;
}

.service-link::after {
  content: "";
  position: absolute;
  right: 24px;
  bottom: 20px;
  width: 34px;
  height: 1px;
  background: currentColor;
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.service-link:hover,
.service-link:focus-visible {
  border-color: var(--d4-clay);
  background: #f3dfd2;
  color: #4a2b1e;
  box-shadow: 0 18px 34px rgba(143, 86, 55, 0.18);
  transform: translateY(-4px);
}

.service-link:nth-child(2):hover,
.service-link:nth-child(2):focus-visible {
  border-color: var(--d4-sage);
  background: #dfe8d8;
  color: #33412f;
  box-shadow: 0 18px 34px rgba(79, 98, 72, 0.18);
}

.service-link:nth-child(3):hover,
.service-link:nth-child(3):focus-visible {
  border-color: var(--d4-blue);
  background: #dce8ed;
  color: #263d48;
  box-shadow: 0 18px 34px rgba(81, 106, 119, 0.18);
}

.service-link:hover::after,
.service-link:focus-visible::after {
  opacity: 1;
  transform: translateX(0);
}

.service-link:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

.service h3,
.team-member h3 {
  margin: 0 0 10px;
  font-size: 25px;
  font-weight: 400;
  line-height: 1.2;
}

.service p,
.team-member p {
  margin: 0;
  color: var(--d4-muted);
}

.team-member .role {
  margin-bottom: 10px;
  color: var(--d4-blue);
  font-family: var(--d4-font-ui);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.team-member-link {
  display: block;
  color: var(--d4-ink);
  text-decoration: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.team-member-link:hover,
.team-member-link:focus-visible {
  border-color: var(--d4-sage);
  box-shadow: 0 18px 34px rgba(79, 98, 72, 0.14);
  transform: translateY(-3px);
}

.team-photo {
  display: block;
  width: 72px;
  height: 72px;
  margin-bottom: 16px;
  border: 1px solid var(--d4-line);
  overflow: hidden;
}

.team-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.content-narrow {
  max-width: 820px;
}

.content-narrow p:first-child {
  margin-top: 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 24px;
}

.contact-panel {
  padding: 30px;
}

.contact-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact-list li {
  padding: 14px 0;
  border-bottom: 1px solid var(--d4-line);
}

.contact-list li:last-child {
  border-bottom: 0;
}

.contact-label {
  display: block;
  color: var(--d4-muted);
  font-family: var(--d4-font-ui);
  font-size: 12px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.map-frame {
  min-height: 360px;
  border: 1px solid var(--d4-line);
  overflow: hidden;
  background: #e8e1d8;
}

.map-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 360px;
  border: 0;
}

.page-main {
  padding: 70px 0;
}

.page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  gap: 64px;
  align-items: start;
}

.page-content-column {
  min-width: 0;
}

.page-title {
  margin-bottom: 28px;
  font-size: clamp(40px, 6vw, 64px);
}

.entry-content {
  max-width: 900px;
}

.front-extra {
  padding-bottom: 0;
}

.front-extra .entry-content {
  max-width: none;
}

.front-extra .wp-block-image,
.front-extra figure {
  margin-top: 0;
}

.front-extra .wp-block-image:first-child {
  width: 100vw;
  max-width: none;
  margin-right: calc(50% - 50vw);
  margin-bottom: 56px;
  margin-left: calc(50% - 50vw);
}

.front-extra .wp-block-image:first-child img {
  display: block;
  width: 100%;
  max-width: none;
  height: clamp(320px, 42vw, 620px);
  object-fit: cover;
}

.front-extra .entry-content > :not(.wp-block-image) {
  max-width: 900px;
  margin-right: auto;
  margin-left: auto;
}

.entry-content h2,
.entry-content h3 {
  margin-top: 2em;
  font-weight: 400;
  line-height: 1.2;
}

.entry-content h2 {
  font-size: 38px;
}

.entry-content h3 {
  font-size: 28px;
}

.entry-content p,
.entry-content li {
  color: var(--d4-muted);
}

.entry-content input,
.entry-content textarea,
.entry-content select {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--d4-line);
  background: #fff;
  color: var(--d4-ink);
  font: inherit;
}

.page-sidebar {
  position: sticky;
  top: 110px;
  display: grid;
  gap: 18px;
}

.sidebar-box {
  padding: 26px;
  border: 1px solid var(--d4-line);
  background: var(--d4-panel);
  box-shadow: 0 14px 34px rgba(52, 43, 36, 0.06);
}

.sidebar-box h2 {
  margin: 0 0 16px;
  font-family: var(--d4-font-heading);
  font-size: 29px;
  font-weight: 400;
  line-height: 1.15;
}

.sidebar-kicker {
  margin: 0 0 8px;
  color: var(--d4-sage-dark);
  font-family: var(--d4-font-ui);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.sidebar-contact-list {
  display: grid;
  gap: 13px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sidebar-contact-list li {
  padding-bottom: 13px;
  border-bottom: 1px solid var(--d4-line);
  color: var(--d4-muted);
}

.sidebar-contact-list li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.sidebar-contact-list span {
  display: block;
  color: var(--d4-muted);
  font-family: var(--d4-font-ui);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.therapist-mini {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 13px;
  align-items: center;
  padding: 13px 0;
  border-top: 1px solid var(--d4-line);
  color: var(--d4-ink);
  text-decoration: none;
}

.therapist-mini:hover,
.therapist-mini:focus-visible {
  color: var(--d4-sage-dark);
}

.therapist-avatar,
.therapist-thumb {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 1px solid var(--d4-line);
  overflow: hidden;
}

.therapist-avatar {
  background: #eef2eb;
  color: var(--d4-sage-dark);
  font-family: var(--d4-font-ui);
  font-size: 15px;
  font-weight: 700;
}

.therapist-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.therapist-mini strong,
.therapist-mini small {
  display: block;
}

.therapist-mini strong {
  line-height: 1.25;
}

.therapist-mini small {
  margin-top: 4px;
  color: var(--d4-muted);
  font-size: 14px;
  line-height: 1.35;
}

.sidebar-empty {
  margin: 0;
  color: var(--d4-muted);
  font-size: 15px;
}

.therapist-profile {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.55fr);
  gap: 36px 56px;
  align-items: start;
}

.therapist-profile-lead {
  max-width: 720px;
  margin: 0;
  color: var(--d4-muted);
  font-size: var(--d4-size-lead);
}

.therapist-profile-image {
  margin: 0;
  border: 1px solid var(--d4-line);
  background: var(--d4-panel);
}

.therapist-profile-image img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.therapist-profile-content {
  grid-column: 1 / -1;
}

.team-page-main {
  padding-top: 82px;
}

.team-page-header {
  display: grid;
  grid-template-columns: minmax(220px, 0.42fr) minmax(0, 0.58fr);
  gap: 44px;
  align-items: start;
  margin-bottom: 46px;
}

.team-page-intro {
  max-width: none;
}

.team-page-intro > *:first-child {
  margin-top: 0;
}

.therapist-showcase {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.therapist-card {
  min-width: 0;
}

.therapist-card-link {
  display: grid;
  min-height: 100%;
  grid-template-rows: auto 1fr;
  border: 1px solid var(--d4-line);
  background: var(--d4-panel);
  color: var(--d4-ink);
  text-decoration: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.therapist-card-link:hover,
.therapist-card-link:focus-visible {
  border-color: var(--d4-sage);
  box-shadow: 0 18px 34px rgba(79, 98, 72, 0.14);
  transform: translateY(-3px);
}

.therapist-card-media {
  display: block;
  aspect-ratio: 4 / 3;
  border-bottom: 1px solid var(--d4-line);
  overflow: hidden;
  background: #eef2eb;
}

.therapist-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.therapist-card-placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: var(--d4-sage-dark);
  font-family: var(--d4-font-ui);
  font-size: 34px;
  font-weight: 700;
}

.therapist-card-body {
  display: block;
  padding: 24px 26px 28px;
}

.therapist-card-name,
.therapist-card-note {
  display: block;
}

.therapist-card-name {
  margin-top: 8px;
  font-family: var(--d4-font-heading);
  font-size: 28px;
  line-height: 1.12;
}

.therapist-card-note {
  margin-top: 14px;
  color: var(--d4-muted);
  line-height: 1.55;
}

.team-empty {
  max-width: 720px;
}

.site-footer {
  padding: 38px 0;
  border-top: 1px solid var(--d4-line);
  color: var(--d4-muted);
  background: var(--d4-panel);
  font-family: var(--d4-font-ui);
  font-size: 14px;
}

.home-blocks > .section:first-child {
  margin-top: 0;
}

.home-blocks .section {
  margin: 0;
}

.home-blocks .wp-block-heading {
  margin-top: 0;
}

.home-blocks p {
  margin-top: 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

@media (max-width: 840px) {
  .header-inner {
    position: relative;
    align-items: center;
    flex-direction: row;
    padding: 16px 0;
  }

  .site-branding {
    min-width: 0;
  }

  .brand-title {
    font-size: 23px;
  }

  .brand-subtitle {
    font-size: 11px;
  }

  .menu-toggle {
    display: inline-flex;
    flex: 0 0 auto;
  }

  .main-navigation {
    position: absolute;
    top: calc(100% + 1px);
    right: 0;
    left: 0;
    display: none;
    padding: 12px 0 16px;
    border-top: 1px solid var(--d4-line);
    border-bottom: 1px solid var(--d4-line);
    background: rgba(247, 243, 237, 0.98);
    box-shadow: 0 20px 30px rgba(52, 43, 36, 0.08);
  }

  .main-navigation.is-open {
    display: block;
  }

  .main-navigation ul {
    display: grid;
    justify-content: stretch;
    gap: 0;
    width: min(1120px, calc(100% - 36px));
    margin: 0 auto;
    font-size: 16px;
  }

  .main-navigation li {
    border-bottom: 1px solid rgba(222, 215, 206, 0.85);
  }

  .main-navigation li:last-child {
    border-bottom: 0;
  }

  .main-navigation a {
    display: block;
    padding: 13px 0;
  }

  .hero {
    padding-top: 58px;
  }

  .hero-grid,
  .section-header,
  .contact-grid,
  .page-layout,
  .therapist-profile,
  .team-page-header {
    grid-template-columns: 1fr;
  }

  .page-layout {
    gap: 34px;
  }

  .page-sidebar {
    position: static;
  }

  .service-grid,
  .team-grid,
  .therapist-showcase {
    grid-template-columns: 1fr;
  }

  .hero-card {
    padding: 24px;
  }
}

@media (max-width: 520px) {
  .header-inner,
  .section-inner,
  .footer-inner {
    width: min(100% - 28px, 1120px);
  }

  .hero h1 {
    font-size: 42px;
  }

  .hero-lead {
    font-size: 20px;
  }
}
