/*
Theme Name: Bioua
Theme URI: https://bioua.org.ua
Description: Сучасна тема у стилі «bio/wellness» для блогу про психологію стосунків. Чистий семантичний SEO-HTML, один H1 на сторінку, заокруглені картки, адаптивна верстка.
Author: Claude Dev
Version: 1.0.0
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bioua
*/

/* ============================================================
   Design tokens — modern natural / wellness (green-forward)
   ============================================================ */
:root {
  --bg:        #f3f2ea;
  --bg-2:      #eae8db;
  --card:      #ffffff;
  --ink:       #1b2620;
  --ink-soft:  #45524a;
  --muted:     #79857b;
  --line:      #e0ded0;
  --green:     #2e6b53;   /* primary accent */
  --green-dk:  #1f4d3b;
  --ochre:     #c79a3e;   /* secondary      */

  --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --text-base: clamp(1rem, 0.96rem + 0.25vw, 1.08rem);
  --text-hero: clamp(2.4rem, 1.4rem + 4.4vw, 4.8rem);
  --text-h2:   clamp(1.7rem, 1.25rem + 1.9vw, 2.5rem);
  --text-h3:   clamp(1.2rem, 1.02rem + 0.8vw, 1.5rem);

  --space-section: clamp(3.2rem, 2.3rem + 4vw, 6rem);
  --container:  1180px;
  --container-narrow: 720px;
  --radius:     16px;
  --radius-lg:  28px;
  --radius-pill: 999px;

  --duration: 280ms;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow: 0 16px 40px -22px rgba(31, 77, 59, 0.45);
  --shadow-sm: 0 6px 20px -12px rgba(31, 77, 59, 0.4);
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-decoration: none; transition: color var(--duration) var(--ease); }
a:hover { color: var(--green-dk); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  color: var(--ink);
}
p { margin: 0 0 1.2em; }

:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 4px; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: clamp(1.1rem, 0.5rem + 3vw, 2.5rem); }
.container--narrow { max-width: var(--container-narrow); }

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--green); color: #fff; padding: 0.75rem 1.25rem; z-index: 1000; font-weight: 600; border-radius: 0 0 10px 0; }
.skip-link:focus { left: 0; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }

/* category pill */
.pill {
  display: inline-flex; align-items: center;
  font-size: 0.74rem; font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--green-dk);
  background: rgba(46, 107, 83, 0.12);
  padding: 0.32rem 0.8rem; border-radius: var(--radius-pill);
}
.eyebrow { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase; color: var(--green); }

/* ============================================================
   Header
   ============================================================ */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(243,242,234,0.85); backdrop-filter: saturate(140%) blur(12px); border-bottom: 1px solid var(--line); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 78px; }
.site-brand { font-family: var(--font-display); font-size: 1.55rem; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); display: inline-flex; align-items: center; gap: 0.5rem; }
.site-brand:hover { color: var(--green); }
.site-brand__leaf { width: 14px; height: 14px; border-radius: 0 50% 50% 50%; background: var(--green); transform: rotate(45deg); }
.site-brand img { max-height: 46px; width: auto; }

.main-nav ul { list-style: none; display: flex; gap: clamp(0.8rem, 0.4rem + 1.4vw, 2rem); margin: 0; padding: 0; }
.main-nav a { color: var(--ink-soft); font-size: 0.95rem; font-weight: 500; padding: 0.5rem 0.2rem; border-radius: 8px; }
.main-nav a:hover, .main-nav .current-menu-item > a { color: var(--green-dk); }

.nav-toggle { display: none; background: none; border: 1px solid var(--line); color: var(--ink); width: 46px; height: 42px; border-radius: 12px; cursor: pointer; align-items: center; justify-content: center; }
.nav-toggle svg { width: 22px; height: 22px; }

/* ============================================================
   Hero (centered) + featured card
   ============================================================ */
.hero { text-align: center; padding-block: clamp(3rem, 5vw, 6rem) clamp(2rem, 3vw, 3rem); position: relative; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(60% 70% at 50% 0%, rgba(46,107,83,0.12), transparent 70%);
}
.hero h1 { font-size: var(--text-hero); margin: 1rem auto 0.6rem; max-width: 16ch; text-wrap: balance; }
.hero__lede { color: var(--ink-soft); font-size: clamp(1.05rem, 1rem + 0.45vw, 1.3rem); max-width: 60ch; margin: 0 auto; }

.feature { margin-top: clamp(2.5rem, 4vw, 4rem); }
.feature__card {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 0;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow);
}
.feature__media { overflow: hidden; min-height: 320px; background: var(--bg-2); }
.feature__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 700ms var(--ease); }
.feature__card:hover .feature__media img { transform: scale(1.04); }
.feature__body { padding: clamp(1.6rem, 1rem + 2vw, 3rem); display: flex; flex-direction: column; gap: 0.9rem; align-items: flex-start; justify-content: center; text-align: left; }
.feature__title { font-size: clamp(1.6rem, 1.1rem + 2vw, 2.6rem); margin: 0; }
.feature__title a { color: var(--ink); }
.feature__title a:hover { color: var(--green); }
.feature__excerpt { color: var(--ink-soft); margin: 0; font-size: 1.05rem; }
.meta-row { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; color: var(--muted); font-size: 0.85rem; }
.meta-row .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--ochre); }

/* ============================================================
   Section head
   ============================================================ */
.section { padding-block: var(--space-section); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 1.2rem; flex-wrap: wrap; margin-bottom: clamp(1.8rem, 1.2rem + 2vw, 2.8rem); }
.section-head h2, .section-head__title { font-size: var(--text-h2); margin: 0; }
.section-head__title { font-family: var(--font-display); font-weight: 600; line-height: 1.1; letter-spacing: -0.02em; color: var(--ink); }

/* ============================================================
   Cards (rounded, soft shadow)
   ============================================================ */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: clamp(1.4rem, 1rem + 1.5vw, 2.2rem); }
.card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease); }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.card__media { overflow: hidden; aspect-ratio: 16 / 10; background: var(--bg-2); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease); }
.card:hover .card__media img { transform: scale(1.06); }
.card__media-fallback { display: block; width: 100%; height: 100%; background: linear-gradient(140deg, #dfe6dd, #cdd8cc); }
.card__body { padding: 1.4rem 1.5rem 1.6rem; display: flex; flex-direction: column; gap: 0.7rem; flex: 1; }
.card__title { font-size: var(--text-h3); line-height: 1.22; margin: 0; }
.card__title a { color: var(--ink); }
.card__title a:hover { color: var(--green); }
.card__excerpt { color: var(--ink-soft); font-size: 0.95rem; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card__meta { margin-top: auto; padding-top: 0.3rem; font-size: 0.8rem; color: var(--muted); display: flex; gap: 0.6rem; align-items: center; }
.card__meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted); }

/* ============================================================
   Single
   ============================================================ */
.breadcrumbs { font-size: 0.85rem; color: var(--muted); padding-block: 1.3rem; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; padding: 0; align-items: center; }
.breadcrumbs li { display: inline-flex; align-items: center; gap: 0.5rem; }
.breadcrumbs li:not(:last-child)::after { content: "›"; color: var(--muted); }
.breadcrumbs a { color: var(--ink-soft); }

.entry-header { padding-block: clamp(0.5rem, 2vw, 1.5rem) clamp(1.2rem, 2vw, 2rem); text-align: center; }
.entry-title { font-size: clamp(2rem, 1.3rem + 3vw, 3.6rem); margin: 0.8rem auto 1rem; max-width: 18ch; text-wrap: balance; }
.entry-meta { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; justify-content: center; color: var(--muted); font-size: 0.9rem; }
.entry-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--ochre); }

.entry-featured { margin: 0 0 clamp(1.8rem, 3vw, 2.8rem); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.entry-featured img { width: 100%; max-height: 560px; object-fit: cover; }

.entry-content { font-size: clamp(1.06rem, 1rem + 0.4vw, 1.2rem); line-height: 1.85; color: var(--ink-soft); }
.entry-content > * { margin-bottom: 1.4em; }
.entry-content h2 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.1rem); margin: 1.8em 0 0.5em; color: var(--ink); }
.entry-content h3 { font-size: var(--text-h3); margin: 1.5em 0 0.4em; color: var(--ink); }
.entry-content a { text-decoration: underline; text-underline-offset: 3px; }
.entry-content img { border-radius: var(--radius); }
.entry-content blockquote { border-left: 4px solid var(--green); background: var(--bg-2); margin: 1.6em 0; padding: 1rem 1.5rem; border-radius: 0 var(--radius) var(--radius) 0; font-size: 1.2rem; color: var(--ink); }
.entry-content ul, .entry-content ol { padding-left: 1.4rem; }
.entry-content li { margin-bottom: 0.4em; }
.entry-content li::marker { color: var(--green); }
.entry-content figcaption { color: var(--muted); font-size: 0.86rem; text-align: center; margin-top: 0.5rem; }

.entry-tags { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 2.5rem; padding-top: 1.8rem; border-top: 1px solid var(--line); }
.entry-tags a { font-size: 0.82rem; color: var(--green-dk); background: rgba(46,107,83,0.1); padding: 0.4rem 0.9rem; border-radius: var(--radius-pill); }
.entry-tags a:hover { background: var(--green); color: #fff; }

.related { margin-top: var(--space-section); padding-top: var(--space-section); border-top: 1px solid var(--line); }

/* ============================================================
   Archive / page hero
   ============================================================ */
.page-hero { text-align: center; padding-block: clamp(2.8rem, 4vw, 4.5rem) clamp(1.5rem, 2.5vw, 2.2rem); position: relative; }
.page-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(60% 80% at 50% 0%, rgba(46,107,83,0.1), transparent 70%); }
.page-hero h1 { font-size: clamp(2.1rem, 1.4rem + 3vw, 3.8rem); margin: 0.6rem 0 0.5rem; }
.page-hero p { color: var(--ink-soft); max-width: 56ch; margin: 0 auto; }

/* ============================================================
   Buttons + pagination
   ============================================================ */
.btn { display: inline-flex; align-items: center; gap: 0.55rem; padding: 0.9rem 1.8rem; font-weight: 600; font-size: 0.95rem; border-radius: var(--radius-pill); transition: transform var(--duration) var(--ease), background var(--duration) var(--ease); }
.btn--primary { background: var(--green); color: #fff; }
.btn--primary:hover { background: var(--green-dk); color: #fff; transform: translateY(-2px); }

.pagination { margin-top: clamp(2.5rem, 4vw, 4rem); }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; }
.pagination .page-numbers { min-width: 46px; height: 46px; display: inline-flex; align-items: center; justify-content: center; padding-inline: 0.7rem; border: 1px solid var(--line); border-radius: 12px; color: var(--ink-soft); font-weight: 600; background: var(--card); }
.pagination .page-numbers:hover { border-color: var(--green); color: var(--green); }
.pagination .page-numbers.current { background: var(--green); color: #fff; border-color: var(--green); }

/* ============================================================
   Footer
   ============================================================ */
.site-footer { margin-top: var(--space-section); background: var(--ink); color: #d8e0d9; padding-block: clamp(3rem, 5vw, 4.5rem) 2rem; }
.site-footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 2.5rem; margin-bottom: 3rem; }
.site-footer__title { font-family: var(--font-body); font-size: 0.76rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: #8fa093; margin: 0 0 1.1rem; }
.site-footer__about .site-footer__brand { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; color: #fff; display: block; margin-bottom: 0.6rem; }
.site-footer__about p { color: #aeb8af; max-width: 38ch; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.site-footer ul a { color: #aeb8af; font-size: 0.95rem; }
.site-footer ul a:hover { color: #fff; }
.site-footer__bottom { border-top: 1px solid rgba(255,255,255,0.12); padding-top: 1.6rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; font-size: 0.84rem; color: #8fa093; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 880px) {
  .nav-toggle { display: inline-flex; }
  .main-nav { position: absolute; top: 100%; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: 1rem clamp(1.1rem,0.5rem+3vw,2.5rem) 1.5rem; display: none; }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0.2rem; }
  .main-nav a { display: block; padding: 0.6rem 0; }
  .feature__card { grid-template-columns: 1fr; }
  .feature__media { min-height: 230px; }
  .site-footer__grid { grid-template-columns: 1fr; gap: 2rem; }
}

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