/* ========================================
   Reset & Base
   ======================================== */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding-left: 20px; }
button { font: inherit; background: none; border: none; cursor: pointer; }
:focus { outline: 2px dashed rgba(11,46,89,0.6); outline-offset: 2px; }

/* ========================================
   Theme Variables (with fallbacks)
   ======================================== */
:root {
  --brand-primary: #0B2E59;
  --brand-secondary: #2E7D88;
  --brand-accent: #F4F7FB;
  /* Vintage/retro accents */
  --retro-cream: #F5EDE3;
  --retro-paper: #F2E9DA;
  --retro-mustard: #D6A419;
  --retro-burgundy: #6E2F2F;
  --retro-forest: #2F4B3A;
  --retro-ink: #1C1A19;
  --ink: #1F2328;
  --muted-ink: #3E4349;
  --border: #CDBEAA;
  --shadow: rgba(0,0,0,0.08);
}

/* ========================================
   Typography
   ======================================== */
body {
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink, #1F2328);
  background: var(--retro-cream, #F5EDE3);
  line-height: 1.65;
  font-size: 16px;
}
h1, h2, h3, h4 { font-family: Georgia, 'Times New Roman', serif; color: var(--brand-primary, #0B2E59); margin: 0 0 16px; letter-spacing: 0.3px; }
h1 { font-size: 32px; line-height: 1.2; }
h2 { font-size: 24px; line-height: 1.3; }
h3 { font-size: 20px; line-height: 1.35; }
p { margin: 0 0 16px; color: var(--muted-ink, #3E4349); }
small, .disclaimer { font-size: 14px; color: #5a5e63; }

/* Vintage section headings: double-rule underline */
.content-wrapper > h2 {
  padding-bottom: 8px;
  border-bottom: 3px double var(--border, #CDBEAA);
}

/* ========================================
   Layout Helpers (Flex-only)
   ======================================== */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex; /* flex layout wrapper */
  flex-direction: column;
}
.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* MANDATORY SPACING AND ALIGNMENT 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; }

/* Cards (generic) */
.card, .text-section, .testimonial-card {
  background: var(--brand-accent, #F4F7FB);
  border: 1px solid var(--border, #CDBEAA);
  border-radius: 10px;
  padding: 18px 20px;
  box-shadow: 0 4px 12px var(--shadow, rgba(0,0,0,0.08));
}
/* Retro cream variant for testimonials for readability */
.testimonial-card { background: var(--retro-paper, #F2E9DA); color: var(--retro-ink, #1C1A19); }
.testimonial-card p { color: var(--retro-ink, #1C1A19); }

/* Spacing across sections */
main section { padding: 40px 0; }
main section + section { border-top: 4px double var(--border, #CDBEAA); }

/* ========================================
   Header & Navigation
   ======================================== */
header { background: var(--retro-paper, #F2E9DA); border-bottom: 4px double var(--border, #CDBEAA); position: relative; z-index: 30; }
header .container { padding-top: 12px; padding-bottom: 12px; }
header .content-wrapper { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; }
.logo { display: flex; align-items: center; }
.logo img { height: 36px; width: auto; }

.main-nav { display: none; align-items: center; gap: 16px; }
.main-nav a {
  padding: 8px 10px;
  color: var(--brand-primary, #0B2E59);
  border-bottom: 2px solid transparent;
  transition: color .2s ease, border-color .2s ease, transform .1s ease;
}
.main-nav a:hover { color: var(--retro-burgundy, #6E2F2F); border-color: var(--retro-mustard, #D6A419); }
.main-nav a:active { transform: translateY(1px); }

.header-cta { display: none; align-items: center; gap: 10px; }

/* Mobile hamburger */
.mobile-menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border: 1px solid var(--border, #CDBEAA);
  border-radius: 8px;
  background: var(--retro-cream, #F5EDE3);
  color: var(--brand-primary, #0B2E59);
}
.mobile-menu-toggle:hover { background: #fff; }

/* Mobile menu overlay */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: rgba(28,26,25,0.6);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  transform: translateX(100%);
  transition: transform .35s ease;
  z-index: 100;
}
/* Panel */
.mobile-menu .mobile-nav {
  background: var(--retro-paper, #F2E9DA);
  width: 85%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  padding: 20px;
  gap: 10px;
  border-left: 4px double var(--border, #CDBEAA);
}
.mobile-menu .mobile-nav a {
  padding: 12px 10px;
  font-size: 18px;
  border: 1px solid var(--border, #CDBEAA);
  border-radius: 8px;
  background: #fff;
  color: var(--brand-primary, #0B2E59);
}
.mobile-menu .mobile-nav a:hover { background: var(--brand-accent, #F4F7FB); }

.mobile-menu-close {
  position: absolute;
  top: 12px; right: 12px;
  width: 36px; height: 36px;
  border: 1px solid var(--border, #CDBEAA);
  border-radius: 8px;
  background: #fff;
}

/* Open states (support multiple toggles) */
.mobile-menu.open, .mobile-menu.active, body.menu-open .mobile-menu { transform: translateX(0); }

/* ========================================
   Hero
   ======================================== */
.hero { background: var(--brand-accent, #F4F7FB); border-bottom: 4px double var(--border, #CDBEAA); }
.hero .content-wrapper { gap: 14px; }
.hero h1 { color: var(--brand-primary, #0B2E59); text-shadow: 0 1px 0 #fff; }
.hero p { max-width: 60ch; }

.cta-group { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.trust-badges { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.trust-badges li {
  display: flex; align-items: center; gap: 8px;
  background: #fff;
  border: 1px dashed var(--border, #CDBEAA);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--retro-ink, #1C1A19);
}
.trust-badges img { width: 18px; height: 18px; }

/* ========================================
   Lists, Features, Metrics, Steps, Bullets
   ======================================== */
.feature-grid, .service-grid, .metrics, .steps, .bullets, .contact-items {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.feature-grid li, .bullets li { margin-left: 16px; }
.feature-grid li { background: #fff; border: 1px solid var(--border, #CDBEAA); border-radius: 10px; padding: 12px 14px; }

.service-grid .text-section { flex: 1 1 100%; }
.metrics { align-items: stretch; }
.metrics > div {
  flex: 1 1 140px;
  background: #fff;
  border: 1px solid var(--border, #CDBEAA);
  border-radius: 10px;
  padding: 14px;
  text-align: center;
}
.metrics strong { font-size: 24px; color: var(--retro-burgundy, #6E2F2F); font-family: Georgia, 'Times New Roman', serif; }

.steps { counter-reset: s; list-style: decimal inside; align-items: flex-start; }
.steps li { background: var(--brand-accent, #F4F7FB); border: 1px solid var(--border, #CDBEAA); border-radius: 10px; padding: 10px 12px; flex: 1 1 100%; }

.bullets { align-items: flex-start; }
.bullets li { list-style: square; }

.contact-items p { display: flex; align-items: center; gap: 8px; margin: 0; background: #fff; border: 1px solid var(--border, #CDBEAA); border-radius: 10px; padding: 10px 12px; }
.contact-items img { width: 18px; height: 18px; }

/* ========================================
   Buttons
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid var(--border, #CDBEAA);
  background: #fff;
  color: var(--brand-primary, #0B2E59);
  font-weight: 600;
  transition: background .2s ease, color .2s ease, box-shadow .2s ease, transform .08s ease;
  box-shadow: 0 2px 0 rgba(0,0,0,0.06);
}
.btn:hover { background: var(--brand-accent, #F4F7FB); }
.btn:active { transform: translateY(1px); box-shadow: 0 1px 0 rgba(0,0,0,0.06); }

.btn.primary { background: var(--retro-mustard, #D6A419); color: #1C1A19; border-color: #A88714; }
.btn.primary:hover { background: #E1B93A; }

.btn.secondary { background: #fff; color: var(--brand-secondary, #2E7D88); }
.btn.secondary:hover { background: #FEFEFE; color: var(--retro-burgundy, #6E2F2F); }

.btn.tertiary { background: transparent; border-style: dashed; color: var(--brand-primary, #0B2E59); }
.btn.tertiary:hover { background: #fff; }

/* Cookie actions special */
.btn.accept { background: #2F4B3A; color: #fff; border-color: #223628; }
.btn.accept:hover { background: #375A45; }
.btn.reject { background: #fff; color: #6E2F2F; border-color: #A77C7C; }
.btn.settings { background: var(--retro-mustard, #D6A419); color: #1C1A19; border-color: #A88714; }

/* Links */
a { color: var(--brand-secondary, #2E7D88); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--retro-burgundy, #6E2F2F); }

/* ========================================
   Footer
   ======================================== */
footer { background: var(--retro-paper, #F2E9DA); border-top: 4px double var(--border, #CDBEAA); margin-top: 40px; }
footer .content-wrapper { gap: 16px; }
.footer-top, .footer-bottom { display: flex; flex-direction: column; gap: 16px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 12px; }
.footer-nav a { padding: 6px 8px; border-radius: 8px; border: 1px solid transparent; }
.footer-nav a:hover { border-color: var(--border, #CDBEAA); background: #fff; }

/* ========================================
   Forms & Misc (future-proof)
   ======================================== */
input, select, textarea { width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border, #CDBEAA); background: #fff; font: inherit; }
label { font-weight: 600; margin-bottom: 6px; display: inline-flex; }

/* ========================================
   Cookie Consent Banner & Modal
   ======================================== */
.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--retro-paper, #F2E9DA);
  border-top: 4px double var(--border, #CDBEAA);
  box-shadow: 0 -10px 20px rgba(0,0,0,0.08);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 200;
  transform: translateY(110%);
  transition: transform .35s ease;
}
.cookie-banner.show, body.cookie-open .cookie-banner { transform: translateY(0); }
.cookie-banner .cookie-content { display: flex; flex-direction: column; gap: 10px; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Modal */
.cookie-overlay {
  position: fixed; inset: 0; background: rgba(28,26,25,0.6); display: none; align-items: center; justify-content: center; z-index: 210;
}
.cookie-overlay.show, body.cookie-modal-open .cookie-overlay { display: flex; }
.cookie-modal {
  background: #fff;
  width: 92%; max-width: 640px;
  border: 1px solid var(--border, #CDBEAA);
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
  padding: 20px;
  display: flex; flex-direction: column; gap: 16px;
  transform: translateY(20px);
}
.cookie-modal header { display: flex; align-items: center; justify-content: space-between; }
.cookie-categories { display: flex; flex-direction: column; gap: 10px; }
.cookie-category { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--border, #CDBEAA); border-radius: 10px; background: var(--brand-accent, #F4F7FB); }
.cookie-modal .modal-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }

/* Simple toggle style (for checkboxes inside modal) */
.toggle { position: relative; width: 44px; height: 26px; border-radius: 20px; background: #ccc; border: 1px solid #aaa; display: inline-flex; align-items: center; padding: 2px; }
.toggle .knob { width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,0.2); transform: translateX(0); transition: transform .2s ease, background .2s ease; }
.toggle.on { background: var(--brand-secondary, #2E7D88); border-color: #25646D; }
.toggle.on .knob { transform: translateX(18px); }

/* ========================================
   Utilities
   ======================================== */
.hidden { display: none !important; }
.center { display: flex; align-items: center; justify-content: center; }

/* ========================================
   Accessibility & Contrast adjustments for testimonials/reviews
   ======================================== */
.testimonial-card strong { color: var(--retro-ink, #1C1A19); }
.testimonial-card em { color: var(--retro-ink, #1C1A19); }

/* ========================================
   Responsive (Mobile-first)
   ======================================== */
@media (min-width: 600px) {
  h1 { font-size: 36px; }
  .service-grid .text-section { flex: 1 1 calc(50% - 10px); }
  .steps li { flex: 1 1 calc(50% - 10px); }
}

@media (min-width: 768px) {
  h1 { font-size: 42px; }
  h2 { font-size: 28px; }
  .text-image-section { flex-direction: row; }
  .main-nav { display: flex; }
  .header-cta { display: flex; }
  .mobile-menu-toggle { display: none; }
  .feature-grid { gap: 16px; }
  .feature-grid li { flex: 1 1 calc(50% - 8px); }
  .metrics { gap: 16px; }
  .metrics > div { flex: 1 1 calc(33.333% - 10px); }
  .service-grid .text-section { flex: 1 1 calc(33.333% - 12px); }
  .steps li { flex: 1 1 calc(33.333% - 12px); }
  .footer-top { flex-direction: row; justify-content: space-between; }
}

@media (min-width: 1024px) {
  h1 { font-size: 48px; }
  .feature-grid li { flex: 1 1 calc(33.333% - 11px); }
  .service-grid .text-section { flex: 1 1 calc(25% - 12px); }
}

/* ========================================
   Retro Details & Micro-interactions
   ======================================== */
/* Subtle vintage shadow for interactive blocks */
.text-section:hover, .testimonial-card:hover, .metrics > div:hover, .feature-grid li:hover {
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
  transition: box-shadow .25s ease;
}

/* Underline reveal */
.main-nav a { text-decoration: none; position: relative; }
.main-nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--retro-mustard, #D6A419); transform: scaleX(0); transform-origin: left; transition: transform .2s ease; }
.main-nav a:hover::after { transform: scaleX(1); }

/* ========================================
   Ensure no overlaps & adequate spacing
   ======================================== */
section .content-wrapper > * { margin-bottom: 8px; }
section .content-wrapper > *:last-child { margin-bottom: 0; }

/* ========================================
   Additional generic components used across pages
   ======================================== */
/* Index: trust badges already styled */
/* Poradnik & others: emphasize notes */
em { background: rgba(214,164,25,0.15); padding: 2px 6px; border-radius: 6px; }

/* Footer bottom text smaller */
.footer-bottom p { margin: 0; font-size: 14px; color: #555; }

/* ========================================
   Strict Flex-only layouts for utility containers
   ======================================== */
/* Content grids used across pages */
.content-grid { align-items: stretch; }
.card-container .card { flex: 1 1 calc(33.333% - 16px); }
@media (max-width: 767px) { .card-container .card { flex: 1 1 100%; } }

/* ========================================
   Readability in review sections (dark on light)
   ======================================== */
.testimonial-card, .testimonial-card p, .testimonial-card strong { color: #1C1A19; }

/* ========================================
   Table-like alignments without grid (flex only)
   ======================================== */
/* For any rows needed */
.row { display: flex; flex-wrap: wrap; gap: 16px; }
.col { flex: 1 1 100%; }
@media (min-width: 768px) { .col.half { flex: 1 1 calc(50% - 8px); } .col.third { flex: 1 1 calc(33.333% - 11px); } }

/* ========================================
   End
   ======================================== */
