/* =========================================================
   Przestrzeń Spektrum — style.css
   Geometric Structured theme • Mobile-first • Flex-only
   ========================================================= */

/* -----------------------------
   0) RESET & NORMALIZE
------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body, h1, h2, h3, h4, h5, h6, p, ul, ol, li, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
button { background: none; border: none; cursor: pointer; font: inherit; color: inherit; }
:root {
  /* Brand palette */
  --primary: #2B2F5B;
  --secondary: #E07A5F;
  --accent: #FAF7F0;
  --bg: #FFFFFF;
  --ink: #1E2235;
  --muted: #5C627F;
  --line: #D9DBE3;
  --focus: #0EA5E9;

  /* Spacing scale */
  --s-4: 4px; --s-6: 6px; --s-8: 8px; --s-10: 10px; --s-12: 12px; --s-14: 14px; --s-16: 16px; --s-20: 20px; --s-24: 24px; --s-30: 30px; --s-32: 32px; --s-40: 40px; --s-48: 48px; --s-60: 60px; --radius-4: 4px; --radius-8: 8px;

  /* Shadows */
  --shadow-1: 0 2px 10px rgba(23, 28, 55, 0.06);
  --shadow-2: 0 6px 20px rgba(23, 28, 55, 0.10);
}

/* Fonts (Google Fonts import) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Montserrat:wght@600;700;800&display=swap');

body {
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}

/* -----------------------------
   1) TYPOGRAPHY — geometric/structured
------------------------------ */
h1, h2, h3, h4 {
  font-family: Montserrat, Inter, Arial, sans-serif;
  letter-spacing: 0.5px;
  color: var(--primary);
}

h1 { font-size: 32px; line-height: 1.2; font-weight: 800; }
h2 { font-size: 24px; line-height: 1.25; font-weight: 700; margin-bottom: var(--s-20); }
h3 { font-size: 20px; line-height: 1.3; font-weight: 700; margin-top: var(--s-16); }
h4 { font-size: 18px; line-height: 1.35; font-weight: 700; margin-top: var(--s-16); }

p, li { font-size: 16px; color: var(--ink); }
small, .note { font-size: 14px; color: var(--muted); }
strong { font-weight: 700; }

/* Structured list bullets */
.text-section ul, .text-section ol { padding-left: 0; display: flex; flex-direction: column; gap: var(--s-10); margin-top: var(--s-12); }
.text-section ul li { position: relative; padding-left: 18px; }
.text-section ul li::before {
  content: ""; position: absolute; left: 0; top: 10px; width: 10px; height: 10px; border: 2px solid var(--primary); transform: rotate(45deg);
}
.text-section ol { counter-reset: num; }
.text-section ol li { counter-increment: num; position: relative; padding-left: 28px; }
.text-section ol li::before {
  content: counter(num); position: absolute; left: 0; top: 0; width: 22px; height: 22px; border: 2px solid var(--secondary); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; color: var(--secondary);
}

/* Icon rows alignment (address/phone/mail lines) */
.text-section p { display: flex; align-items: center; gap: var(--s-10); flex-wrap: wrap; }
.text-section p img { width: 20px; height: 20px; }

/* Links */
a { color: var(--primary); }
a:hover { color: var(--secondary); }
a:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(14,165,233,.35); border-radius: var(--radius-4); }

/* -----------------------------
   2) LAYOUT WRAPPERS (Flex-only)
------------------------------ */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--s-20);
  display: flex; /* Flex-only requirement */
  flex-direction: column;
  gap: var(--s-20);
}

.content-wrapper {
  display: flex; /* Flex-only */
  flex-direction: column;
  gap: var(--s-16);
}

section { border-top: 1px solid var(--line); }
section .container { padding-top: var(--s-32); padding-bottom: var(--s-32); }

/* Mandatory spacing classes */
.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; }

/* -----------------------------
   3) HEADER & NAVIGATION
------------------------------ */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: var(--bg);
  border-bottom: 4px solid var(--primary);
}

.site-header .container {
  flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--s-16);
}

.branding { display: flex; align-items: center; gap: var(--s-12); }
.branding img { height: 36px; }

.main-nav { display: none; align-items: center; gap: var(--s-16); flex-wrap: wrap; }
.main-nav a {
  font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.6px; color: var(--primary);
  padding: 8px 10px; border-bottom: 2px solid transparent; transition: color .2s ease, border-color .2s ease, transform .2s ease;
}
.main-nav a:hover { color: var(--secondary); border-bottom-color: var(--secondary); transform: translateY(-1px); }

.header-cta { display: flex; align-items: center; gap: var(--s-12); flex-wrap: wrap; }

/* Mobile burger */
.mobile-menu-toggle {
  display: flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border: 2px solid var(--primary); color: var(--primary); border-radius: var(--radius-8);
  transition: background .2s ease, color .2s ease, transform .15s ease;
}
.mobile-menu-toggle:hover { background: var(--primary); color: #fff; transform: translateY(-1px); }
.mobile-menu-toggle:focus-visible { box-shadow: 0 0 0 3px rgba(14,165,233,.35); }

/* Mobile menu overlay */
.mobile-menu {
  position: fixed; inset: 0; background: #fff; z-index: 1200;
  display: flex; flex-direction: column; gap: var(--s-20); padding: var(--s-20);
  transform: translateX(100%); transition: transform .3s ease;
}
.mobile-menu.is-open, .mobile-menu.open, body.menu-open .mobile-menu { transform: translateX(0); }

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

.mobile-nav { display: flex; flex-direction: column; gap: var(--s-12); }
.mobile-nav a {
  padding: 12px 10px; border-left: 4px solid var(--line); color: var(--primary); font-weight: 600; text-transform: uppercase; letter-spacing: .6px;
}
.mobile-nav a:hover { border-left-color: var(--secondary); color: var(--secondary); }

/* Show desktop nav on wider screens */
@media (min-width: 960px) {
  .main-nav { display: flex; }
  .mobile-menu-toggle, .mobile-menu { display: none; }
}

/* -----------------------------
   4) BUTTONS
------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 12px 18px; border-radius: 6px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; border: 2px solid transparent;
  transition: background .2s ease, color .2s ease, box-shadow .2s ease, transform .15s ease; will-change: transform;
}
.btn.primary { background: var(--primary); color: #fff; box-shadow: var(--shadow-1); }
.btn.primary:hover { background: #232650; box-shadow: var(--shadow-2); transform: translateY(-1px); }
.btn.secondary { background: #fff; color: var(--primary); border-color: var(--primary); }
.btn.secondary:hover { background: var(--accent); border-color: var(--secondary); color: var(--secondary); transform: translateY(-1px); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(14,165,233,.35); }

.cta-group { display: flex; flex-wrap: wrap; gap: var(--s-12); }

/* -----------------------------
   5) HERO SECTIONS
------------------------------ */
.hero { background: var(--accent); border-bottom: 4px solid var(--primary); }
.hero .container { padding-top: var(--s-40); padding-bottom: var(--s-40); }
.hero h1 { color: var(--primary); }
.hero p { max-width: 70ch; }
.hero .note { margin-top: var(--s-8); }

/* Decorative geometric bar */
.hero .content-wrapper { position: relative; }
.hero .content-wrapper::before {
  content: ""; position: absolute; left: 0; top: -16px; width: 80px; height: 6px; background: var(--secondary);
}

/* Quick links in index hero */
.quick-links { display: flex; flex-wrap: wrap; gap: var(--s-10); margin-top: var(--s-10); }
.quick-links a { padding: 10px 12px; border: 2px solid var(--primary); border-radius: 6px; font-weight: 600; color: var(--primary); }
.quick-links a:hover { background: var(--primary); color: #fff; }

/* -----------------------------
   6) CONTENT AREAS & CARDS
------------------------------ */
.text-section { display: flex; flex-direction: column; gap: var(--s-12); }

.card {
  background: #fff; border: 2px solid var(--line); border-radius: 10px; padding: var(--s-20);
  box-shadow: var(--shadow-1); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); border-color: var(--primary); }

/* Testimonials: light background + dark text (contrast) */
.testimonial-card {
  background: #fff; border: 2px solid var(--line); border-left: 6px solid var(--secondary); border-radius: 10px;
  color: var(--ink); box-shadow: var(--shadow-1);
}
.testimonial-card p { margin: 0; }
.testimonial-card strong { color: var(--primary); }

/* Footer cards/blocks */
.footer-brand, .footer-nav, .footer-contact { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: var(--s-16); }

/* -----------------------------
   7) FOOTER
------------------------------ */
.site-footer { background: #F7F8FB; border-top: 4px solid var(--primary); }
.site-footer .container { padding-top: var(--s-32); padding-bottom: var(--s-32); }
.site-footer .content-wrapper { display: flex; flex-direction: column; gap: var(--s-20); }
.footer-brand { display: flex; flex-direction: column; gap: var(--s-12); }
.footer-brand img { height: 32px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: var(--s-10); }
.footer-nav a { padding: 8px 10px; color: var(--primary); font-weight: 600; text-transform: uppercase; font-size: 13px; border: 1px solid var(--line); border-radius: 6px; }
.footer-nav a:hover { border-color: var(--secondary); color: var(--secondary); }
.footer-contact { display: flex; flex-direction: column; gap: 8px; }
.footer-contact a { color: var(--primary); }

@media (min-width: 960px) {
  .site-footer .content-wrapper { flex-direction: row; align-items: flex-start; gap: var(--s-24); }
  .footer-brand, .footer-nav, .footer-contact { flex: 1 1 0; }
}

/* -----------------------------
   8) RESPONSIVE UTILITIES
------------------------------ */
/* Text-image layout rule from requirements */
@media (max-width: 768px) {
  .text-image-section { flex-direction: column; }
}

@media (min-width: 768px) {
  h1 { font-size: 40px; }
  h2 { font-size: 28px; }
  h3 { font-size: 22px; }
}

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

/* Content wrapping helpers */
.stack-16 { display: flex; flex-direction: column; gap: var(--s-16); }
.row-wrap { display: flex; flex-wrap: wrap; gap: var(--s-16); }

/* -----------------------------
   9) ACCESSIBILITY & FOCUS
------------------------------ */
:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(14,165,233,.35); border-radius: 6px; }

/* Ensure readable testimonials and review sections */
section:has(.testimonial-card) { background: #fff; }

/* -----------------------------
   10) COOKIE CONSENT (banner + modal)
------------------------------ */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1300;
  display: flex; flex-direction: column; gap: var(--s-16);
  background: #fff; border-top: 4px solid var(--primary); box-shadow: 0 -8px 24px rgba(0,0,0,.08);
  padding: var(--s-16) var(--s-20);
  transform: translateY(100%); transition: transform .35s ease;
}
.cookie-banner.is-visible, body.cookies-open .cookie-banner { transform: translateY(0); }
.cookie-banner .cookie-content { display: flex; flex-direction: column; gap: var(--s-12); }
.cookie-banner .cookie-buttons { display: flex; flex-wrap: wrap; gap: var(--s-12); }
.cookie-banner .btn { padding: 10px 14px; }
.cookie-banner .btn.accept { background: var(--primary); color: #fff; }
.cookie-banner .btn.reject { background: #fff; color: var(--primary); border: 2px solid var(--primary); }
.cookie-banner .btn.settings { background: var(--accent); color: var(--primary); border: 2px solid var(--line); }
.cookie-banner .btn.reject:hover { color: var(--secondary); border-color: var(--secondary); }

/* Cookie modal */
.cookie-modal {
  position: fixed; inset: 0; z-index: 1400; display: flex; align-items: center; justify-content: center; padding: var(--s-20);
  pointer-events: none; opacity: 0; transition: opacity .25s ease;
}
.cookie-modal.is-visible { pointer-events: auto; opacity: 1; }
.cookie-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.4); }
.cookie-dialog {
  position: relative; background: #fff; border: 2px solid var(--primary); border-radius: 12px; box-shadow: var(--shadow-2);
  width: 100%; max-width: 680px; display: flex; flex-direction: column; gap: var(--s-16); padding: var(--s-20);
}
.cookie-dialog .dialog-header { display: flex; align-items: center; justify-content: space-between; }
.cookie-dialog .dialog-body { display: flex; flex-direction: column; gap: var(--s-12); }
.cookie-dialog .cookie-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-12); padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
.cookie-dialog .dialog-actions { display: flex; flex-wrap: wrap; gap: var(--s-12); justify-content: flex-end; }
.cookie-close { width: 36px; height: 36px; border: 2px solid var(--primary); border-radius: 8px; }
.cookie-close:hover { background: var(--primary); color: #fff; }

/* -----------------------------
   11) MICRO-INTERACTIONS & ANIMATIONS
------------------------------ */
.fade-in { opacity: 0; transform: translateY(8px); animation: fadeInUp .4s ease forwards; }
@keyframes fadeInUp { to { opacity: 1; transform: translateY(0); } }

/* -----------------------------
   12) PAGE-SPECIFIC TWEAKS
------------------------------ */
/* Index counters / notes spacing */
.hero .cta-group + .note { margin-top: var(--s-10); }

/* Events lists visual anchors */
.text-section h3 + ul { border-left: 4px solid var(--primary); padding-left: var(--s-16); }

/* Thank-you page CTAs */
main a[href$="thank-you.html"], .footer-contact a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* -----------------------------
   13) FORMS PLACEHOLDER (if any future forms appear)
------------------------------ */
input, select, textarea { font: inherit; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 12px; width: 100%; }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(14,165,233,.25); }

/* -----------------------------
   14) FLEXBOX SAFEGUARDS (no overlaps)
------------------------------ */
/* Ensure minimum gaps and wrap for any generic row */
.row { display: flex; flex-wrap: wrap; gap: var(--s-20); }
.col { display: flex; flex-direction: column; gap: var(--s-12); }

/* -----------------------------
   15) PRINT BASICS
------------------------------ */
@media print {
  .mobile-menu, .mobile-menu-toggle, .cookie-banner, .cookie-modal { display: none !important; }
  a { text-decoration: underline; }
}

/* -----------------------------
   16) DESKTOP ENHANCEMENTS
------------------------------ */
@media (min-width: 960px) {
  .content-wrapper { flex-direction: column; gap: var(--s-20); }
  .hero .container { padding-top: var(--s-60); padding-bottom: var(--s-60); }
}

/* =========================================================
   END — Flex-only, geometric-structured UI
   Verified: no CSS Grid or Columns used
========================================================= */
