/*
Theme Name: RIOO – Spełnione Marzenie
Theme URI: https://rioo.pl
Author: Fundacja „Spełnione Marzenie”
Description: Autorski klasyczny motyw blokowy dla Fundacji Rodzinnego Interwencyjnego Ośrodka Opiekuńczego „Spełnione Marzenie”.
Version: 2.5
Requires at least: 6.7
Requires PHP: 8.2
Text Domain: rioo-spelnione-marzenie
*/

:root {
  --rioo-paper: #f6f1ec;
  --rioo-paper-2: #fffaf6;
  --rioo-card: #e8e4df;
  --rioo-card-2: #efe9e2;
  --rioo-ink: #1b1918;
  --rioo-muted: #695f59;
  --rioo-brick: #8e3219;
  --rioo-brick-dark: #68200f;
  --rioo-sand: #d8c4ae;
  --rioo-cream: #fff6ed;
  --rioo-line: #d5ccc5;
  --rioo-focus: #126b8a;
  --rioo-radius: 28px;
  --rioo-shadow: 8px 8px 0 rgba(27,25,24,.12);
  --rioo-max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--rioo-paper);
  color: var(--rioo-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-underline-offset: .18em; }
a:hover { color: var(--rioo-brick); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--rioo-focus); outline-offset: 4px; border-radius: 6px; }
img, svg { max-width: 100%; height: auto; }

.rioo-shell, .wp-site-blocks > * { width: 100%; }
.rioo-wrap { width: min(calc(100% - 40px), var(--rioo-max)); margin-inline: auto; }
.rioo-section { padding: clamp(64px, 8vw, 110px) 0; }
.rioo-section--tight { padding: clamp(42px, 6vw, 76px) 0; }
.rioo-eyebrow { color: var(--rioo-brick); text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 800; margin: 0 0 14px; }
.rioo-lead { max-width: 760px; font-size: clamp(1.08rem, 1.6vw, 1.3rem); color: var(--rioo-muted); }
.rioo-kicker { font-weight: 800; color: var(--rioo-brick); }
.rioo-muted { color: var(--rioo-muted); }
.rioo-center { text-align: center; }
.rioo-center .rioo-lead { margin-inline: auto; }

h1,h2,h3,h4 { line-height: 1.08; letter-spacing: -.035em; margin-top: 0; }
h1 { font-size: clamp(2.75rem, 5.7vw, 5.65rem); max-width: 920px; }
h2 { font-size: clamp(2.2rem, 5vw, 4.6rem); }
h3 { font-size: clamp(1.35rem, 2.4vw, 2rem); }
p { margin: 0 0 1.1em; }

.rioo-btn, .wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 13px 22px;
  border-radius: 16px;
  background: var(--rioo-brick);
  color: #fff !important;
  text-decoration: none;
  font-weight: 800;
  border: 2px solid var(--rioo-brick);
  box-shadow: 4px 4px 0 rgba(27,25,24,.16);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.rioo-btn:hover, .wp-block-button__link:hover { background: var(--rioo-brick-dark); transform: translate(-1px,-1px); box-shadow: 6px 6px 0 rgba(27,25,24,.16); }
.rioo-btn--ghost { background: transparent; color: var(--rioo-ink)!important; border-color: var(--rioo-ink); box-shadow: none; }
.rioo-btn--ghost:hover { background: var(--rioo-ink); color: #fff!important; }
.rioo-actions { display:flex; gap:12px; flex-wrap:wrap; margin-top: 28px; }

/* header */
.rioo-header { position: sticky; top: 0; z-index: 50; background: rgba(246,241,236,.94); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(105,95,89,.16); }
.rioo-header-inner { width:min(calc(100% - 34px), var(--rioo-max)); margin:auto; min-height:78px; display:flex; align-items:center; justify-content:space-between; gap:24px; }
.rioo-brand { text-decoration:none; display:flex; align-items:center; gap:11px; font-weight:900; letter-spacing:-.025em; }
.rioo-mark { width:38px; height:38px; border-radius:12px 12px 18px 12px; background:var(--rioo-brick); position:relative; box-shadow:3px 3px 0 rgba(27,25,24,.16); flex:0 0 auto; }
.rioo-mark:before,.rioo-mark:after { content:""; position:absolute; width:12px; height:12px; border-radius:50%; background:var(--rioo-cream); top:8px; }
.rioo-mark:before{left:7px}.rioo-mark:after{right:7px}
.rioo-mark i { position:absolute; width:20px; height:10px; border-radius:0 0 14px 14px; background:var(--rioo-cream); left:9px; bottom:7px; display:block; }
.rioo-brand small { display:block; font-weight:700; color:var(--rioo-muted); font-size:.69rem; letter-spacing:.02em; }
.rioo-nav { display:flex; align-items:center; gap:20px; flex-wrap:wrap; justify-content:flex-end; }
.rioo-nav a { text-decoration:none; font-weight:700; font-size:.93rem; }
.rioo-nav .rioo-nav-cta { padding:9px 13px; border-radius:12px; background:var(--rioo-brick); color:#fff; }

/* hero */
.rioo-hero { padding: clamp(72px, 9vw, 126px) 0 64px; overflow:hidden; }
.rioo-hero-grid { display:grid; grid-template-columns:minmax(0,1.3fr) minmax(320px,.7fr); gap:58px; align-items:center; }
.rioo-hero h1 { margin-bottom:24px; max-width:780px; }
.rioo-hero .rioo-lead { font-size:clamp(1.15rem,1.8vw,1.45rem); }
.rioo-visual { min-height:500px; position:relative; border-radius:40px; background:var(--rioo-card); overflow:hidden; box-shadow:var(--rioo-shadow); border:1px solid rgba(27,25,24,.08); }
.rioo-visual:before { content:""; position:absolute; width:330px; height:330px; border-radius:50%; background:var(--rioo-sand); right:-78px; top:-62px; }
.rioo-visual:after { content:""; position:absolute; width:260px; height:260px; border-radius:50%; background:var(--rioo-brick); left:-90px; bottom:-110px; opacity:.94; }
.rioo-family { position:absolute; inset:0; display:flex; align-items:flex-end; justify-content:center; gap:22px; padding:48px; z-index:2; }
.rioo-person { width:108px; height:235px; border-radius:58px 58px 28px 28px; background:var(--rioo-paper-2); position:relative; border:2px solid var(--rioo-ink); }
.rioo-person:before { content:""; position:absolute; width:78px; height:78px; border-radius:50%; background:var(--rioo-paper-2); border:2px solid var(--rioo-ink); top:-48px; left:13px; }
.rioo-person--child { width:82px; height:165px; background:#d7b08d; }
.rioo-person--child:before { width:60px;height:60px;left:9px;top:-38px;background:#d7b08d; }
.rioo-heart { position:absolute; top:55px; left:50%; transform:translateX(-50%) rotate(-45deg); width:62px; height:62px; background:var(--rioo-brick); z-index:4; border-radius:10px 50% 50% 50%; }
.rioo-heart:before,.rioo-heart:after{content:"";position:absolute;width:62px;height:62px;border-radius:50%;background:var(--rioo-brick)}
.rioo-heart:before{top:-30px;left:0}.rioo-heart:after{left:30px;top:0}
.rioo-visual-label { position:absolute; left:26px; right:26px; bottom:24px; background:rgba(255,250,246,.92); border:1px solid var(--rioo-line); padding:16px 18px; border-radius:18px; z-index:5; font-weight:800; }

/* stats / mission */
.rioo-mission-layout { display:grid; grid-template-columns:.88fr 1.12fr; gap:34px; align-items:stretch; }
.rioo-photo-card { min-height:520px; border-radius:var(--rioo-radius); background:linear-gradient(145deg,#5e7363,#2d4034); color:#fff; padding:28px; display:flex; align-items:flex-end; box-shadow:var(--rioo-shadow); position:relative; overflow:hidden; }
.rioo-photo-card:before { content:""; position:absolute; inset:0; background:radial-gradient(circle at 18% 18%, rgba(255,255,255,.2), transparent 28%), radial-gradient(circle at 76% 40%, rgba(216,196,174,.35), transparent 22%); }
.rioo-photo-card p { position:relative; max-width:370px; font-weight:750; font-size:1.18rem; }
.rioo-mission-cards { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:24px; }
.rioo-card { background:var(--rioo-card); border:1px solid rgba(27,25,24,.16); border-radius:var(--rioo-radius); padding:clamp(24px,3vw,38px); box-shadow:var(--rioo-shadow); }
.rioo-card h3 { margin-bottom:14px; }
.rioo-card p:last-child { margin-bottom:0; }
.rioo-card--accent { background:var(--rioo-brick); color:#fff; }
.rioo-card--accent .rioo-muted { color:#f6ded5; }
.rioo-card--paper { background:var(--rioo-paper-2); }
.rioo-icon { width:48px; height:48px; border:2px solid currentColor; border-radius:15px; display:grid; place-items:center; font-weight:900; margin-bottom:28px; color:var(--rioo-brick); }
.rioo-card--accent .rioo-icon { color:#fff; }

/* help */
.rioo-three { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:24px; margin-top:38px; }
.rioo-help-card { min-height:350px; display:flex; flex-direction:column; }
.rioo-help-card .rioo-icon { margin-bottom:auto; }
.rioo-help-card p { color:var(--rioo-muted); }

/* pillars */
.rioo-pillars { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:28px; margin-top:40px; }
.rioo-pillar { padding:clamp(30px,4vw,52px); border-radius:34px; background:var(--rioo-paper-2); border:1px solid rgba(27,25,24,.15); box-shadow:var(--rioo-shadow); min-height:430px; display:flex; flex-direction:column; }
.rioo-pillar--rioo { background:var(--rioo-brick); color:#fff; }
.rioo-pill { display:inline-flex; width:max-content; padding:7px 12px; border-radius:999px; border:1px solid currentColor; font-size:.78rem; font-weight:900; letter-spacing:.08em; text-transform:uppercase; margin-bottom:30px; }
.rioo-pillar h3 { font-size:clamp(2.8rem,5vw,5.6rem); margin:0 0 8px; }
.rioo-pillar h4 { font-size:clamp(1.25rem,2vw,1.75rem); margin-bottom:22px; max-width:520px; }
.rioo-pillar p { max-width:620px; }
.rioo-pillar .rioo-note { margin-top:auto; font-size:.88rem; opacity:.84; border-top:1px solid currentColor; padding-top:18px; }

.rioo-band { background:var(--rioo-ink); color:#fff; padding:34px 0; }
.rioo-band-inner { width:min(calc(100% - 40px), var(--rioo-max)); margin:auto; display:flex; justify-content:space-between; gap:28px; align-items:center; }
.rioo-band strong { font-size:clamp(1.35rem,2vw,2rem); }
.rioo-band span { color:#d8d0ca; }

/* current stage */
.rioo-stage { display:grid; grid-template-columns:.8fr 1.2fr; gap:34px; align-items:start; }
.rioo-timeline { display:grid; gap:16px; }
.rioo-step { background:var(--rioo-paper-2); border:1px solid var(--rioo-line); padding:22px 24px; border-radius:20px; display:grid; grid-template-columns:44px 1fr; gap:18px; }
.rioo-step-num { width:40px;height:40px;border-radius:12px;background:var(--rioo-brick);color:#fff;display:grid;place-items:center;font-weight:900; }
.rioo-step h3 { font-size:1.18rem; margin:2px 0 6px; letter-spacing:-.015em; }
.rioo-step p { margin:0;color:var(--rioo-muted); }

/* inner pages */
.rioo-page-hero { padding:80px 0 48px; }
.rioo-page-hero h1 { font-size:clamp(3rem,7vw,6.2rem); margin-bottom:20px; }
.rioo-content-grid { display:grid; grid-template-columns:minmax(0,1fr) 320px; gap:48px; align-items:start; }
.rioo-prose { max-width:820px; }
.rioo-prose h2 { font-size:clamp(1.9rem,3.5vw,3rem); margin-top:52px; }
.rioo-prose h3 { margin-top:36px; }
.rioo-prose ul { padding-left:1.25rem; }
.rioo-prose li { margin:.6rem 0; }
.rioo-aside { position:sticky; top:110px; }
.rioo-aside .rioo-card { box-shadow:none; }
.rioo-grid-2 { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; }
.rioo-grid-3 { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:24px; }
.rioo-info { border-left:4px solid var(--rioo-brick); background:var(--rioo-paper-2); padding:20px 22px; border-radius:0 18px 18px 0; }
.rioo-info strong { display:block; margin-bottom:5px; }
.rioo-list-clean { list-style:none; padding:0!important; margin:0; }
.rioo-list-clean li { padding:11px 0; border-bottom:1px solid var(--rioo-line); }
.rioo-list-clean li:last-child { border-bottom:0; }
.rioo-data { display:grid; grid-template-columns:160px 1fr; gap:8px 18px; }
.rioo-data dt { font-weight:800; }
.rioo-data dd { margin:0; }
.rioo-doc-card { display:block; text-decoration:none; }
.rioo-doc-card:hover { color:inherit; transform:translateY(-2px); }

/* footer */
.rioo-footer { background:#ebe5df; border-top:1px solid var(--rioo-line); padding:58px 0 28px; }
.rioo-footer-grid { display:grid; grid-template-columns:1.2fr .8fr .8fr; gap:40px; }
.rioo-footer h3 { font-size:1.1rem; letter-spacing:0; margin-bottom:14px; }
.rioo-footer a { display:block; text-decoration:none; margin:8px 0; }
.rioo-footer-brand { font-size:1.35rem; font-weight:900; margin-bottom:8px; }
.rioo-footer-bottom { margin-top:42px; padding-top:20px; border-top:1px solid var(--rioo-line); display:flex; justify-content:space-between; gap:20px; flex-wrap:wrap; color:var(--rioo-muted); font-size:.86rem; }

/* news */
.rioo-news-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:22px; }
.rioo-news-card { background:var(--rioo-paper-2); border:1px solid var(--rioo-line); border-radius:22px; overflow:hidden; display:flex; flex-direction:column; min-width:0; }
.rioo-news-card__image-link { display:block; overflow:hidden; background:var(--rioo-card); aspect-ratio:16 / 9; }
.rioo-news-card__image { display:block; width:100%; height:100%; object-fit:cover; transition:transform .2s ease; }
.rioo-news-card__image-link:hover .rioo-news-card__image { transform:scale(1.015); }
.rioo-news-card__body { padding:26px; display:flex; flex:1; flex-direction:column; }
.rioo-news-card time { font-size:.78rem; font-weight:800; color:var(--rioo-brick); text-transform:uppercase; letter-spacing:.08em; }
.rioo-news-card h3 { margin:12px 0; font-size:1.4rem; }
.rioo-news-card h3 a { text-decoration-thickness:1px; }
.rioo-news-card p { color:var(--rioo-muted); }
.rioo-news-more { margin-top:auto; padding-top:8px; color:var(--rioo-brick); font-weight:850; text-decoration:none; }
.rioo-news-more:hover { text-decoration:underline; }

@media (max-width: 980px) {
  .rioo-nav { gap:12px; }
  .rioo-nav a { font-size:.85rem; }
  .rioo-hero-grid, .rioo-mission-layout, .rioo-stage, .rioo-content-grid { grid-template-columns:1fr; }
  .rioo-visual { min-height:410px; }
  .rioo-aside { position:static; }
  .rioo-footer-grid { grid-template-columns:1fr 1fr; }
}
@media (max-width: 720px) {
  .rioo-wrap { width:min(calc(100% - 28px), var(--rioo-max)); }
  .rioo-header-inner { align-items:flex-start; flex-direction:column; padding:14px 0; min-height:0; }
  .rioo-nav { width:100%; justify-content:flex-start; overflow-x:auto; flex-wrap:nowrap; padding-bottom:4px; }
  .rioo-nav a { white-space:nowrap; }
  .rioo-hero { padding-top:56px; }
  .rioo-hero-grid { gap:36px; }
  .rioo-visual { min-height:345px; }
  .rioo-family { transform:scale(.78); transform-origin:center bottom; padding-bottom:38px; }
  .rioo-mission-cards, .rioo-three, .rioo-pillars, .rioo-grid-2, .rioo-grid-3, .rioo-news-grid { grid-template-columns:1fr; }
  .rioo-photo-card { min-height:390px; }
  .rioo-pillar { min-height:0; }
  .rioo-band-inner { align-items:flex-start; flex-direction:column; }
  .rioo-footer-grid { grid-template-columns:1fr; }
  .rioo-data { grid-template-columns:1fr; gap:3px; }
  .rioo-data dd { margin-bottom:12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior:auto; }
  *, *:before, *:after { transition:none!important; animation:none!important; }
}


/* v2: official Foundation logo + donation/BLIK tools */
:root { --rioo-blue: #2e83df; --rioo-blik-red:#e3003b; }
.rioo-skip { position:fixed; left:14px; top:-80px; z-index:9999; background:#fff; color:#111; padding:10px 14px; border-radius:10px; font-weight:800; box-shadow:0 3px 14px rgba(0,0,0,.18); }
.rioo-skip:focus { top:14px; }
.rioo-brand-logo { width:64px; height:64px; object-fit:contain; flex:0 0 auto; }
.rioo-brand span { line-height:1.15; }
.rioo-footer-logo-link { display:inline-block; margin-bottom:10px; }
.rioo-footer-logo { width:92px; height:92px; object-fit:contain; }
.rioo-support-section { background:linear-gradient(180deg,rgba(255,255,255,.18),rgba(216,196,174,.17)); }
.rioo-support-grid { display:grid; grid-template-columns:1.12fr .88fr; gap:28px; margin-top:38px; align-items:stretch; }
.rioo-support-grid--page { margin-top:0; }
.rioo-donate-card { background:var(--rioo-card); border:1px solid rgba(27,25,24,.12); border-radius:var(--rioo-radius); padding:clamp(28px,4vw,48px); box-shadow:var(--rioo-shadow); }
.rioo-donate-card h2,.rioo-donate-card h3 { margin-bottom:18px; }
.rioo-donate-label { display:inline-flex; padding:7px 11px; background:var(--rioo-brick); color:#fff; border-radius:999px; font-weight:850; font-size:.8rem; letter-spacing:.045em; text-transform:uppercase; margin-bottom:18px; }
.rioo-account { font-size:clamp(1.35rem,2.8vw,2.35rem); font-weight:900; letter-spacing:.015em; line-height:1.25; overflow-wrap:anywhere; margin:16px 0; }
.rioo-copy-row { display:flex; flex-wrap:wrap; gap:10px; margin-top:24px; }
.rioo-copy-btn,.rioo-blik-btn { appearance:none; border:0; cursor:pointer; font:inherit; font-weight:850; border-radius:15px; min-height:50px; padding:12px 18px; transition:transform .16s ease, box-shadow .16s ease; }
.rioo-copy-btn { background:var(--rioo-ink); color:#fff; box-shadow:4px 4px 0 rgba(27,25,24,.15); }
.rioo-copy-btn--light { background:#fff; color:var(--rioo-ink); border:1px solid rgba(27,25,24,.15); box-shadow:none; }
.rioo-copy-btn:hover,.rioo-blik-btn:hover { transform:translate(-1px,-1px); }
.rioo-donate-card--blik { background:#fff; position:relative; overflow:hidden; }
.rioo-donate-card--blik:after { content:""; width:190px; height:190px; border-radius:50%; background:rgba(227,0,59,.08); position:absolute; right:-70px; top:-70px; pointer-events:none; }
.rioo-blik-word { display:inline-flex; align-items:center; gap:5px; position:relative; font-size:clamp(2.2rem,5vw,4.1rem); line-height:1; font-weight:950; letter-spacing:-.07em; color:#111; margin-bottom:22px; z-index:1; }
.rioo-blik-word span { width:.26em; height:.26em; border-radius:50%; background:var(--rioo-blik-red); display:inline-block; margin-left:.03em; margin-top:-.38em; }
.rioo-blik-btn { display:inline-flex; align-items:center; justify-content:center; background:#111; color:#fff; box-shadow:4px 4px 0 rgba(227,0,59,.28); margin-top:10px; }
.rioo-small-note { font-size:.88rem; color:var(--rioo-muted); margin-top:18px; }
.rioo-data--support { grid-template-columns:minmax(120px,.38fr) minmax(0,1fr); }
@media (max-width:980px){ .rioo-support-grid{grid-template-columns:1fr;} }
@media (max-width:720px){ .rioo-brand-logo{width:50px;height:50px}.rioo-brand span{font-size:.96rem}.rioo-brand small{font-size:.62rem}.rioo-account{font-size:1.22rem}.rioo-copy-row{flex-direction:column;align-items:stretch}.rioo-copy-btn,.rioo-blik-btn{width:100%}.rioo-footer-logo{width:82px;height:82px}.rioo-data--support{grid-template-columns:1fr} }

.rioo-menu-toggle { display:none; appearance:none; border:1px solid rgba(27,25,24,.16); background:#fff; color:var(--rioo-ink); border-radius:12px; padding:9px 12px; font:inherit; font-weight:850; cursor:pointer; gap:7px; align-items:center; }
@media (max-width:720px){
  .rioo-header-inner{flex-direction:row;align-items:center;flex-wrap:wrap;padding:9px 0;}
  .rioo-brand{min-width:0;flex:1;}
  .rioo-brand-logo{width:46px;height:46px;}
  .rioo-menu-toggle{display:inline-flex;}
  .rioo-nav{display:none;width:100%;overflow:visible;flex-wrap:wrap;padding:9px 0 4px;border-top:1px solid rgba(27,25,24,.10);gap:8px 12px;}
  .rioo-nav.is-open{display:flex;}
  .rioo-nav a{font-size:.9rem;}
  .rioo-nav .rioo-nav-cta{margin-left:0;}
}


/* v2.2 — final pre-publication refinements */
html { scroll-padding-top: 112px; }
section[id], main[id] { scroll-margin-top: 112px; }
body.admin-bar .rioo-header { top: 32px; }
.rioo-header-inner { min-height: 76px; }
.rioo-brand-logo { background: transparent; }
.rioo-footer-logo { background: transparent; }
@media (max-width: 782px) {
  body.admin-bar .rioo-header { top: 46px; }
}
@media (max-width: 720px) {
  html { scroll-padding-top: 126px; }
  section[id], main[id] { scroll-margin-top: 126px; }
  .rioo-hero h1 { font-size: clamp(2.65rem, 13vw, 4.7rem); }
}

/* v2.3 — robust page routing for duplicate WordPress slugs */


/* v2.5 — photographic hero on the home page */
.rioo-visual--hero-photo:before,
.rioo-visual--hero-photo:after { display:none; }
.rioo-hero-photo {
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center center;
  display:block;
}
.rioo-visual--hero-photo .rioo-visual-label {
  background:rgba(255,250,246,.94);
  backdrop-filter:blur(5px);
}
@media (max-width:720px) {
  .rioo-visual--hero-photo { min-height:390px; }
  .rioo-hero-photo { object-position:center center; }
}
