/* =============================
   Vintage Retro UI — Zmierzchowe Szlaki Polska
   Author: Senior CSS Developer & UI Designer
   Notes:
   - Mobile-first, flexbox-only layouts (no grid/columns)
   - Brand colors and fonts applied
   - Retro/vintage aesthetic with paper tones, classic borders, subtle textures
   - Includes mobile menu + cookie consent banner styles
   ============================= */

/* -----------------------------
   RESET & BASE NORMALIZE
------------------------------ */
* { box-sizing: border-box; }
*::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; padding: 0; }
img, picture, svg { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; }
a { text-decoration: none; color: inherit; }
ul, ol { margin: 0; padding: 0 0 0 20px; }
h1, h2, h3, h4, h5, h6, p { margin: 0 0 16px; }

/* -----------------------------
   THEME VARIABLES
------------------------------ */
:root {
  /* Brand */
  --brand-primary: #0E3A5B; /* deep dusk blue */
  --brand-secondary: #2E7D6E; /* pine green */
  --brand-accent: #F4F8FB; /* light sky */

  /* Vintage palette */
  --paper: #F4F1E6; /* warm paper */
  --paper-2: #FFF8E8; /* pale parchment */
  --ink: #2B2B2B; /* dark ink */
  --rust: #B85C38; /* retro rust */
  --gold: #D4A373; /* aged gold */
  --moss: #6B8F71; /* moss tint */
  --sepia-line: #C9B59A; /* lines & borders */

  /* UI */
  --radius-s: 8px;
  --radius-m: 12px;
  --radius-l: 16px;
  --shadow-s: 0 1px 0 rgba(0,0,0,0.05), 0 2px 6px rgba(14,58,91,0.08);
  --shadow-m: 0 2px 0 rgba(0,0,0,0.06), 0 6px 18px rgba(14,58,91,0.12);
  --focus: 0 0 0 3px rgba(212,163,115,0.35);
}

/* -----------------------------
   TYPOGRAPHY
------------------------------ */
body {
  font-family: Arial, Helvetica, sans-serif; /* brand body */
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  display: flex; /* layout: flex-only */
  flex-direction: column;
  min-height: 100vh;
}
main { flex: 1 1 auto; display: flex; flex-direction: column; gap: 20px; }

/***** Retro-inspired headings *****/
h1, h2, h3 {
  font-family: "Trebuchet MS", Arial, sans-serif; /* brand display */
  color: var(--brand-primary);
  letter-spacing: 0.5px;
}
h1 { font-size: 32px; line-height: 1.2; margin-bottom: 16px; }
h2 { font-size: 24px; line-height: 1.25; margin-bottom: 12px; }
h3 { font-size: 18px; line-height: 1.3; }

@media (min-width: 768px) {
  h1 { font-size: 48px; }
  h2 { font-size: 32px; }
  h3 { font-size: 20px; }
}

/* Links */
a { color: var(--brand-secondary); }
a:hover { color: var(--rust); }

/* Selection */
::selection { background: var(--gold); color: #1b1b1b; }

/* -----------------------------
   LAYOUT CONTAINERS (flex-only)
------------------------------ */
.container {
  width: 100%;
  max-width: 1100px;
  padding: 0 16px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Content wrapper: vertical stack with vintage spacing rhythm */
.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Sections spacing (global) */
section { display: flex; width: 100%; }
section > .container { padding-top: 24px; padding-bottom: 24px; }
@media (min-width: 768px) {
  section > .container { padding-top: 40px; padding-bottom: 40px; }
}

/* MANDATORY SPACING PATTERNS */
.section { margin-bottom: 60px; padding: 40px 20px; }
.card-container { display: flex; flex-wrap: wrap; gap: 24px; }
.card { margin-bottom: 20px; position: relative; }
.content-grid { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; }
.text-image-section { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; }
.testimonial-card { display: flex; align-items: center; gap: 20px; padding: 20px; }
.feature-item { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; }

/* Responsive rule for text-image-section */
@media (max-width: 768px) {
  .text-image-section { flex-direction: column; }
}

/* -----------------------------
   HEADER & NAVIGATION
------------------------------ */
header { background: var(--paper-2); border-bottom: 1px solid var(--sepia-line); position: sticky; top: 0; z-index: 50; }
header .container { flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; }
.logo img { height: 40px; filter: sepia(12%) saturate(90%); }

.main-nav { display: none; align-items: center; gap: 16px; flex-wrap: wrap; }
.main-nav a {
  padding: 8px 10px;
  border-radius: var(--radius-s);
  color: var(--brand-primary);
  transition: color .2s ease, background-color .2s ease, transform .15s ease;
}
.main-nav a:hover { background: #fff; color: var(--rust); transform: translateY(-1px); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 10px 16px; border-radius: 999px;
  border: 2px solid var(--brand-primary);
  background: #fff; color: var(--brand-primary);
  font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase;
  box-shadow: var(--shadow-s);
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-m); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: none; box-shadow: var(--focus); }

.btn-primary {
  background: var(--brand-secondary);
  border-color: var(--brand-secondary);
  color: #fff;
}
.btn-primary:hover { background: var(--rust); border-color: var(--rust); }

.btn-secondary {
  background: var(--brand-accent);
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}
.btn-secondary:hover { background: #fff; color: var(--rust); border-color: var(--rust); }

/* Mobile menu button */
.mobile-menu-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 8px;
  border: 2px solid var(--brand-primary);
  background: #fff; color: var(--brand-primary);
  box-shadow: var(--shadow-s);
}
.mobile-menu-toggle:hover { background: var(--brand-accent); }
.mobile-menu-toggle:focus-visible { outline: none; box-shadow: var(--focus); }

/* Mobile menu overlay */
.mobile-menu {
  position: fixed; inset: 0; z-index: 100;
  background: var(--paper-2);
  border-left: 1px solid var(--sepia-line);
  display: flex; flex-direction: column; gap: 16px;
  padding: 20px;
  transform: translateX(100%);
  opacity: 0; pointer-events: none;
  transition: transform .35s ease, opacity .3s ease;
}
.mobile-menu.open, .mobile-menu.active { transform: translateX(0); opacity: 1; pointer-events: auto; }

.mobile-menu-close {
  align-self: flex-end; width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px; border: 2px solid var(--brand-primary);
  background: #fff; color: var(--brand-primary);
}
.mobile-menu-close:hover { background: var(--brand-accent); }

.mobile-nav { display: flex; flex-direction: column; gap: 6px; }
.mobile-nav a {
  display: flex; align-items: center; padding: 14px 10px;
  border-radius: 8px; border: 1px dashed var(--sepia-line);
  background: #fff;
  color: var(--brand-primary); font-weight: 600;
}
.mobile-nav a:hover { border-color: var(--rust); color: var(--rust); }

/* Desktop nav visibility */
@media (min-width: 980px) {
  .main-nav { display: flex; }
  .mobile-menu-toggle { display: none; }
}

/* -----------------------------
   HERO SECTIONS (retro panel)
------------------------------ */
.hero { background: var(--paper-2); border-bottom: 1px solid var(--sepia-line); }
.hero .container { padding-top: 32px; padding-bottom: 32px; }
.hero .content-wrapper {
  background: #fff;
  border: 1px solid var(--sepia-line);
  border-radius: var(--radius-l);
  padding: 24px;
  box-shadow: var(--shadow-m);
  position: relative;
}
/* Vintage corner accents */
.hero .content-wrapper::before, .hero .content-wrapper::after {
  content: ""; position: absolute; width: 18px; height: 18px; border: 2px solid var(--gold);
}
.hero .content-wrapper::before { top: 10px; left: 10px; border-right: none; border-bottom: none; }
.hero .content-wrapper::after { bottom: 10px; right: 10px; border-left: none; border-top: none; }

.badge {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  background: var(--brand-accent);
  color: var(--brand-primary);
  border: 1px dashed var(--sepia-line);
  font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
}

/* -----------------------------
   TEXT BLOCKS & LISTS
------------------------------ */
.text-section { display: flex; flex-direction: column; gap: 10px; }

/* Retro list style */
.text-section ul, .content-wrapper ul, .content-wrapper ol { list-style: none; padding-left: 0; }
.text-section li, .content-wrapper li {
  position: relative; padding-left: 28px; margin-bottom: 8px;
}
.text-section li::before, .content-wrapper li::before {
  content: "\2022"; /* bullet */
  position: absolute; left: 0; top: 0; line-height: 1.2;
  color: var(--rust); font-weight: 900; font-size: 18px;
}
.content-wrapper ol { counter-reset: num; }
.content-wrapper ol > li { counter-increment: num; }
.content-wrapper ol > li::before { content: counter(num) "."; color: var(--brand-secondary); font-weight: 700; }

/* Paragraph + inline icons */
.text-section p img, p img {
  display: inline-block; vertical-align: middle; margin-right: 8px;
  width: 18px; height: 18px; filter: sepia(20%) saturate(80%);
}

/* Links in content */
.content-wrapper a { text-decoration: underline; text-underline-offset: 2px; }
.content-wrapper a:hover { text-decoration: none; }

/* -----------------------------
   CARDS & PANELS (generic)
------------------------------ */
.card {
  background: #fff;
  border: 1px solid var(--sepia-line);
  border-radius: var(--radius-m);
  padding: 18px;
  box-shadow: var(--shadow-s);
}
.card.ticked { border-style: dashed; }

/* Testimonial cards - high contrast, light bg */
.testimonial-card {
  background: #fff;
  border: 1px solid var(--sepia-line);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-s);
  color: var(--ink);
}
.testimonial-card p { margin: 0; }
.testimonial-card + .testimonial-card { margin-top: 16px; }

/* -----------------------------
   CALLOUT SECTIONS
------------------------------ */
section:nth-of-type(odd) .content-wrapper {
  background: #fff;
  border: 1px solid var(--sepia-line);
  border-radius: var(--radius-m);
  padding: 18px;
}

/* CTA group spacing */
.content-wrapper > div:has(.btn),
.content-wrapper > p:has(.btn) {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
}

/* -----------------------------
   FOOTER
------------------------------ */
footer { background: var(--paper-2); border-top: 1px solid var(--sepia-line); }
footer .container { padding-top: 32px; padding-bottom: 32px; }
footer .content-wrapper {
  display: flex; flex-direction: column; gap: 20px; flex-wrap: wrap;
}
footer .text-section h3 { color: var(--brand-primary); margin-bottom: 8px; }
footer a { color: var(--brand-primary); }
footer a:hover { color: var(--rust); }

@media (min-width: 768px) {
  footer .content-wrapper { flex-direction: row; justify-content: space-between; align-items: flex-start; }
  footer .text-section { width: 31%; min-width: 240px; }
}

/* -----------------------------
   RESPONSIVE TWEAKS
------------------------------ */
@media (min-width: 768px) {
  .container { gap: 24px; }
  .content-wrapper { gap: 18px; }
}

/* -----------------------------
   ACCESSIBILITY & FOCUS
------------------------------ */
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }

/* -----------------------------
   COOKIE CONSENT BANNER
------------------------------ */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  display: flex; flex-direction: column; gap: 12px; flex-wrap: wrap;
  background: #fff; color: var(--ink);
  border-top: 2px solid var(--sepia-line);
  box-shadow: 0 -8px 20px rgba(0,0,0,0.06);
  padding: 16px;
  transform: translateY(100%);
  opacity: 0; pointer-events: none;
  transition: transform .3s ease, opacity .3s ease;
}
.cookie-banner.show { transform: translateY(0); opacity: 1; pointer-events: auto; }
.cookie-banner .cookie-content { display: flex; flex-direction: column; gap: 10px; }
.cookie-banner .cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-banner .cookie-actions .btn { padding: 8px 14px; }
.cookie-accept { background: var(--brand-secondary); border-color: var(--brand-secondary); color: #fff; }
.cookie-accept:hover { background: var(--rust); border-color: var(--rust); }
.cookie-reject { background: #fff; }
.cookie-settings { background: var(--brand-accent); }

@media (min-width: 768px) {
  .cookie-banner { flex-direction: row; align-items: center; justify-content: space-between; }
  .cookie-banner .cookie-content { flex: 1; }
}

/* Cookie modal */
.cookie-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 110;
  display: none; align-items: center; justify-content: center; padding: 16px;
}
.cookie-backdrop.show { display: flex; }
.cookie-modal {
  background: #fff; width: 100%; max-width: 640px; border-radius: var(--radius-l);
  border: 1px solid var(--sepia-line); box-shadow: var(--shadow-m);
  display: flex; flex-direction: column; gap: 16px; padding: 20px;
}
.cookie-modal h3 { margin-bottom: 4px; }
.cookie-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--sepia-line); }
.cookie-row:last-child { border-bottom: none; }
.cookie-toggle { width: 46px; height: 28px; border-radius: 999px; border: 2px solid var(--brand-primary); background: var(--brand-accent); position: relative; }
.cookie-toggle::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; background: var(--brand-primary); top: 3px; left: 3px; transition: left .2s ease, background-color .2s ease; }
.cookie-toggle.on { background: var(--brand-secondary); border-color: var(--brand-secondary); }
.cookie-toggle.on::after { background: #fff; left: 23px; }
.cookie-actions-bar { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }

/* -----------------------------
   MICRO INTERACTIONS & UTILITIES
------------------------------ */
.hr { height: 1px; background: var(--sepia-line); width: 100%; display: flex; }
.muted { color: #555; }
.center { display: flex; justify-content: center; align-items: center; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; flex-direction: row; gap: 12px; flex-wrap: wrap; }

/* -----------------------------
   PAGE-SPECIFIC LIGHT TWEAKS
------------------------------ */
/* Index + shared pages */
section .content-wrapper > ul, section .content-wrapper > ol { margin-top: 4px; }

/* Testimonials sections maintain contrast */
section:has(.testimonial-card) { background: var(--paper); }

/* Thank-you page CTA alignment */
main a.btn + a.btn { margin-left: 0; }

/* -----------------------------
   ENSURE SPACING BETWEEN ELEMENTS
------------------------------ */
section + section { margin-top: 10px; }
.container > * + * { margin-top: 0; }

/* Guarantee minimum spacing between cards/blocks */
.content-wrapper > * { margin-bottom: 0; }
.content-wrapper > * + * { margin-top: 12px; }
@media (min-width:768px) {
  .content-wrapper > * + * { margin-top: 16px; }
}

/* -----------------------------
   PRINT BASICS (optional)
------------------------------ */
@media print {
  header, footer, .mobile-menu, .cookie-banner, .cookie-backdrop { display: none !important; }
  body { background: #fff; }
  .hero .content-wrapper { box-shadow: none; }
}
