/* OSP Dynów — style strony */
:root {
  --red: #D61F27;
  --red-deep: #9E0B22;
  --navy: #14243B;
  --navy-2: #1E3352;
  --paper: #F3F5F7;
  --white: #FFFFFF;
  --ink: #18202B;
  --steel: #5B6673;
  --line: #D9DEE4;
  --hivis: #DCEB2A;
  --amber: #B86E00;
  --head: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Barlow", system-ui, sans-serif;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--red-deep); text-underline-offset: .15em; }
a:hover { color: var(--red); }
:focus-visible { outline: 3px solid var(--hivis); outline-offset: 2px; box-shadow: 0 0 0 5px var(--navy); }
h1, h2, h3 { font-family: var(--head); font-weight: 700; line-height: 1.05; letter-spacing: .005em; margin: 0 0 .5em; }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.45rem; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.wrap--text { max-width: calc(720px + 2 * var(--gutter)); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -999px; top: 0; background: var(--hivis); color: var(--navy); padding: .6rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; }

/* pasek alarmowy */
.alarm { background: var(--hivis); color: var(--navy); font-size: .95rem; }
.alarm__in { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; align-items: center; padding-top: .45rem; padding-bottom: .45rem; }
.alarm a { color: var(--navy); text-decoration: none; }
.alarm b { font-family: var(--head); font-size: 1.25rem; margin-right: .25rem; }
.alarm a:hover b { text-decoration: underline; }

/* nagłówek */
.top { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.top__in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--ink); }
.brand strong { display: block; font-family: var(--head); font-size: 1.6rem; line-height: 1; }
.brand small { display: block; color: var(--steel); font-size: .85rem; }
.nav { display: flex; gap: .25rem; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 600; padding: .5rem .8rem; border-radius: 4px; }
.nav a:hover { background: var(--paper); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--red); box-shadow: inset 0 -3px 0 var(--red); border-radius: 0; }
.menu-btn { display: none; font: 600 1rem var(--body); background: var(--navy); color: #fff; border: 0; border-radius: 4px; padding: .55rem 1rem; cursor: pointer; }

@media (max-width: 860px) {
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--white); border-bottom: 1px solid var(--line); flex-direction: column; padding: .5rem var(--gutter) 1rem; }
  .nav.is-open { display: flex; }
  .nav a { padding: .8rem 0; border-bottom: 1px solid var(--line); }
  .nav a[aria-current="page"] { box-shadow: inset 4px 0 0 var(--red); padding-left: .8rem; }
}

/* szewrony — ukośne pasy jak z tyłu wozu */
.chevrons {
  height: 16px;
  background: repeating-linear-gradient(-45deg, var(--red) 0 18px, var(--white) 18px 36px);
}
.chevrons--big { height: 40px; background: repeating-linear-gradient(-45deg, var(--red) 0 34px, var(--white) 34px 68px); }

/* hero */
.hero { background: var(--navy); color: #fff; }
.hero__in { padding-top: clamp(3rem, 8vw, 6rem); padding-bottom: clamp(3rem, 7vw, 5rem); display: grid; grid-template-columns: 1fr minmax(240px, 400px); gap: 3rem; align-items: center; }
.hero__text { min-width: 0; }
.hero__emblem { width: 100%; max-width: 400px; justify-self: end; filter: drop-shadow(0 12px 30px rgba(0,0,0,.35)); }
@media (max-width: 860px) {
  .hero__in { grid-template-columns: 1fr; gap: 2rem; }
  .hero__emblem { order: -1; justify-self: start; max-width: 150px; }
}
.hero__who { margin: 0 0 1rem; color: var(--hivis); font-weight: 600; }
.hero__motto {
  font-size: clamp(3rem, 9vw, 7.25rem);
  line-height: .92;
  text-transform: uppercase;
  max-width: 13ch;
  margin-bottom: 2rem;
  text-wrap: balance;
}
.hero__lead { max-width: 56ch; font-size: 1.2rem; color: #D5DCE5; margin: 0 0 2rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: .75rem; }

/* przyciski */
.btn { display: inline-block; font: 600 1.05rem var(--body); text-decoration: none; padding: .8rem 1.4rem; border-radius: 4px; border: 2px solid transparent; }
.btn--red { background: var(--red); color: #fff; }
.btn--red:hover { background: var(--red-deep); color: #fff; }
.btn--ghost { border-color: rgba(255,255,255,.5); color: #fff; }
.btn--ghost:hover { border-color: #fff; color: #fff; background: rgba(255,255,255,.08); }
.btn--white { background: #fff; color: var(--red-deep); }
.btn--white:hover { background: var(--navy); color: #fff; }
.btn--line { border-color: var(--line); color: var(--ink); }
.btn--line:hover { border-color: var(--navy); color: var(--ink); }

/* sekcje */
.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.section--paper { background: var(--paper); }
.section__head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.section__head h2 { margin: 0; }
.section__head a { font-weight: 600; }
.empty { color: var(--steel); padding: 2rem 0; }

/* nagłówek podstron */
.pagehead { background: var(--navy); color: #fff; }
.pagehead .wrap { padding-top: clamp(2rem, 5vw, 3.5rem); padding-bottom: clamp(1.75rem, 4vw, 2.75rem); }
.pagehead h1 { font-size: clamp(2.4rem, 6vw, 4rem); margin: 0; }
.pagehead__lead { color: #D5DCE5; max-width: 60ch; margin: .75rem 0 0; font-size: 1.15rem; }
.crumbs { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: .75rem; font-size: .95rem; color: #9FB0C4; }
.crumbs a { color: #D5DCE5; }
.post__head .crumbs, .post__head .crumbs a { color: var(--steel); }

/* dziennik wpisów */
.log { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--navy); }
.log__item { display: grid; grid-template-columns: 92px 1fr 200px; gap: 1.5rem; padding: 1.5rem 0; border-bottom: 1px solid var(--line); align-items: start; }
.log__item:not(:has(.log__img)) { grid-template-columns: 92px 1fr; }
.log__date { display: flex; flex-direction: column; font-family: var(--head); line-height: 1; color: var(--navy); }
.log__day { font-size: 3rem; font-weight: 700; }
.log__mon { font-size: 1.05rem; font-weight: 600; color: var(--steel); margin-top: .2rem; }
.log__time { font-family: var(--body); font-size: .9rem; color: var(--steel); margin-top: .5rem; }
.log__body h3 { margin: .5rem 0 .35rem; }
.log__body h3 a { color: var(--ink); text-decoration: none; }
.log__body h3 a:hover { color: var(--red); text-decoration: underline; }
.log__body p { margin: 0; color: #3A4552; max-width: 62ch; }
.log__img img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; }
@media (max-width: 720px) {
  .log__item, .log__item:not(:has(.log__img)) { grid-template-columns: 64px 1fr; gap: 1rem; }
  .log__day { font-size: 2.2rem; }
  .log__mon { font-size: .9rem; }
  .log__img { grid-column: 2; order: -1; display: none; }
}

/* etykiety rodzaju zdarzenia */
.tag { display: inline-block; font-size: .85rem; font-weight: 600; padding: .15rem .55rem; border-radius: 3px; background: var(--paper); color: var(--navy); border-left: 4px solid var(--steel); }
.k-pozar { border-left-color: var(--red); color: var(--red-deep); background: #FBEAEC; }
.k-mz { border-left-color: var(--amber); color: #6E4200; background: #FDF1DE; }
.k-af { border-left-color: var(--steel); }
.k-cw { border-left-color: var(--navy); background: #E6ECF3; }

/* filtry */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; }
.filters a { text-decoration: none; color: var(--ink); border: 1px solid var(--line); padding: .35rem .8rem; border-radius: 999px; font-weight: 500; font-size: .95rem; }
.filters a:hover { border-color: var(--navy); color: var(--ink); }
.filters a[aria-current="page"] { background: var(--navy); border-color: var(--navy); color: #fff; }

.pager { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 2rem; color: var(--steel); }
.pager a { font-weight: 600; }

/* pojazdy */
.vehicles { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.vehicle { background: var(--white); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; display: flex; flex-direction: column; }
.vehicle__img img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.vehicle__img:empty { aspect-ratio: 3 / 2; background: var(--paper); }
.vehicle__body { padding: 1.1rem 1.25rem 1.25rem; border-top: 6px solid var(--red); }
.vehicle__code { font-family: var(--head); font-weight: 700; font-size: 1.15rem; color: var(--red); margin: 0 0 .2rem; }
.vehicle h3 { margin-bottom: .75rem; }
.vehicle dl { margin: 0; display: grid; gap: .3rem; font-size: .95rem; }
.vehicle dl div { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px dotted var(--line); padding-bottom: .3rem; }
.vehicle dt { color: var(--steel); }
.vehicle dd { margin: 0; font-weight: 600; text-align: right; }
.vehicles--full { grid-template-columns: 1fr; gap: 2.5rem; }
.vehicle-row { display: grid; grid-template-columns: minmax(280px, 420px) 1fr; gap: 2rem; align-items: start; }
.vehicle__desc { padding-top: .5rem; }
@media (max-width: 760px) { .vehicle-row { grid-template-columns: 1fr; gap: 1rem; } }

/* dołącz */
.join { background: var(--red); color: #fff; }
.join__in { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 2rem; align-items: center; padding-top: 3rem; padding-bottom: 3rem; }
.join h2 { margin: 0; font-size: clamp(2rem, 4vw, 3rem); }
.join__text p { margin: 0 0 .6rem; }
.join__text p:last-child { margin: 0; }
@media (max-width: 900px) { .join__in { grid-template-columns: 1fr; gap: 1.25rem; } .join .btn { justify-self: start; } }

/* wpis */
.post__head { padding: clamp(2rem, 5vw, 3.5rem) 0 1.5rem; }
.post__head h1 { font-size: clamp(2.2rem, 5.5vw, 3.6rem); margin-bottom: .75rem; text-wrap: balance; }
.post__meta { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; color: var(--steel); margin: 0; }
.post__lead { font-size: 1.25rem; color: #3A4552; margin: 1.25rem 0 0; }
.post__hero { margin: 0 auto 2rem; max-width: calc(980px + 2 * var(--gutter)); }
.post__hero img { width: 100%; max-height: 620px; object-fit: cover; border-radius: 6px; }
.post__foot { padding-top: 2rem; padding-bottom: 3.5rem; }
.post__nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 2rem; border-top: 1px solid var(--line); padding-top: 1.25rem; }
.post__nav a { text-decoration: none; color: var(--ink); font-weight: 600; }
.post__nav a:last-child { text-align: right; }
.post__nav small { display: block; color: var(--steel); font-weight: 400; }
.gallery-title { margin-top: 2.5rem; }

.prose { font-size: 1.1rem; line-height: 1.7; }
.prose > * { max-width: 68ch; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li { margin: .25rem 0; }
.prose li::marker { color: var(--red); }
.prose figure { margin: 1.5rem 0; }
.prose img { border-radius: 4px; }
.prose blockquote { margin: 1.5rem 0; padding: .25rem 0 .25rem 1.25rem; border-left: 4px solid var(--red); color: #3A4552; }

/* zdjęcia */
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, 45%), 1fr)); gap: .5rem; }
.photos a { display: block; overflow: hidden; border-radius: 4px; background: var(--paper); }
.photos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .25s; }
.photos a:hover img { transform: scale(1.03); }
.albums { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.75rem 1.5rem; }
.album { text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: .35rem; }
.album__img { display: block; border-radius: 4px; overflow: hidden; background: var(--paper); aspect-ratio: 4 / 3; }
.album__img img { width: 100%; height: 100%; object-fit: cover; }
.album__title { font-family: var(--head); font-weight: 700; font-size: 1.35rem; line-height: 1.1; margin-top: .4rem; }
.album:hover .album__title { color: var(--red); }
.album__meta, .album__date { color: var(--steel); font-size: .95rem; }
.album__date { margin: 0 0 1.25rem; }

/* lightbox */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lightbox::backdrop { background: rgba(10, 18, 30, .92); }
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox img { max-width: 92vw; max-height: 86vh; object-fit: contain; }
.lightbox button { position: absolute; background: rgba(255,255,255,.12); color: #fff; border: 0; cursor: pointer; font: 600 1rem var(--body); border-radius: 4px; }
.lightbox__close { top: 1rem; right: 1rem; padding: .6rem 1rem; }
.lightbox__nav { top: 50%; transform: translateY(-50%); font-size: 2.5rem !important; width: 3rem; height: 4rem; line-height: 1; }
.lightbox__prev { left: .75rem; }
.lightbox__next { right: .75rem; }

/* o nas */
.two-col { display: grid; grid-template-columns: 1.6fr 1fr; gap: 3rem; align-items: start; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; gap: 2rem; } }
.board { background: var(--paper); border-top: 6px solid var(--red); padding: 1.5rem; border-radius: 0 0 6px 6px; }
.board dl { margin: 0; }
.board div { padding: .6rem 0; border-bottom: 1px solid var(--line); }
.board div:last-child { border-bottom: 0; }
.board dt { color: var(--steel); font-size: .9rem; }
.board dd { margin: 0; font-weight: 600; }
.timeline { list-style: none; margin: 1.5rem 0 0; padding: 0; border-left: 3px solid var(--red); }
.timeline li { position: relative; padding: 0 0 1.5rem 1.75rem; }
.timeline li::before { content: ""; position: absolute; left: -9px; top: .35rem; width: 15px; height: 15px; background: var(--white); border: 3px solid var(--red); border-radius: 50%; }
.timeline__year { font-family: var(--head); font-weight: 700; font-size: 1.6rem; color: var(--navy); line-height: 1.1; }
.timeline p { margin: .2rem 0 0; max-width: 62ch; }

/* kontakt */
.notice { background: #FBEAEC; border-left: 5px solid var(--red); padding: 1rem 1.25rem; margin-bottom: 2rem; border-radius: 0 4px 4px 0; }
.contact { margin: 0; }
.contact div { display: grid; grid-template-columns: 150px 1fr; gap: 1rem; padding: .85rem 0; border-bottom: 1px solid var(--line); }
.contact dt { color: var(--steel); }
.contact dd { margin: 0; font-weight: 600; }
@media (max-width: 520px) { .contact div { grid-template-columns: 1fr; gap: .1rem; } }
.map { width: 100%; aspect-ratio: 4 / 3; border: 1px solid var(--line); border-radius: 6px; }
.map__link { margin: .5rem 0 0; font-size: .95rem; }

/* stopka */
.foot { background: var(--navy); color: #C5CFDB; border-top: 6px solid var(--red); font-size: .98rem; }
.foot a { color: #fff; }
.foot__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; padding-top: 3rem; padding-bottom: 2rem; }
.foot__grid p { margin: 0 0 .5rem; }
.foot__logo { width: 72px; height: 72px; margin-bottom: .75rem; }
.foot__name { font-family: var(--head); font-weight: 700; font-size: 1.5rem; color: #fff; line-height: 1.1; }
.foot__h { color: #fff; font-weight: 600; }
.foot__ids { color: #9FB0C4; font-size: .92rem; }
.foot nav { display: flex; flex-direction: column; gap: .4rem; }
.foot nav a { text-decoration: none; }
.foot nav a:hover { text-decoration: underline; color: #fff; }
.foot__bottom { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-top: 1.25rem; padding-bottom: 1.5rem; border-top: 1px solid rgba(255,255,255,.12); font-size: .9rem; color: #9FB0C4; }
.foot__bottom a { color: #9FB0C4; }
@media (max-width: 760px) { .foot__grid { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print { .alarm, .top, .foot, .chevrons, .post__foot { display: none; } }
