/* =========================================================
   FUNDACJA UZDROWISKA SOLANKI PRO ZDROWIE — style.css
   Palette: deep pine, solanka gold, cream, ink
   Fonts: Fraunces (display) + Figtree (body)
   ========================================================= */

:root {
  --pine: #0E4A44;
  --pine-dark: #0A3630;
  --pine-tint: #E4EEEC;
  --gold: #C9A24B;
  --gold-dark: #A9832F;
  --cream: #F7F4EC;
  --cream-soft: #FDFBF5;
  --ink: #22302C;
  --muted: #5C6B66;
  --border: #E3DED1;
  --radius: 14px;
  --shadow-sm: 0 2px 8px rgba(14, 74, 68, .08);
  --shadow-md: 0 10px 28px rgba(14, 74, 68, .12);
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Figtree', 'Segoe UI', Arial, sans-serif;
}

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: #FFFFFF;
  line-height: 1.7;
  font-size: 1.02rem;
  padding-top: 76px;
}

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

h1, h2, h3, .display-serif {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--pine-dark);
  line-height: 1.15;
}

h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.35rem); }

p { color: var(--ink); }
.lead { color: var(--muted); font-size: 1.08rem; }
a { color: var(--pine); }
a:hover { color: var(--gold-dark); }

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

/* ---------- Buttons ---------- */
.btn-pine {
  background: var(--pine);
  color: #fff;
  border-radius: var(--radius);
  padding: .7rem 1.6rem;
  font-weight: 600;
  border: 2px solid var(--pine);
  transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}
.btn-pine:hover, .btn-pine:focus-visible {
  background: var(--pine-dark);
  border-color: var(--pine-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-outline-pine {
  color: var(--pine);
  border: 2px solid var(--pine);
  border-radius: var(--radius);
  padding: .7rem 1.6rem;
  font-weight: 600;
  background: transparent;
  transition: all .2s ease;
}
.btn-outline-pine:hover, .btn-outline-pine:focus-visible {
  background: var(--pine);
  border-color: var(--pine);
  color: #fff;
}

/* ---------- Header ---------- */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 50;
}
.brand-logo { width: 250px; height: auto; }
@media (max-width: 480px) { .brand-logo { width: 200px; } }
@media (min-width: 992px) {
  .site-header { box-shadow: 0 8px 24px rgba(10,54,48,.06); }
  .site-nav { min-height: 76px; }
}

.site-nav .nav-link {
  color: var(--ink);
  font-weight: 600;
  font-size: .95rem;
  padding: .55rem .8rem;
  border-radius: 10px;
  transition: color .15s ease, background .15s ease;
}
.site-nav .nav-link:hover,
.site-nav .nav-link.active {
  color: var(--pine);
  background: var(--pine-tint);
}

.navbar-toggler {
  border: 2px solid var(--pine);
  border-radius: 10px;
  padding: .4rem .6rem;
  flex-shrink: 0;
}
.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='%230E4A44' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.5' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: .15rem;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .25rem .5rem;
}
.lang-btn {
  border: 0;
  background: transparent;
  font-weight: 700;
  font-size: .85rem;
  color: var(--muted);
  padding: .2rem .55rem;
  border-radius: 999px;
  transition: all .15s ease;
}
.lang-btn:hover { color: var(--pine); }
.lang-btn[aria-pressed="true"] {
  background: var(--pine);
  color: #fff;
}
.lang-sep { color: var(--border); font-weight: 700; }

/* ---------- Hero (index) ---------- */
.hero {
  background:
    linear-gradient(160deg, rgba(10,54,48,.94) 0%, rgba(14,74,68,.88) 55%, rgba(14,74,68,.82) 100%),
    var(--pine-dark);
  color: #fff;
  padding: clamp(4rem, 9vw, 7rem) 0;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  right: -120px;
  top: -120px;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201,162,75,.28), transparent 70%);
  pointer-events: none;
}
.hero .kicker {
  display: inline-block;
  color: var(--gold);
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: .8rem;
  margin-bottom: 1rem;
}
.hero h1 { color: #fff; }
.hero .hero-accent {
  font-style: italic;
  font-weight: 500;
  color: var(--gold);
}
.hero .lead { color: rgba(255,255,255,.88); max-width: 46rem; }
.hero .org-name {
  font-size: clamp(.8rem, 1.6vw, .95rem);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.75);
  font-weight: 600;
  margin-bottom: 1.4rem;
}

/* ---------- Sections & shared ---------- */
.section { padding: clamp(3rem, 6vw, 5rem) 0; }
.section-cream { background: var(--cream); }
.section-pine { background: var(--pine-dark); color: #fff; }
.section-pine h2, .section-pine h3 { color: #fff; }
.section-pine p { color: rgba(255,255,255,.85); }

.section-intro { max-width: 46rem; margin-left: auto; margin-right: auto; color: var(--muted); }

.eyebrow {
  display: inline-block;
  color: var(--gold-dark);
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: .78rem;
  margin-bottom: .6rem;
}
.section-pine .eyebrow { color: var(--gold); }

.page-hero {
  background: var(--pine-dark);
  color: #fff;
  padding: clamp(3rem, 6vw, 4.5rem) 0;
  position: relative;
  overflow: hidden;
}
.page-hero::after {
  content: "";
  position: absolute;
  right: 8%;
  bottom: -5rem;
  width: 16rem;
  height: 16rem;
  border: 1px solid rgba(201,162,75,.28);
  border-radius: 50%;
  box-shadow: 0 0 0 1.5rem rgba(201,162,75,.06), 0 0 0 3rem rgba(201,162,75,.035);
  pointer-events: none;
}
.page-hero h1 { color: #fff; margin-bottom: .6rem; }
.page-hero p { color: rgba(255,255,255,.85); max-width: 48rem; margin-bottom: 0; }

.divider-gold {
  width: 64px;
  height: 4px;
  background: var(--gold);
  border-radius: 999px;
  margin: 1.2rem 0;
}

/* ---------- Cards ---------- */
.card-soft {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.6rem;
  height: auto;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card-soft:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: rgba(201,162,75,.55); }

.card-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--pine-tint);
  color: var(--pine);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-family: var(--font-display);
  margin-bottom: 1rem;
  flex-shrink: 0;
}

.img-rounded {
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: transform .35s ease, box-shadow .35s ease;
}
.img-rounded:hover { transform: scale(1.012); box-shadow: var(--shadow-md); }

/* ---------- Project cards ---------- */
.project-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  height: auto;
  transition: transform .2s ease, box-shadow .2s ease;
}
.project-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.project-card img {
  width: 100%;
  aspect-ratio: 11 / 5;
  object-fit: cover;
}
.project-card .project-body { padding: 1.3rem 1.4rem 1.5rem; }
.project-badge {
  display: inline-block;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: .25rem .75rem;
  margin-bottom: .7rem;
}
.badge-active { background: var(--pine-tint); color: var(--pine); }
.badge-past { background: #EFEBE0; color: #8A7B50; }
.project-meta {
  font-size: .88rem;
  color: var(--muted);
  margin-bottom: .4rem;
}

/* ---------- Timeline ---------- */
.timeline {
  position: relative;
  padding-left: 1.8rem;
  border-left: 3px solid var(--pine-tint);
}
.timeline-item { position: relative; padding-bottom: 2rem; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -2.45rem;
  top: .35rem;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--gold);
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px var(--gold);
}
.timeline-year {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--pine);
  font-size: 1.05rem;
}

/* ---------- Statutory goals list ---------- */
.goals-list {
  columns: 1;
  padding-left: 0;
  list-style: none;
  counter-reset: goal;
}
@media (min-width: 768px) { .goals-list { columns: 2; column-gap: 2.5rem; } }
.goals-list li {
  break-inside: avoid;
  counter-increment: goal;
  position: relative;
  padding-left: 2.4rem;
  margin-bottom: 1rem;
  font-size: .97rem;
}
.goals-list li::before {
  content: counter(goal, decimal-leading-zero);
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--gold-dark);
  position: absolute;
  left: 0;
  top: .05rem;
  font-size: .95rem;
}

/* ---------- Blog ---------- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.6rem;
}
.blog-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.blog-card-link { display: block; text-decoration: none; color: inherit; height: 100%; }
.blog-card-media img {
  width: 100%;
  aspect-ratio: 11 / 5;
  object-fit: cover;
}
.blog-card-body { display: block; padding: 1.25rem 1.35rem 1.4rem; }
.blog-card-tag {
  display: inline-block;
  background: var(--pine-tint);
  color: var(--pine);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: .22rem .7rem;
  margin-bottom: .7rem;
}
.blog-card-title {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.12rem;
  color: var(--pine-dark);
  line-height: 1.3;
  margin-bottom: .5rem;
}
.blog-card-excerpt {
  display: block;
  color: var(--muted);
  font-size: .92rem;
  margin-bottom: .9rem;
}
.blog-card-meta {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .82rem;
  color: var(--muted);
}

/* ---------- Post page ---------- */
.post-main { padding: clamp(2.5rem, 5vw, 4rem) 0; }
.post-article .post-header { margin-bottom: 2rem; }
.post-article .post-date { color: var(--muted); font-size: .9rem; }
.post-article .post-featured {
  border-radius: var(--radius);
  width: 100%;
  aspect-ratio: 11 / 5;
  object-fit: cover;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}
.post-article h2 { font-size: 1.5rem; margin-top: 2rem; }
.post-article .post-hero {
  background: var(--pine-dark);
  color: #fff;
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 2rem;
}
.post-article .post-hero h1 { color: #fff; font-size: clamp(1.5rem, 3vw, 2.2rem); }
.post-article .post-hero .post-date { color: rgba(255,255,255,.75); }

[data-blog-toc] { margin-top: 2.5rem; }
[data-blog-toc]:empty { display: none; }
.toc-box {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.3rem 1.5rem;
}
.toc-box h2 { font-size: 1.05rem; margin-bottom: .8rem; }
.toc-box ul { margin: 0; padding-left: 1.1rem; }
.toc-box li { margin-bottom: .3rem; font-size: .95rem; }

[data-blog-related] { margin-top: 3rem; }
[data-blog-related]:empty { display: none; }
.related-title { font-size: 1.3rem; margin-bottom: 1.2rem; }

/* ---------- Contact ---------- */
.contact-card {
  background: var(--cream-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  box-shadow: var(--shadow-sm);
}
.contact-card h2, .contact-card h3 { font-size: 1.1rem; margin-bottom: .6rem; }
.contact-card p, .contact-card li { margin-bottom: .35rem; }
.contact-card a { font-weight: 600; word-break: break-word; }
.contact-card ul { padding-left: 0; list-style: none; margin-bottom: 0; }

.form-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem;
  box-shadow: var(--shadow-sm);
}
.form-card .form-label { font-weight: 600; font-size: .92rem; }
.form-control, .form-select {
  border-radius: 10px;
  border-color: var(--border);
  padding: .65rem .9rem;
}
.form-control:focus, .form-select:focus {
  border-color: var(--pine);
  box-shadow: 0 0 0 .2rem rgba(14,74,68,.14);
}

.map-embed {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.map-embed iframe { display: block; width: 100%; height: 360px; border: 0; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--cream);
  color: var(--muted) !important;
  margin-top: 0;
}
.site-footer h2,
.site-footer h3,
.site-footer p,
.site-footer li,
.site-footer span {
  color: var(--muted) !important;
}
.site-footer .footer-heading {
  color: var(--pine-dark) !important;
  font-size: 1rem;
  margin-bottom: .9rem;
}
.site-footer .footer-heading span { color: var(--pine-dark) !important; }
.site-footer .footer-about { font-size: .93rem; margin-top: 1rem; color: var(--muted) !important; }
.site-footer .footer-reg {
  font-size: .85rem;
  color: var(--muted) !important;
  margin-bottom: 0;
  line-height: 1.6;
}
.footer-logo { width: 240px; height: auto; background: #fff; padding: 6px 10px; border-radius: 8px; }
.site-footer .footer-links {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
}
.site-footer .footer-links li { margin-bottom: .45rem; font-size: .93rem; }
.site-footer .footer-links a { color: var(--pine) !important; text-decoration: none; }
.site-footer .footer-doc { font-size: .88rem; color: var(--muted) !important; }
.site-footer .footer-doc a { color: var(--gold) !important; text-decoration: underline; text-underline-offset: 3px; }
.site-footer .footer-links a:hover,
.site-footer .footer-links a:focus-visible,
.site-footer .footer-doc a:hover,
.site-footer .footer-doc a:focus-visible { color: var(--gold) !important; }
.footer-main { padding: clamp(2.5rem, 5vw, 3.5rem) 0 2rem; }
.footer-bottom {
  border-top: 1px solid rgba(201,162,75,.45);
  padding: 1.4rem 0 1.6rem;
  font-size: .88rem;
  color: var(--muted) !important;
  text-align: center;
}
.vibeotter-link {
  opacity: .9;
  font-weight: 300;
  color: var(--muted) !important;
  text-decoration: none;
}
.vibeotter-link:hover { color: inherit; opacity: .8; }

/* ---------- Misc ---------- */
.fact-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}
.fact-item {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--radius);
  padding: .9rem 1.3rem;
}
.fact-item .fact-value {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1.2;
}
.fact-item .fact-label { font-size: .85rem; color: rgba(255,255,255,.8); }

.quote-card {
  border-left: 4px solid var(--gold);
  background: var(--cream);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.4rem 1.6rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--pine-dark);
}

.breadcrumb-visual {
  font-size: .9rem;
  color: rgba(255,255,255,.7);
  margin-bottom: .8rem;
}
.breadcrumb-visual a { color: var(--gold); text-decoration: none; }

.react-top-button {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 40;
  width: 2.9rem;
  height: 2.9rem;
  border: 1px solid var(--gold);
  border-radius: 50%;
  background: var(--pine);
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .2s ease, visibility .2s ease, transform .2s ease, background .2s ease;
}
.react-top-button.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.react-top-button:hover,
.react-top-button:focus-visible { background: var(--pine-dark); color: #fff; }

/* ---------- Motion system ---------- */
@keyframes hero-rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes hero-glow {
  from { opacity: 0; transform: scale(.92); }
  to { opacity: 1; transform: scale(1); }
}
.hero > .container,
.page-hero .container { animation: hero-rise .7s cubic-bezier(.2,.75,.25,1) both; }
.hero::after { animation: hero-glow 1.1s ease-out .15s both; }
body.motion-ready .motion-reveal {
  opacity: 1;
  transform: translateY(24px);
  transition: opacity .65s ease, transform .65s cubic-bezier(.2,.75,.25,1);
}
body.motion-ready .motion-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
body.motion-ready .motion-reveal:nth-child(2) { transition-delay: .08s; }
body.motion-ready .motion-reveal:nth-child(3) { transition-delay: .16s; }
body.motion-ready .motion-reveal:nth-child(4) { transition-delay: .24s; }

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

@media (max-width: 576px) {
  body { padding-top: 72px; }
  .hero { padding: 3.2rem 0; }
  .form-card { padding: 1.3rem; }
  .project-card .project-body { padding: 1.1rem 1.1rem 1.3rem; }
  .react-top-button { right: .85rem; bottom: .85rem; }
}
