/*
Theme Name: Lokomotywa One Page
Theme URI: https://example.org/
Author: Stowarzyszenie Lokomotywa
Description: Lekki, dostępny motyw jednostronicowy dla Stowarzyszenia Lokomotywa.
Version: 1.6.2
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: lokomotywa
*/

:root {
  --ink: #172038;
  --muted: #5c6475;
  --paper: #ffffff;
  --soft: #f3f6fb;
  --green: #5bc500;
  --green-dark: #269500;
  --blue: #304aa7;
  --blue-dark: #203679;
  --amber: #5bc500;
  --white: #ffffff;
  --line: #e3e7f0;
  --shadow: 0 18px 50px rgba(32, 54, 121, .14);
  --radius: 22px;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 400 17px/1.65 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: inherit; }
img { max-width: 100%; height: auto; }
.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; }
.skip-link:focus { position: fixed; z-index: 1000; top: 10px; left: 10px; width: auto; height: auto; margin: 0; padding: 10px 16px; clip: auto; background: #fff; color: #000; }
.container { width: min(calc(100% - 40px), var(--max)); margin-inline: auto; }
.section { padding: 92px 0; }
.section--soft { background: var(--soft); }
.eyebrow { margin: 0 0 8px; color: var(--blue); font-size: .82rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, h3 { margin-top: 0; line-height: 1.12; letter-spacing: -.025em; }
h1 { font-size: clamp(2.65rem, 4.8vw, 4.65rem); margin-bottom: 20px; }
h2 { font-size: clamp(2rem, 4vw, 3.55rem); margin-bottom: 20px; }
h3 { font-size: 1.35rem; }
.lead { max-width: 760px; color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.25rem); }
.section-head { max-width: 790px; margin-bottom: 44px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 12px 22px; border: 2px solid transparent; border-radius: 999px; background: var(--blue); color: #fff; font-weight: 750; text-decoration: none; transition: .2s ease; }
.btn:hover, .btn:focus-visible { background: var(--blue-dark); transform: translateY(-2px); }
.btn--light { border-color: var(--blue); background: #fff; color: var(--blue); }
.btn--light:hover, .btn--light:focus-visible { background: var(--soft); color: var(--blue-dark); }

.site-header { position: sticky; z-index: 50; top: 0; border-top: 5px solid var(--green); border-bottom: 1px solid rgba(32,54,121,.1); background: rgba(255,255,255,.96); backdrop-filter: blur(14px); }
.nav-wrap { min-height: 94px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); font-weight: 850; text-decoration: none; line-height: 1.05; }
.brand img { display: block; width: 285px; max-height: 78px; object-fit: contain; object-position: left center; }
.brand-mark { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; background: var(--green); color: #fff; font-weight: 900; }
.custom-logo-link { display: block; }
.custom-logo { max-height: 74px; width: auto; }
.brand small { display: block; margin-top: 5px; color: var(--muted); font-size: .72rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; }
.site-nav { display: flex; gap: 24px; align-items: center; }
.site-nav a { font-size: .93rem; font-weight: 700; text-decoration: none; }
.site-nav a:hover, .site-nav a:focus-visible { color: var(--blue); }
.menu-toggle { display: none; border: 0; background: transparent; color: var(--ink); font: inherit; font-weight: 800; }

.hero { position: relative; overflow: hidden; min-height: 620px; display: grid; align-items: center; background: linear-gradient(125deg, #fff 0%, #fff 62%, #f3f6fb 62%); }
.hero::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 9px; background: linear-gradient(90deg, var(--blue) 0 68%, var(--green) 68%); }
.hero-grid { display: grid; grid-template-columns: 1fr 1.08fr; gap: 54px; align-items: center; padding: 62px 0 72px; }
.hero-content { position: relative; z-index: 2; }
.hero .lead { color: var(--muted); }
.hero-card { position: relative; overflow: hidden; border: 8px solid #fff; border-radius: 28px; background: var(--soft); box-shadow: var(--shadow); transform: rotate(1deg); }
.hero-card::after { content: ""; position: absolute; width: 180px; height: 180px; right: -90px; bottom: -90px; background: var(--green); transform: rotate(45deg); }
.hero-card img { display: block; width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero-stat { display: flex; gap: 18px; align-items: center; margin-top: 28px; color: var(--muted); }
.hero-stat strong { font-size: 2.3rem; color: var(--green-dark); line-height: 1; }

.about-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 70px; align-items: center; }
.about-panel { position: relative; min-height: 440px; margin: 0; overflow: hidden; border: 8px solid #fff; border-radius: var(--radius); background: var(--soft); box-shadow: var(--shadow); }
.about-panel img { display: block; width: 100%; height: 440px; object-fit: cover; object-position: center 45%; }
.about-panel figcaption { position: absolute; left: 18px; right: 18px; bottom: 18px; padding: 14px 18px; border-left: 6px solid var(--green); border-radius: 10px; background: rgba(32,54,121,.92); color: #fff; font-size: .95rem; font-weight: 720; backdrop-filter: blur(8px); }
.checks { margin: 28px 0 0; padding: 0; list-style: none; display: grid; gap: 13px; }
.checks li { position: relative; padding-left: 34px; }
.checks li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: #ebf8df; color: var(--green-dark); font-weight: 900; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card { padding: 30px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: 0 8px 30px rgba(18,74,59,.06); }
.card-icon { width: 50px; height: 50px; display: grid; place-items: center; margin-bottom: 22px; border-radius: 15px; background: #eef1fb; color: var(--blue); font-size: 1.35rem; font-weight: 900; }
.card p { margin-bottom: 0; color: var(--muted); }

.projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.project { min-height: 350px; padding: 36px; display: flex; flex-direction: column; justify-content: end; overflow: hidden; position: relative; border-radius: var(--radius); background: var(--blue); color: #fff; }
.project::before { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(28,45,101,.98), rgba(48,74,167,.42)); }
.project:nth-child(2) { background: #4ca800; }
.project:nth-child(2)::before { background: linear-gradient(0deg, rgba(35,110,0,.98), rgba(91,197,0,.35)); }
.project:nth-child(3) { background: #2d74a8; }
.project:nth-child(4) { background: #6f52a2; }
.project--leaders { background-image: url('assets/winter-community.webp'); background-size: cover; background-position: center; }
.project--leaders::before { background: linear-gradient(0deg, rgba(27,44,99,.98), rgba(27,44,99,.12) 78%); }
.project.project--safety { background-color: #183f27; background-image: url('assets/poster-bezpieczny-dom.jpg'); background-size: auto 100%; background-position: right center; background-repeat: no-repeat; }
.project.project--safety::before { background: linear-gradient(90deg, rgba(18,69,37,1) 0%, rgba(18,69,37,.98) 52%, rgba(18,69,37,.72) 72%, rgba(18,69,37,.28) 100%); }
.project.project--active { background-color: #253466; background-image: url('assets/poster-aktywni-plus.jpg'); background-size: auto 100%; background-position: right center; background-repeat: no-repeat; }
.project.project--active::before { background: linear-gradient(90deg, rgba(31,43,91,1) 0%, rgba(31,43,91,.98) 52%, rgba(31,43,91,.72) 72%, rgba(31,43,91,.28) 100%); }
.project--safety .project-content, .project--active .project-content { max-width: 62%; }
.project.project--resilient { background-image: url('assets/project-odporni-lokalnie.webp'); background-size: cover; background-position: center; }
.project.project--resilient::before { background: linear-gradient(0deg, rgba(42,39,92,.98), rgba(42,39,92,.12) 78%); }
.project-content { position: relative; z-index: 1; }
.project-tag { display: inline-block; margin-bottom: 14px; padding: 5px 10px; border-radius: 999px; background: rgba(255,255,255,.16); font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.project p { margin-bottom: 0; color: #e5f0ec; }

.gallery-grid { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: 220px; gap: 18px; }
.gallery-item { position: relative; grid-column: span 4; margin: 0; overflow: hidden; border-radius: var(--radius); background: var(--blue-dark); box-shadow: 0 10px 32px rgba(32,54,121,.12); }
.gallery-item--large { grid-column: span 7; grid-row: span 2; }
.gallery-item--wide { grid-column: span 5; }
.gallery-item img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.gallery-item:hover img { transform: scale(1.025); }
.gallery-item figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 34px 20px 16px; background: linear-gradient(transparent, rgba(16,25,55,.9)); color: #fff; font-size: .92rem; font-weight: 750; }

.numbers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--line); }
.number { padding: 34px 24px; background: #fff; text-align: center; }
.number strong { display: block; color: var(--blue); font-size: 2.6rem; line-height: 1.1; }
.number span { color: var(--muted); font-size: .92rem; }

.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.post-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.post-card img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.post-body { padding: 24px; }
.post-body time { color: var(--muted); font-size: .82rem; }
.post-body h3 { margin: 8px 0 12px; }
.post-body a { text-decoration: none; }

.contact-wrap { display: grid; grid-template-columns: 1.2fr .8fr; gap: 60px; padding: 58px; border-radius: 30px; background: var(--blue); color: #fff; }
.contact-wrap .eyebrow { color: #baf06e; }
.contact-wrap .lead { color: #e4e8f7; }
.contact-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 18px; }
.contact-list a { color: #fff; text-underline-offset: 4px; }
.formal { padding: 28px; border-radius: 20px; background: rgba(255,255,255,.08); }
.formal dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; }
.formal dt { color: #bcd9ce; }
.formal dd { margin: 0; font-weight: 750; }

.site-footer { padding: 30px 0; border-top: 8px solid var(--green); background: var(--blue-dark); color: #e1e5f5; font-size: .88rem; }
.footer-row { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.site-footer a { color: #fff; text-underline-offset: 3px; }
.site-footer a:hover, .site-footer a:focus-visible { color: #baf06e; }

@media (max-width: 900px) {
  .menu-toggle { display: block; }
  .site-nav { position: absolute; left: 20px; right: 20px; top: 68px; display: none; padding: 20px; flex-direction: column; align-items: stretch; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); box-shadow: var(--shadow); }
  .site-nav.is-open { display: flex; }
  .hero-grid, .about-grid, .contact-wrap { grid-template-columns: 1fr; }
  .hero { background: #fff; }
  .hero-card { max-width: 720px; transform: none; }
  .cards, .news-grid { grid-template-columns: 1fr 1fr; }
  .projects { grid-template-columns: 1fr; }
  .numbers { grid-template-columns: 1fr 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 240px; }
  .gallery-item, .gallery-item--large, .gallery-item--wide { grid-column: span 1; grid-row: span 1; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .container { width: min(calc(100% - 28px), var(--max)); }
  .section { padding: 68px 0; }
  .hero { min-height: 620px; }
  .hero-grid { padding: 60px 0 72px; gap: 36px; }
  .hero-card { border-width: 5px; border-radius: 20px; }
  .nav-wrap { min-height: 78px; }
  .brand img { width: 215px; max-height: 60px; }
  .brand small { display: none; }
  .cards, .projects, .news-grid, .numbers { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; grid-auto-rows: 250px; }
  .about-panel { min-height: 330px; }
  .about-panel img { height: 330px; }
  .contact-wrap { padding: 34px 24px; }
  .formal dl { grid-template-columns: 1fr; gap: 2px; }
  .formal dd { margin-bottom: 10px; }
  .project.project--safety, .project.project--active { background-size: cover; background-position: center; }
  .project.project--safety::before { background: rgba(18,69,37,.88); }
  .project.project--active::before { background: rgba(31,43,91,.88); }
  .project--safety .project-content, .project--active .project-content { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
