/* =============================================================================
   scenaspatif.pl — Gorzowski Magazyn Miejski i Informator Usługowy
   Paleta barw spójna z gorzowwlkp.pl (granat #072b4f, błękit #0e3d68, pomarańcz #e89b2f)
   Lekki, ultra-szybki, w 100% responsywny CSS bez zewnętrznych zależności.
   ========================================================================== */

:root {
  --brand:       #0e3d68;   /* granat rozjaśniony */
  --brand-600:   #072b4f;   /* granat głęboki - kolor wiodący */
  --brand-800:   #041a30;
  --brand-300:   #6d93b8;
  --brand-tint:  #eaf0f7;
  --accent:      #e89b2f;   /* ciepły pomarańcz/amber z logo gorzowwlkp.pl */
  --accent-hover:#d3861c;
  --accent-tint: #fdf4e7;
  
  --ink:         #16202a;
  --ink-2:       #334155;
  --muted:       #64748b;
  --line:        #e2e8f0;
  --line-2:      #cbd5e1;
  --bg:          #f8fafc;
  --card:        #ffffff;
  
  --ok:          #16a34a;
  --ok-tint:     #f0fdf4;
  --star:        #f59e0b;
  
  --wrap:        1180px;
  --wrap-text:   860px;
  --r:           12px;
  --r-sm:        8px;
  --shadow-sm:   0 1px 3px rgba(15, 23, 42, 0.08);
  --shadow:      0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
  --shadow-md:   0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
  --shadow-lg:   0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.05);
  
  --ff: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --transition:  all 0.2s ease-in-out;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--ff);
  color: var(--ink);
  background-color: var(--bg);
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--brand);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  transition: var(--transition);
}
a:hover {
  color: var(--accent-hover);
}

img, svg {
  vertical-align: middle;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 1.25rem;
  width: 100%;
}

.wrap-text {
  max-width: var(--wrap-text);
  margin: 0 auto;
  padding: 0 1.25rem;
  width: 100%;
}

/* ----------------- Header & Navigation ----------------- */
.site-head {
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.head-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--brand-600);
}
.brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: var(--brand-600);
  color: #fff;
  border-radius: var(--r-sm);
  font-weight: 800;
  font-size: 1.1rem;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.brand-text strong {
  font-size: 1.15rem;
  color: var(--brand-600);
  letter-spacing: -0.02em;
}
.brand-text span {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.head-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.head-nav a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink-2);
  padding: 0.5rem 0.25rem;
  border-bottom: 2px solid transparent;
}
.head-nav a:hover,
.head-nav a.active {
  color: var(--brand);
  border-bottom-color: var(--accent);
}

.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent);
  color: #ffffff !important;
  font-weight: 700 !important;
  padding: 0.6rem 1.2rem !important;
  border-radius: var(--r-sm);
  border: none !important;
  box-shadow: 0 2px 4px rgba(232, 155, 47, 0.3);
  text-decoration: none !important;
}
.btn-cta:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(232, 155, 47, 0.4);
}

.burger {
  display: none;
  background: none;
  border: 1px solid var(--line-2);
  padding: 0.5rem;
  border-radius: var(--r-sm);
  cursor: pointer;
}
.burger svg {
  width: 24px;
  height: 24px;
  stroke: var(--ink);
}

.mnav {
  display: none;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  padding: 1rem 1.25rem;
  flex-direction: column;
  gap: 0.75rem;
}
.mnav.open {
  display: flex;
}
.mnav a {
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink-2);
  padding: 0.5rem 0;
}

/* ----------------- Hero Section ----------------- */
.hero {
  background: linear-gradient(135deg, #072b4f 0%, #0e3d68 100%);
  color: #ffffff;
  padding: 3.5rem 0 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at top right, rgba(232, 155, 47, 0.15) 0%, transparent 60%);
  pointer-events: none;
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  color: var(--accent-tint);
}
.hero h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}
.hero-sub {
  font-size: 1.15rem;
  max-width: 720px;
  margin: 0 auto 2rem;
  color: #d8e5f2;
  line-height: 1.6;
}

.hero-search {
  max-width: 620px;
  margin: 0 auto;
  position: relative;
}
.hero-search input {
  width: 100%;
  padding: 1rem 1.25rem 1rem 3.25rem;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  background: #ffffff;
  font-size: 1rem;
  font-family: inherit;
  color: var(--ink);
  outline: none;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}
.hero-search input:focus {
  border-color: var(--accent);
}
.hero-search-ico {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  width: 20px;
  height: 20px;
}

/* ----------------- Stats bar ----------------- */
.stats-bar {
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  padding: 1.25rem 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  text-align: center;
}
.stat-item strong {
  display: block;
  font-size: 1.75rem;
  color: var(--brand-600);
  font-weight: 800;
  line-height: 1.1;
}
.stat-item span {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
}

/* ----------------- Category Grid (Homepage) ----------------- */
.section-pad {
  padding: 3.5rem 0;
}
.section-title {
  text-align: center;
  margin-bottom: 2.5rem;
}
.section-title h2 {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--brand-600);
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}
.section-title p {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 640px;
  margin: 0 auto;
}

.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1.5rem;
}
.cat-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 1.5rem;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  position: relative;
  box-shadow: var(--shadow-sm);
}
.cat-card:hover {
  transform: translateY(-4px);
  border-color: var(--brand-300);
  box-shadow: var(--shadow-md);
}
.cat-badge {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--brand);
  background: var(--brand-tint);
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  align-self: flex-start;
  margin-bottom: 0.75rem;
}
.cat-icon-wrap {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: var(--brand-tint);
  color: var(--brand-600);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}
.cat-icon-wrap svg {
  width: 24px;
  height: 24px;
}
.cat-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}
.cat-card:hover h3 {
  color: var(--brand);
}
.cat-card p {
  font-size: 0.88rem;
  color: var(--ink-2);
  line-height: 1.5;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}
.cat-link-text {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--brand);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.cat-card:hover .cat-link-text {
  color: var(--accent);
}

/* ----------------- Subpage / Article Layout ----------------- */
.page-header {
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  padding: 2.25rem 0 2rem;
}
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.breadcrumbs a {
  color: var(--muted);
  text-decoration: none;
}
.breadcrumbs a:hover {
  color: var(--brand);
}
.breadcrumbs span {
  color: var(--line-2);
}

.page-header h1 {
  font-size: clamp(1.85rem, 3.5vw, 2.4rem);
  font-weight: 800;
  color: var(--brand-600);
  line-height: 1.2;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.article-lead {
  font-size: 1.15rem;
  color: var(--ink-2);
  line-height: 1.7;
  padding: 1.25rem 1.5rem;
  background: var(--brand-tint);
  border-left: 4px solid var(--brand);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  margin: 2rem 0;
  font-weight: 500;
}

.article-content {
  background: var(--card);
  padding: 2.5rem 2rem;
  border-radius: var(--r);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  margin-bottom: 2.5rem;
}
.article-content h2 {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--brand-600);
  margin: 2rem 0 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--line);
  line-height: 1.3;
}
.article-content h2:first-of-type {
  margin-top: 0;
}
.article-content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  margin: 1.5rem 0 0.75rem;
}
.article-content p {
  margin-bottom: 1.2rem;
  color: var(--ink-2);
  font-size: 1rem;
  line-height: 1.75;
}
.article-content ul, 
.article-content ol {
  margin: 1rem 0 1.5rem 1.5rem;
  color: var(--ink-2);
}
.article-content li {
  margin-bottom: 0.6rem;
  line-height: 1.6;
}
.article-content strong {
  color: var(--ink);
}

/* ----------------- Contextual Outbound Link Box ----------------- */
.portal-cta-box {
  background: linear-gradient(135deg, #fdf9f2 0%, #fff7ea 100%);
  border: 2px solid var(--accent);
  border-radius: var(--r);
  padding: 1.75rem;
  margin: 2.5rem 0;
  box-shadow: var(--shadow);
}
.portal-cta-box-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.portal-cta-text h3 {
  color: var(--brand-600);
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 0.4rem;
}
.portal-cta-text p {
  color: var(--ink-2);
  font-size: 0.95rem;
  margin-bottom: 0;
  line-height: 1.5;
}
.portal-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--brand-600);
  color: #ffffff !important;
  font-weight: 700 !important;
  padding: 0.75rem 1.4rem;
  border-radius: var(--r-sm);
  text-decoration: none !important;
  white-space: nowrap;
  box-shadow: 0 4px 6px rgba(7, 43, 79, 0.2);
  transition: var(--transition);
}
.portal-cta-btn:hover {
  background: var(--brand);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(7, 43, 79, 0.25);
}

/* ----------------- FAQ Accordion (details/summary) ----------------- */
.faq-wrap {
  margin: 2.5rem 0;
}
.faq-wrap h2 {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--brand-600);
  margin-bottom: 1.25rem;
}
.faq-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  margin-bottom: 0.75rem;
  overflow: hidden;
  transition: var(--transition);
}
.faq-item[open] {
  border-color: var(--brand-300);
  box-shadow: var(--shadow-sm);
}
.faq-summary {
  padding: 1rem 1.25rem;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 1rem;
  list-style: none;
  user-select: none;
}
.faq-summary::-webkit-details-marker {
  display: none;
}
.faq-summary::after {
  content: "+";
  font-size: 1.3rem;
  color: var(--brand);
  font-weight: 600;
  transition: transform 0.2s ease;
}
.faq-item[open] .faq-summary::after {
  content: "−";
}
.faq-body {
  padding: 0 1.25rem 1.25rem;
  color: var(--ink-2);
  font-size: 0.95rem;
  line-height: 1.65;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}

/* ----------------- Related Subpages Navigation ----------------- */
.related-box {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 1.75rem;
  margin-top: 3rem;
}
.related-box h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--brand-600);
  margin-bottom: 1rem;
}
.related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.related-pill {
  display: inline-block;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--ink-2);
  text-decoration: none;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--transition);
}
.related-pill:hover {
  background: var(--brand-tint);
  border-color: var(--brand-300);
  color: var(--brand);
}

/* ----------------- Footer ----------------- */
.site-foot {
  background: #072b4f;
  color: #d8e5f2;
  margin-top: auto;
  padding: 3.5rem 0 1.5rem;
  border-top: 4px solid var(--accent);
}
.foot-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}
.foot-col h4 {
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
  position: relative;
  padding-bottom: 0.5rem;
}
.foot-col h4::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0;
  width: 32px;
  height: 2px;
  background: var(--accent);
}
.foot-col p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: #a4bed8;
}
.foot-nav {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.foot-nav a {
  color: #d8e5f2;
  text-decoration: none;
  font-size: 0.88rem;
  transition: var(--transition);
}
.foot-nav a:hover {
  color: var(--accent);
  transform: translateX(3px);
}
.foot-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.82rem;
  color: #8daac7;
}

/* ----------------- 404 Error Page ----------------- */
.error-page {
  padding: 5rem 0;
  text-align: center;
}
.error-code {
  font-size: 6rem;
  font-weight: 900;
  color: var(--brand-600);
  line-height: 1;
  margin-bottom: 1rem;
}
.error-title {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--ink);
}
.error-sub {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 500px;
  margin: 0 auto 2rem;
}

/* ----------------- Responsywność ----------------- */
@media (max-width: 900px) {
  .foot-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .head-nav {
    display: none;
  }
  .burger {
    display: block;
  }
  .portal-cta-box-in {
    flex-direction: column;
    align-items: flex-start;
  }
  .portal-cta-btn {
    width: 100%;
    justify-content: center;
  }
  .foot-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .article-content {
    padding: 1.5rem 1.25rem;
  }
}
