/*
Theme Name: Słoneczna Polana
Theme URI: https://www.pdo-slonecznapolana.pl/
Author: Local development
Description: Lekki motyw dla Prywatnego Domu Opieki Słoneczna Polana z aktualnościami, galerią i moderowanymi komentarzami.
Version: 1.3.11
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 8.0
Text Domain: sloneczna-polana
*/

:root {
  --sp-ink: #25312d;
  --sp-muted: #5f6f69;
  --sp-bg: #f6f3ed;
  --sp-surface: #ffffff;
  --sp-soft: #eaf2ec;
  --sp-primary: #1f7a5a;
  --sp-primary-dark: #14533f;
  --sp-accent: #e7782d;
  --sp-line: #d9e1dc;
  --sp-shadow: 0 18px 42px rgba(25, 49, 39, 0.13);
  --sp-radius: 8px;
  --sp-content: min(1120px, calc(100vw - 32px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--sp-bg);
  color: var(--sp-ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  letter-spacing: 0;
}

body.admin-bar .site-header {
  top: 32px;
}

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

a {
  color: var(--sp-primary-dark);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--sp-accent);
}

.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-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(37, 49, 45, 0.1);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
}

.header-inner {
  width: var(--sp-content);
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--sp-ink);
  text-decoration: none;
  min-width: 0;
}

.brand-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  flex: 0 0 auto;
}

.brand-text {
  display: grid;
  gap: 1px;
}

.brand-name {
  font-weight: 800;
  line-height: 1.1;
}

.brand-tagline {
  color: var(--sp-muted);
  font-size: 0.82rem;
  line-height: 1.2;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 0.94rem;
}

.site-nav a {
  color: var(--sp-ink);
  font-weight: 700;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav .current-menu-item > a {
  color: var(--sp-primary);
}

.button,
.wp-block-button__link,
button,
input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: var(--sp-radius);
  padding: 10px 16px;
  background: var(--sp-primary);
  color: #fff;
  font: inherit;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.button:hover,
.wp-block-button__link:hover,
button:hover,
input[type="submit"]:hover {
  background: var(--sp-primary-dark);
  color: #fff;
}

.button.secondary {
  background: #fff;
  border-color: var(--sp-line);
  color: var(--sp-primary-dark);
}

.button.secondary:hover {
  background: var(--sp-soft);
  color: var(--sp-primary-dark);
}

.main {
  min-height: 60vh;
}

.hero {
  position: relative;
  min-height: clamp(640px, 86vh, 900px);
  display: grid;
  align-items: end;
  overflow: hidden;
  background: #10221d;
  color: #fff;
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(12, 31, 25, 0.88) 0%, rgba(12, 31, 25, 0.65) 44%, rgba(12, 31, 25, 0.16) 100%),
    linear-gradient(0deg, rgba(12, 31, 25, 0.7), rgba(12, 31, 25, 0.08) 55%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: var(--sp-content);
  margin: 0 auto;
  padding: 112px 0 70px;
}

.hero-copy {
  max-width: 680px;
}

.hero-logo {
  width: clamp(96px, 13vw, 150px);
  height: auto;
  margin: 0 0 24px;
}

.eyebrow {
  margin: 0 0 14px;
  color: #d7f2e3;
  font-size: 0.86rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 18px;
  color: inherit;
  font-weight: 850;
  line-height: 1.08;
  letter-spacing: 0;
}

h1 {
  max-width: 760px;
  font-size: clamp(2.6rem, 7vw, 5.7rem);
}

.hero-tagline {
  margin: -6px 0 18px;
  color: #d7f2e3;
  font-size: clamp(1.25rem, 2.2vw, 1.65rem);
  font-style: italic;
  font-weight: 800;
  line-height: 1.25;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.25rem);
}

h3 {
  font-size: clamp(1.35rem, 2vw, 1.8rem);
}

p {
  margin: 0 0 18px;
}

.lead {
  max-width: 680px;
  font-size: clamp(1.12rem, 2vw, 1.42rem);
  line-height: 1.55;
}

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

.hero-facts {
  width: var(--sp-content);
  margin: -36px auto 0;
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--sp-line);
  border-radius: var(--sp-radius);
  background: var(--sp-line);
  box-shadow: var(--sp-shadow);
}

.fact {
  min-height: 118px;
  padding: 24px;
  background: #fff;
}

.fact strong {
  display: block;
  margin-bottom: 5px;
  color: var(--sp-primary-dark);
  font-size: 1.02rem;
}

.fact span {
  color: var(--sp-muted);
  font-size: 0.95rem;
}

.section {
  padding: 88px 0;
}

.section.soft {
  background: var(--sp-soft);
}

.section-inner {
  width: var(--sp-content);
  margin: 0 auto;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 38px;
}

.section-kicker {
  margin: 0 0 10px;
  color: var(--sp-primary);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  align-items: start;
  gap: 52px;
}

.feature-image {
  overflow: hidden;
  border-radius: var(--sp-radius);
  box-shadow: var(--sp-shadow);
}

.feature-image img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.check-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0;
  margin: 28px 0 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding: 14px 14px 14px 42px;
  border: 1px solid var(--sp-line);
  border-radius: var(--sp-radius);
  background: #fff;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 19px;
  width: 12px;
  height: 7px;
  border-left: 3px solid var(--sp-primary);
  border-bottom: 3px solid var(--sp-primary);
  transform: rotate(-45deg);
}

.link-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  max-width: 520px;
  margin: 0 auto;
}

.link-card {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 20px;
  border: 1px solid var(--sp-line);
  border-radius: var(--sp-radius);
  background: #fff;
  color: var(--sp-ink);
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(25, 49, 39, 0.07);
}

.link-card:hover {
  border-color: rgba(31, 122, 90, 0.45);
  color: var(--sp-ink);
  transform: translateY(-2px);
}

.link-card strong {
  color: var(--sp-primary-dark);
  font-size: 1.08rem;
  line-height: 1.25;
  text-align: center;
}

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

.card {
  min-width: 0;
  border: 1px solid var(--sp-line);
  border-radius: var(--sp-radius);
  background: #fff;
  overflow: hidden;
}

.card-body {
  padding: 24px;
}

.post-card .post-thumbnail img,
.gallery-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.post-meta {
  margin-bottom: 10px;
  color: var(--sp-muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.post-card h3 a,
.entry-title a {
  color: var(--sp-ink);
  text-decoration: none;
}

.post-card h3 a:hover,
.entry-title a:hover {
  color: var(--sp-primary);
}

.empty-state {
  padding: 28px;
  border: 1px dashed var(--sp-line);
  border-radius: var(--sp-radius);
  background: rgba(255, 255, 255, 0.7);
  color: var(--sp-muted);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.gallery-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--sp-radius);
  background: #dfe8e2;
}

.gallery-card figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 30px 14px 12px;
  color: #fff;
  font-size: 0.92rem;
  font-weight: 800;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0));
}

.cta {
  padding: 58px 0;
  background: var(--sp-primary-dark);
  color: #fff;
}

.cta-inner {
  width: var(--sp-content);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 32px;
}

.cta h2 {
  font-size: clamp(1.8rem, 3vw, 2.7rem);
}

.cta p {
  max-width: 720px;
  color: #dbece5;
}

.page-header {
  padding: 78px 0 38px;
  background: var(--sp-soft);
}

.page-header-inner,
.content-wrap {
  width: min(860px, calc(100vw - 32px));
  margin: 0 auto;
}

.content-wrap {
  padding: 56px 0 84px;
}

.entry-content {
  overflow-wrap: break-word;
}

.entry-content > * {
  margin-bottom: 24px;
}

.entry-content img {
  border-radius: var(--sp-radius);
}

.archive-list {
  display: grid;
  gap: 24px;
}

.archive-item {
  border: 1px solid var(--sp-line);
  border-radius: var(--sp-radius);
  background: #fff;
  overflow: hidden;
}

.archive-item .post-thumbnail img {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
}

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

.contact-panel {
  min-width: 0;
  padding: 28px;
  border: 1px solid var(--sp-line);
  border-radius: var(--sp-radius);
  background: #fff;
  box-shadow: var(--sp-shadow);
}

.contact-panel span {
  display: block;
  margin-bottom: 10px;
  color: var(--sp-muted);
  font-size: 0.88rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-panel a {
  color: var(--sp-primary-dark);
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  font-weight: 850;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.contact-panel address {
  margin: 0;
  font-style: normal;
}

.comments-area {
  margin-top: 56px;
  padding-top: 38px;
  border-top: 1px solid var(--sp-line);
}

.comment-list {
  padding: 0;
  margin: 0 0 34px;
  list-style: none;
}

.comment {
  margin-bottom: 18px;
  padding: 20px;
  border: 1px solid var(--sp-line);
  border-radius: var(--sp-radius);
  background: #fff;
}

.comment-meta {
  color: var(--sp-muted);
  font-size: 0.9rem;
}

.comment-form {
  display: grid;
  gap: 16px;
}

.comment-form p {
  margin: 0;
}

.comment-form label {
  display: block;
  margin-bottom: 7px;
  font-weight: 800;
}

input[type="text"],
input[type="email"],
input[type="url"],
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--sp-line);
  border-radius: var(--sp-radius);
  padding: 10px 12px;
  background: #fff;
  color: var(--sp-ink);
  font: inherit;
}

textarea {
  min-height: 150px;
  resize: vertical;
}

.comment-notes,
.logged-in-as,
.moderation-note {
  color: var(--sp-muted);
  font-size: 0.95rem;
}

.site-footer {
  padding: 34px 0;
  border-top: 1px solid var(--sp-line);
  background: #fff;
  color: var(--sp-muted);
}

.footer-inner {
  width: var(--sp-content);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 18px;
  font-size: 0.94rem;
}

.footer-inner a {
  color: var(--sp-muted);
  text-decoration: none;
}

@media (max-width: 900px) {
  body.admin-bar .site-header {
    top: 46px;
  }

  .header-inner {
    min-height: auto;
    padding: 14px 0;
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .hero {
    min-height: 720px;
  }

  .hero::after {
    background: linear-gradient(0deg, rgba(12, 31, 25, 0.88), rgba(12, 31, 25, 0.42));
  }

  .hero-facts,
  .two-column,
  .link-grid,
  .cards-grid,
  .cta-inner,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  body {
    font-size: 16px;
  }

  .brand-logo {
    width: 42px;
    height: 42px;
  }

  .brand-name {
    font-size: 0.96rem;
  }

  .hero-inner {
    padding: 86px 0 52px;
  }

  .hero-actions .button,
  .cta .button {
    width: 100%;
  }

  .hero-facts {
    margin-top: 0;
    border-radius: 0;
    width: 100%;
  }

  .section {
    padding: 62px 0;
  }

  .check-list,
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}
