/* Mrągowo Bus APEX 9.18 — unified history design system */
:root{
  --hist-bg:#03101a;
  --hist-panel:#081c2b;
  --hist-panel-2:#0b2437;
  --hist-panel-3:#0f2b41;
  --hist-line:rgba(255,255,255,.09);
  --hist-text:#eef7ff;
  --hist-soft:#d7e8f5;
  --hist-muted:#92adc2;
  --hist-cyan:#20dcff;
  --hist-mint:#39efb0;
  --hist-gold:#f6ca43;
  --hist-shadow:0 24px 70px rgba(0,0,0,.32);
  --hist-radius:28px;
}

html{scroll-behavior:smooth}
body.history-unified{
  margin:0;
  min-height:100vh;
  color:var(--hist-text);
  background:
    radial-gradient(circle at 75% 6%,rgba(20,133,180,.17),transparent 28%),
    radial-gradient(circle at 18% 20%,rgba(27,226,203,.07),transparent 26%),
    linear-gradient(180deg,#061725 0%,#03101a 45%,#02080e 100%);
  font-family:Inter,Segoe UI,Arial,sans-serif;
  line-height:1.65;
}
body.history-unified *{box-sizing:border-box}
body.history-unified a{color:inherit}
body.history-unified main.history-unified-main,
body.history-unified main.seo-wrap.history-unified-main{
  max-width:none !important;
  width:100%;
  padding:0 !important;
  margin:0 !important;
}

/* shared local history navigation */
.history-unified-nav{
  position:sticky;
  top:0;
  z-index:60;
  width:100%;
  background:rgba(3,13,22,.88);
  border-bottom:1px solid var(--hist-line);
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
}
.history-unified-nav-inner{
  width:min(1280px,calc(100% - 40px));
  min-height:64px;
  margin:0 auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
}
.history-unified-brand{
  display:flex;
  align-items:center;
  gap:11px;
  flex:0 0 auto;
  text-decoration:none;
  color:#fff;
  font-weight:900;
  letter-spacing:.01em;
}
.history-unified-brand img{
  width:38px;
  height:38px;
  border-radius:12px;
  box-shadow:0 9px 28px rgba(32,220,255,.16);
}
.history-unified-brand strong{color:#fff}
.history-unified-brand em{color:var(--hist-cyan);font-style:normal}
.history-unified-tabs{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:7px;
  flex-wrap:wrap;
}
.history-unified-tabs a{
  display:inline-flex;
  align-items:center;
  min-height:36px;
  padding:8px 13px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:999px;
  text-decoration:none;
  color:#abc1d2;
  font-size:13px;
  font-weight:700;
  transition:transform .2s ease,background .2s ease,border-color .2s ease,color .2s ease,box-shadow .2s ease;
  transform-origin:center;
}
@media (hover:hover) and (pointer:fine){
  .history-unified-tabs a:hover{
    transform:translateY(-1px) scale(1.045);
    color:#fff;
    border-color:rgba(32,220,255,.33);
    background:rgba(32,220,255,.075);
    box-shadow:0 8px 28px rgba(18,185,225,.09);
  }
}
.history-unified-tabs a.active,
.history-unified-tabs a[aria-current="page"]{
  color:#fff;
  border-color:rgba(32,220,255,.46);
  background:linear-gradient(135deg,rgba(32,220,255,.15),rgba(57,239,176,.08));
  box-shadow:inset 0 0 0 1px rgba(32,220,255,.05),0 8px 28px rgba(18,185,225,.07);
}

/* shared hero */
body.history-unified .hero,
body.history-unified .history-unified-hero{
  width:min(1280px,calc(100% - 40px));
  margin:0 auto;
  padding:56px 0 28px !important;
}
body.history-unified .hero-card,
body.history-unified .history-unified-hero-card{
  display:grid;
  grid-template-columns:minmax(0,1.08fr) minmax(320px,.92fr);
  gap:28px;
  min-height:450px;
  padding:28px !important;
  border:1px solid var(--hist-line) !important;
  border-radius:34px !important;
  background:
    radial-gradient(circle at 92% 8%,rgba(32,220,255,.1),transparent 28%),
    linear-gradient(180deg,rgba(10,34,51,.98),rgba(5,19,30,.96)) !important;
  box-shadow:var(--hist-shadow) !important;
  overflow:hidden;
}
body.history-unified .hero-card>div:first-child,
body.history-unified .history-unified-hero-copy{
  display:flex;
  min-width:0;
  flex-direction:column;
  justify-content:center;
}
body.history-unified .kicker,
body.history-unified .seo-kicker,
body.history-unified .section-kicker{
  display:inline-flex;
  align-self:flex-start;
  align-items:center;
  gap:8px;
  padding:7px 12px;
  border-radius:999px;
  border:1px solid rgba(57,239,176,.16);
  background:rgba(57,239,176,.08);
  color:var(--hist-mint) !important;
  font-size:12px !important;
  font-weight:900 !important;
  letter-spacing:.12em;
  text-transform:uppercase;
}
body.history-unified .hero h1,
body.history-unified .history-unified-hero h1,
body.history-unified .history-doc-hero h1{
  max-width:820px;
  margin:16px 0 14px !important;
  color:#f4f9fd !important;
  font-size:clamp(38px,4.15vw,64px) !important;
  line-height:1.02 !important;
  letter-spacing:-.035em;
}
body.history-unified .lead,
body.history-unified .history-unified-lead,
body.history-unified .history-doc-lead{
  max-width:800px;
  margin:0 !important;
  color:#d0e2ee !important;
  font-size:17px !important;
  line-height:1.75 !important;
}
body.history-unified .hero-actions,
body.history-unified .seo-actions{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-top:24px !important;
}
body.history-unified .btn,
body.history-unified .seo-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:44px;
  padding:11px 17px !important;
  border-radius:14px !important;
  border:1px solid rgba(255,255,255,.1) !important;
  text-decoration:none;
  font-weight:850 !important;
  transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease,background .18s ease;
}
body.history-unified .btn-primary,
body.history-unified .seo-btn:not(.alt){
  color:#03121c !important;
  border-color:transparent !important;
  background:linear-gradient(135deg,#3a9fff,#1ce0ff) !important;
  box-shadow:0 10px 30px rgba(25,190,245,.17);
}
body.history-unified .btn-secondary,
body.history-unified .seo-btn.alt{
  color:#eef7ff !important;
  background:rgba(255,255,255,.035) !important;
}
@media (hover:hover) and (pointer:fine){
  body.history-unified .btn:hover,
  body.history-unified .seo-btn:hover{transform:translateY(-1px) scale(1.02);box-shadow:0 12px 34px rgba(20,177,225,.12)}
}
body.history-unified .hero-media,
.history-unified-hero-media{
  display:flex;
  min-width:0;
  flex-direction:column;
  justify-content:center;
  gap:16px;
}
body.history-unified .hero-media>img,
.history-unified-hero-media>img{
  display:block;
  width:100%;
  max-height:278px;
  aspect-ratio:16/10;
  object-fit:cover;
  border:1px solid rgba(255,255,255,.08);
  border-radius:25px;
  background:#061522;
  box-shadow:0 18px 50px rgba(0,0,0,.22);
}
body.history-unified .statbox,
.history-unified-stats{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}
body.history-unified .stat,
.history-unified-stat{
  min-height:108px;
  padding:16px 17px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:21px;
  background:linear-gradient(180deg,rgba(17,42,60,.86),rgba(8,25,38,.94));
}
body.history-unified .stat b,
body.history-unified .stat strong,
.history-unified-stat b{
  display:block;
  margin:0 0 5px;
  color:#fff;
  font-size:27px;
  line-height:1.1;
}
body.history-unified .stat span,
.history-unified-stat span{
  color:#9dbbd0;
  font-size:13px;
  line-height:1.5;
}

/* global content width */
body.history-unified main>section:not(.hero):not(.history-unified-hero),
body.history-unified .history-doc-note,
body.history-unified .history-doc-grid,
body.history-unified .history-photo-archive,
body.history-unified .history-commons-archive,
body.history-unified .history-doc-cta{
  width:min(1280px,calc(100% - 40px));
  margin-left:auto !important;
  margin-right:auto !important;
}
body.history-unified main>section:not(.hero):not(.history-unified-hero){padding:24px 0 !important}
body.history-unified .section-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:24px;
  margin:0 0 18px;
}
body.history-unified .section-head h2{margin:0;color:#f1f7fc;font-size:clamp(27px,3vw,40px);line-height:1.1;letter-spacing:-.02em}
body.history-unified .section-head p{max-width:860px;margin:8px 0 0;color:var(--hist-muted)}
body.history-unified .badge{
  display:inline-flex;
  align-items:center;
  min-height:36px;
  padding:7px 12px;
  border:1px solid rgba(32,220,255,.28) !important;
  border-radius:999px !important;
  background:rgba(32,220,255,.07) !important;
  color:var(--hist-cyan) !important;
  font-size:12px;
  font-weight:850;
}

/* unified card language across old and new history pages */
body.history-unified :is(.card,.history-doc-card,.history-photo-card,.history-commons-card,.era-card,.step,.mini-item,.photo,.tile,.history-doc-note,.history-doc-cta,.note){
  border:1px solid var(--hist-line) !important;
  border-radius:var(--hist-radius) !important;
  background:linear-gradient(180deg,rgba(9,28,42,.96),rgba(5,17,27,.97)) !important;
  box-shadow:0 16px 42px rgba(0,0,0,.18) !important;
}
body.history-unified :is(.card,.history-doc-card,.era-card,.step,.mini-item){color:var(--hist-text)}
body.history-unified :is(.card,.history-doc-card,.era-card) h2,
body.history-unified :is(.card,.history-doc-card,.era-card) h3,
body.history-unified :is(.photo,.tile,.history-photo-card,.history-commons-card) h3,
body.history-unified :is(.photo,.tile,.history-photo-card,.history-commons-card) h4{
  color:#f3f9fd !important;
  letter-spacing:-.018em;
}
body.history-unified :is(.card,.history-doc-card,.era-card,.photo,.tile,.history-photo-card,.history-commons-card,.step,.mini-item) p{
  color:var(--hist-soft) !important;
}
body.history-unified :is(.card,.history-doc-card,.era-card) ul,
body.history-unified .credit,
body.history-unified :is(.history-photo-meta,.history-commons-credit){color:var(--hist-muted) !important}

body.history-unified .grid-2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
body.history-unified .grid-3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
body.history-unified .grid-4{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}
body.history-unified .tiles{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
body.history-unified .gallery{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}

body.history-unified .tile,
body.history-unified .photo{overflow:hidden;text-decoration:none}
body.history-unified :is(.tile,.photo)>img,
body.history-unified :is(.tile,.photo) img{
  width:100%;
  background:#061522;
  object-fit:cover;
}
body.history-unified .tile>img{aspect-ratio:16/9}
body.history-unified .photo>img{aspect-ratio:4/3}
body.history-unified .tile-body,
body.history-unified .photo .body{padding:18px !important}

/* old communication page normalization */
body.history-unified .history-doc-note{margin-top:0 !important;padding:17px 18px !important;color:#cfe4f2 !important}
body.history-unified .history-doc-grid{display:grid !important;grid-template-columns:repeat(2,minmax(0,1fr)) !important;gap:18px !important;padding:24px 0 !important}
body.history-unified .history-doc-card{padding:22px !important;margin:0 !important}
body.history-unified .history-doc-card.wide{grid-column:1/-1}
body.history-unified .history-doc-date{display:inline-flex;padding:6px 10px;border-radius:999px;background:rgba(57,239,176,.08);color:var(--hist-mint);font-size:12px;font-weight:850}
body.history-unified .history-photo-archive,
body.history-unified .history-commons-archive{padding:24px 0 !important}
body.history-unified .history-photo-head,
body.history-unified .history-commons-head{margin-bottom:18px}
body.history-unified .history-photo-grid,
body.history-unified .history-commons-grid{gap:18px !important}
body.history-unified .history-photo-card,
body.history-unified .history-commons-card{overflow:hidden}
body.history-unified .history-photo-card img,
body.history-unified .history-commons-card img{border-radius:0 !important}
body.history-unified .history-doc-cta{padding:22px !important;margin-top:24px !important;display:flex;align-items:center;justify-content:space-between;gap:22px}

/* city development timeline */
body.history-unified .timeline{display:grid;gap:18px}
body.history-unified .era{display:grid;grid-template-columns:130px minmax(0,1fr);gap:18px;align-items:stretch}
body.history-unified .era-year{
  display:flex;
  flex-direction:column;
  justify-content:center;
  text-align:center;
  padding:18px;
  border:1px solid var(--hist-line);
  border-radius:24px;
  background:linear-gradient(180deg,#0b2639,#061522);
  color:#fff;
  font-size:25px;
  font-weight:900;
}
body.history-unified .era-year small{display:block;margin-top:7px;color:var(--hist-muted);font-size:12px;line-height:1.45}
body.history-unified .era-card{padding:22px !important}

/* source / note consistency */
body.history-unified .note{padding:14px 16px !important;color:#d8e7f0 !important}
body.history-unified .source-list,
body.history-unified .history-doc-source-list{display:flex;flex-wrap:wrap;gap:10px}
body.history-unified .source-list a,
body.history-unified .history-doc-source-list a{
  display:inline-flex;
  padding:9px 12px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:14px;
  background:rgba(255,255,255,.03);
  color:#cfe8f7;
  text-decoration:none;
}
body.history-unified .source-list a:hover,
body.history-unified .history-doc-source-list a:hover{border-color:rgba(32,220,255,.28);background:rgba(32,220,255,.055)}

/* footer */
.history-unified-footer,
body.history-unified .seo-footer,
body.history-unified .footer{
  width:min(1280px,calc(100% - 40px));
  margin:18px auto 0 !important;
  padding:30px 0 52px !important;
  border-top:1px solid rgba(255,255,255,.06);
  color:#7893a7 !important;
  text-align:center;
  font-size:13px;
}

@media (max-width:1080px){
  .history-unified-nav-inner{align-items:flex-start;flex-direction:column;padding:12px 0}
  .history-unified-tabs{justify-content:flex-start}
  body.history-unified .hero-card,
  body.history-unified .history-unified-hero-card{grid-template-columns:1fr;min-height:0}
  body.history-unified .hero-media>img,
  .history-unified-hero-media>img{max-height:360px}
  body.history-unified .grid-4{grid-template-columns:repeat(2,minmax(0,1fr))}
  body.history-unified .gallery{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:760px){
  .history-unified-nav-inner,
  body.history-unified .hero,
  body.history-unified .history-unified-hero,
  body.history-unified main>section:not(.hero):not(.history-unified-hero),
  body.history-unified .history-doc-note,
  body.history-unified .history-doc-grid,
  body.history-unified .history-photo-archive,
  body.history-unified .history-commons-archive,
  body.history-unified .history-doc-cta,
  .history-unified-footer,
  body.history-unified .seo-footer,
  body.history-unified .footer{width:min(100% - 24px,1280px)}
  .history-unified-tabs{width:100%;overflow:auto;flex-wrap:nowrap;padding-bottom:2px;scrollbar-width:none}
  .history-unified-tabs::-webkit-scrollbar{display:none}
  .history-unified-tabs a{white-space:nowrap}
  body.history-unified .hero,
  body.history-unified .history-unified-hero{padding-top:28px !important}
  body.history-unified .hero-card,
  body.history-unified .history-unified-hero-card{padding:20px !important;border-radius:26px !important}
  body.history-unified .hero h1,
  body.history-unified .history-unified-hero h1{font-size:36px !important}
  body.history-unified .statbox,
  .history-unified-stats,
  body.history-unified .grid-2,
  body.history-unified .grid-3,
  body.history-unified .grid-4,
  body.history-unified .tiles,
  body.history-unified .gallery,
  body.history-unified .history-doc-grid{grid-template-columns:1fr !important}
  body.history-unified .section-head{display:block}
  body.history-unified .badge{margin-top:12px}
  body.history-unified .era{grid-template-columns:1fr}
  body.history-unified .history-doc-cta{display:block}
  body.history-unified .history-doc-cta .seo-btn{margin-top:14px}
}

/* compatibility for the development-history hero from 9.14 */
body.history-unified .hero-aside{
  display:flex;
  min-width:0;
  flex-direction:column;
  justify-content:center;
  gap:16px;
}
body.history-unified .hero-aside>img{
  display:block;
  width:100%;
  max-height:278px;
  aspect-ratio:16/10;
  object-fit:cover;
  border:1px solid rgba(255,255,255,.08);
  border-radius:25px;
  background:#061522;
  box-shadow:0 18px 50px rgba(0,0,0,.22);
}
body.history-unified .mini-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}
body.history-unified .mini,
body.history-unified .hero-aside .stat{
  min-height:108px;
  padding:16px 17px !important;
  border:1px solid rgba(255,255,255,.08) !important;
  border-radius:21px !important;
  background:linear-gradient(180deg,rgba(17,42,60,.86),rgba(8,25,38,.94)) !important;
}
body.history-unified .mini b{display:block;color:#fff;font-size:16px;line-height:1.2}
body.history-unified .mini p{margin:6px 0 0 !important;color:#9dbbd0 !important;font-size:13px !important;line-height:1.5}
@media (max-width:760px){body.history-unified .mini-grid{grid-template-columns:1fr}}
