/*
Theme Name: Terapia z Natury
Theme URI: https://adriankaja.com/
Author: Adrian Kaja
Author URI: https://adriankaja.com/
Description: Autorski motyw WordPress dla terapiaznatury.pl - ziemisto-botaniczny, nowoczesny design dla gabinetu medycyny holistycznej (ziołolecznictwo, apiterapia, tradycyjna medycyna chińska, dietetyka). Telefon, link do Facebooka, adres i kolor akcentu edytowalne w Personalizacji (Wygląd → Personalizuj).
Version: 1.0.0
Requires at least: 6.0
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: terapia-z-natury
*/

/* ---------- Reset / base ---------- */
* { box-sizing: border-box; }

body {
  margin: 0;
  background: #FAF6EE;
  color: #26312B;
  font-family: "Work Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent, #C17A4E); text-decoration: none; }
a:hover { color: color-mix(in oklch, var(--accent, #C17A4E) 75%, black); }

h1, h2, h3, h4, .serif {
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: #24322A;
}

.eyebrow {
  display: inline-block;
  font-family: "Work Sans", sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6E8574;
  margin-bottom: 14px;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 56px);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 30px;
  border-radius: 3px;
  font-family: "Work Sans", sans-serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
  min-height: 44px;
}
.btn-primary { background: var(--accent, #C17A4E); color: #FAF6EE; }
.btn-primary:hover { background: color-mix(in oklch, var(--accent, #C17A4E) 82%, black); color: #FAF6EE; }
.btn-ghost { background: transparent; border-color: #2F4A3D; color: #2F4A3D; }
.btn-ghost:hover { background: #2F4A3D; color: #FAF6EE; }
.btn-cream { background: #FAF6EE; color: #2F4A3D; }
.btn-cream:hover { background: color-mix(in oklch, #FAF6EE 85%, var(--accent, #C17A4E)); }
.btn-nav-phone { padding: 12px 22px; font-size: 14px; white-space: nowrap; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(250, 246, 238, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #E7DFCE;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 20px;
}
.site-logo-badge {
  display: inline-flex;
  align-items: center;
  background: #2F4A3D;
  border-radius: 4px;
  padding: 8px 14px;
}
.site-logo-img,
.site-logo-badge img { height: 32px; width: auto; display: block; }
.nav-actions { display: flex; align-items: center; gap: 12px; }

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

/* ---------- Hamburger (widoczny tylko na mobile) ---------- */
.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #E7DFCE;
  border-radius: 4px;
  background: transparent;
  color: #2F4A3D;
  cursor: pointer;
  flex-shrink: 0;
}
.menu-toggle .icon-close { display: none; }
.menu-toggle.is-active .icon-menu { display: none; }
.menu-toggle.is-active .icon-close { display: block; }

/* ---------- Menu główne (desktop: pozioma belka, mobile: rozwijana szuflada) ---------- */
.nav-links { display: flex; align-items: center; gap: 32px; list-style: none; margin: 0; padding: 0; }
.nav-links li { margin: 0; position: relative; }
.nav-links a { display: inline-flex; align-items: center; gap: 5px; color: #3D4A42; font-size: 15px; font-weight: 500; }
.nav-links a:hover { color: var(--accent, #C17A4E); }

.submenu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  padding: 2px;
  margin-left: -2px;
  color: #3D4A42;
  cursor: pointer;
}
.nav-links .submenu-caret { flex-shrink: 0; transition: transform 0.15s ease; pointer-events: none; }
.nav-links li.menu-item-has-children:hover > .submenu-toggle .submenu-caret,
.nav-links li.menu-item-has-children:focus-within > .submenu-toggle .submenu-caret,
.nav-links li.menu-item-has-children.is-open > .submenu-toggle .submenu-caret {
  transform: rotate(180deg);
}
.nav-links .sub-menu {
  list-style: none;
  margin: 0;
  padding: 8px;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 230px;
  background: #FFFFFF;
  border: 1px solid #E7DFCE;
  border-radius: 6px;
  box-shadow: 0 16px 32px rgba(36, 50, 42, 0.14);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
  z-index: 30;
}
.nav-links li.menu-item-has-children:hover > .sub-menu,
.nav-links li.menu-item-has-children:focus-within > .sub-menu,
.nav-links li.menu-item-has-children.is-open > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-links .sub-menu li { position: relative; }
.nav-links .sub-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  color: #3D4A42;
  white-space: nowrap;
}
.nav-links .sub-menu a:hover { background: #F3ECDD; color: var(--accent, #C17A4E); }
.nav-links .sub-menu .sub-menu {
  top: -8px;
  left: 100%;
  margin-left: 6px;
}

@media (max-width: 900px) {
  .menu-toggle { display: inline-flex; }

  .btn-nav-phone .phone-label { display: none; }
  .btn-nav-phone { width: 44px; height: 44px; padding: 0; justify-content: center; }

  .primary-navigation {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: calc(100vh - 76px);
    overflow-y: auto;
    background: #FAF6EE;
    border-bottom: 1px solid #E7DFCE;
    box-shadow: 0 16px 28px rgba(36, 50, 42, 0.12);
  }
  .primary-navigation.is-open { display: block; }

  .nav-links { flex-direction: column; align-items: stretch; gap: 0; padding: 8px 0; }
  .nav-links > li { border-bottom: 1px solid #EFE8D6; }
  .nav-links > li:last-child { border-bottom: none; }
  .nav-links a { width: 100%; padding: 16px clamp(20px, 5vw, 56px); font-size: 16px; }

  .submenu-toggle {
    position: absolute;
    top: 0;
    right: 0;
    width: 52px;
    height: 52px;
  }

  .nav-links .sub-menu {
    position: static;
    display: block;
    opacity: 1;
    visibility: visible;
    transform: none;
    border: none;
    box-shadow: none;
    border-radius: 0;
    background: #F3ECDD;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease;
  }
  .nav-links li.menu-item-has-children:focus-within > .sub-menu,
  .nav-links li.menu-item-has-children.is-open > .sub-menu {
    max-height: 600px;
  }
  .nav-links .sub-menu a { padding: 12px clamp(28px, 7vw, 64px); }
}

/* ---------- Hero ---------- */
.hero-section { padding: clamp(56px, 9vw, 108px) 0 clamp(48px, 7vw, 88px); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 48px;
  align-items: center;
}
.hero-title { font-size: clamp(34px, 4.4vw, 54px); letter-spacing: -0.01em; }
.hero-text { font-size: 18px; line-height: 1.65; color: #4B564D; margin: 24px 0 0; max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 36px; }
.hero-art { position: relative; min-height: 320px; display: flex; align-items: center; justify-content: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

/* ---------- Quote band ---------- */
.quote-section { background: #2F4A3D; padding: clamp(56px, 8vw, 92px) 0; }
.quote-inner { max-width: 780px; margin: 0 auto; text-align: center; }
.quote-text { color: #F3ECDD; font-size: clamp(22px, 3vw, 30px); font-style: italic; line-height: 1.45; margin: 0; }
.quote-author { color: #A9BEAE; font-size: 14px; letter-spacing: 0.04em; margin-top: 20px; }

/* ---------- Services ---------- */
.services-section { padding: clamp(64px, 9vw, 108px) 0; }
.section-heading { max-width: 620px; margin: 0 auto 48px; text-align: center; }
.section-heading h2 { font-size: clamp(28px, 3.4vw, 40px); }
.services-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.card { background: #FFFFFF; border: 1px solid #E7DFCE; border-radius: 4px; padding: 32px 28px; }
.icon-badge {
  width: 48px; height: 48px; border-radius: 50%;
  background: color-mix(in oklch, var(--accent, #C17A4E) 14%, #FAF6EE);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent, #C17A4E);
  margin-bottom: 20px;
}
.card h3 { font-size: 21px; margin-bottom: 10px; }
.card p { font-size: 15px; line-height: 1.6; color: #5B665D; margin: 0; }
@media (max-width: 900px) { .services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .services-grid { grid-template-columns: 1fr; } }

/* ---------- Posts list ("Wpisy") ---------- */
.posts-section { padding: clamp(64px, 9vw, 108px) 0; background: #F3ECDD; border-top: 1px solid #E7DFCE; border-bottom: 1px solid #E7DFCE; }
.posts-header { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.posts-header p { font-size: 15px; color: #5B665D; margin: 0; max-width: 40ch; }
.posts-list { background: #FFFFFF; border: 1px solid #E7DFCE; border-radius: 6px; margin-top: 32px; overflow: hidden; }
.post-row {
  display: grid;
  grid-template-columns: 92px 1fr auto auto;
  align-items: center;
  gap: 24px;
  padding: 22px 20px;
  border-radius: 4px;
  border-bottom: 1px solid #E7DFCE;
  transition: background 0.15s ease, padding-left 0.15s ease;
  color: inherit;
}
.post-row:last-child { border-bottom: none; }
.post-row:hover { background: color-mix(in oklch, var(--accent, #C17A4E) 6%, #FFFFFF); padding-left: 28px; color: inherit; }
.post-row:hover .post-title { color: var(--accent, #C17A4E); }
.post-date { font-size: 13px; font-weight: 600; color: #7C9A82; letter-spacing: 0.02em; white-space: nowrap; }
.post-title { font-family: "Cormorant Garamond", Georgia, serif; font-size: clamp(19px, 2.1vw, 23px); font-weight: 500; color: #24322A; line-height: 1.3; transition: color 0.15s ease; }
.post-tag { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: #6E8574; background: #EFE8D6; padding: 6px 12px; border-radius: 20px; white-space: nowrap; }
.post-arrow { color: var(--accent, #C17A4E); flex-shrink: 0; transition: transform 0.15s ease; }
.post-row:hover .post-arrow { transform: translateX(4px); }
.posts-empty { padding: 32px 20px; color: #5B665D; font-size: 15px; }
@media (max-width: 720px) {
  .post-row { grid-template-columns: 1fr auto; row-gap: 8px; }
  .post-row .post-date { grid-column: 1; order: 1; }
  .post-row .post-title { grid-column: 1 / -1; order: 3; }
  .post-row .post-tag { grid-column: 2; order: 2; justify-self: end; }
  .post-row .post-arrow { display: none; }
}

/* ---------- Pagination (blog/archive) ---------- */
.tzn-pagination { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 48px 0 0; }
.tzn-pagination a, .tzn-pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px; padding: 0 12px;
  border: 1px solid #E7DFCE; border-radius: 3px; font-size: 14px; color: #3D4A42;
}
.tzn-pagination .current { background: var(--accent, #C17A4E); border-color: var(--accent, #C17A4E); color: #FAF6EE; }

/* ---------- About ---------- */
.about-section { padding: clamp(64px, 9vw, 108px) 0; background: #F3ECDD; }
.about-grid { display: grid; grid-template-columns: minmax(0,0.85fr) minmax(0,1.15fr); gap: 56px; align-items: center; }
.about-photo-wrap { display: flex; justify-content: center; }
.about-photo {
  width: 100%; max-width: 300px; aspect-ratio: 4/5;
  border: 1.5px solid #C9BFA2; border-radius: 4px; background: #FAF6EE;
  display: flex; align-items: center; justify-content: center; position: relative;
  overflow: hidden;
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about-monogram { font-family: "Cormorant Garamond", serif; font-size: 44px; color: #2F4A3D; font-style: italic; }
.about-text p { font-size: 17px; line-height: 1.7; color: #4B564D; margin: 0 0 16px; }
@media (max-width: 780px) { .about-grid { grid-template-columns: 1fr; } }

/* ---------- Contact CTA ---------- */
.contact-section { background: #2F4A3D; padding: clamp(64px, 9vw, 100px) 0; }
.contact-inner { text-align: center; max-width: 680px; margin: 0 auto; }
.contact-inner h2 { color: #F3ECDD; font-size: clamp(28px, 3.6vw, 42px); }
.contact-inner > p { font-size: 17px; line-height: 1.6; color: #C3D2C6; margin: 18px 0 36px; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-bottom: 34px; }
.contact-details { display: flex; flex-wrap: wrap; gap: 28px; justify-content: center; font-size: 14px; color: #A9BEAE; }
.contact-details a { color: #A9BEAE; }

/* ---------- Footer ---------- */
.site-footer { padding: 52px 0 36px; background: #24322A; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); gap: 40px; }
.footer-logo { margin-bottom: 14px; }
.footer-logo img { height: 30px; width: auto; display: block; }
.footer-tagline { font-size: 14px; line-height: 1.6; color: #8FA093; max-width: 32ch; margin: 0; }
.footer-col-title { font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: #6E8574; margin-bottom: 14px; }
.footer-links { display: flex; flex-direction: column; gap: 10px; font-size: 14px; list-style: none; margin: 0; padding: 0; }
.footer-links a { color: #C3D2C6; }
.footer-bottom {
  border-top: 1px solid #3A473F; margin-top: 36px; padding-top: 20px;
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; font-size: 13px; color: #6E8574;
}
.footer-bottom a { color: #8FA093; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Generic content pages (page.php / single.php) ---------- */
.page-hero { padding: clamp(48px, 7vw, 76px) 0 24px; text-align: center; }
.page-hero h1 { font-size: clamp(30px, 4vw, 46px); }
.entry-content-wrap { padding: 0 0 clamp(56px, 8vw, 96px); }
.entry-content { max-width: 760px; margin: 0 auto; font-size: 17px; line-height: 1.75; color: #3D4A42; }
.entry-content h2 { font-size: clamp(24px, 3vw, 32px); margin-top: 1.6em; }
.entry-content h3 { font-size: clamp(20px, 2.4vw, 24px); margin-top: 1.4em; }
.entry-content p { margin: 0 0 1.2em; }
.entry-content ul, .entry-content ol { margin: 0 0 1.2em; padding-left: 1.4em; }
.entry-content img { border-radius: 4px; margin: 1.2em 0; }
.entry-content blockquote {
  margin: 1.6em 0; padding: 4px 0 4px 24px; border-left: 3px solid var(--accent, #C17A4E);
  font-family: "Cormorant Garamond", serif; font-style: italic; font-size: 22px; color: #2F4A3D;
}
.entry-meta { font-size: 14px; color: #6E8574; margin-bottom: 8px; }
.entry-meta a { color: #6E8574; }
