/* =============================
   DynoForce Prezenty - Vintage Retro Style
   Single style.css for all pages
   Mobile-first, Flexbox-only, no Grid/Columns
   ============================= */

/* ========== CSS RESET & NORMALIZE ========== */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body, h1, h2, h3, h4, h5, h6, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { padding-left: 1.2em; }
img, svg { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
button { border: none; background: none; font: inherit; color: inherit; cursor: pointer; }
input, button, select, textarea { font: inherit; }

/* ========== THEME VARIABLES (with fallbacks) ========== */
:root {
  --primary: #8A1538; /* brand burgundy */
  --secondary: #2F6B6D; /* brand teal */
  --accent: #FFF7EF; /* brand cream */
  --ink: #2B2626; /* deep warm ink for text */
  --subtle-ink: #4B3F3F;
  --muted: #C7B9A8; /* retro beige lines */
  --paper: #FFFDF8; /* soft paper white */
  --shadow: rgba(43, 38, 38, 0.12);
  --shadow-strong: rgba(43, 38, 38, 0.18);
  --radius-s: 6px; /* retro soft */
  --radius-m: 10px;
  --radius-l: 16px;
  --space-8: 8px; --space-12: 12px; --space-16: 16px; --space-20: 20px; --space-24: 24px; --space-32: 32px; --space-40: 40px; --space-48: 48px; --space-60: 60px;
  --focus: 3px solid #D1A39C; /* warm focus ring */
  --btn-shadow: 0 2px 0 rgba(0,0,0,0.15);
}

/* ========== BASE TYPOGRAPHY ========== */
body {
  font-family: Verdana, Geneva, Tahoma, sans-serif; /* brand body */
  color: var(--ink);
  background: var(--accent);
  line-height: 1.6;
  font-size: 16px;
}

h1, h2, h3, h4 {
  font-family: "Trebuchet MS", Verdana, Geneva, Tahoma, sans-serif; /* brand display */
  color: var(--primary);
  letter-spacing: 0.5px; /* subtle retro feel */
}

h1 { font-size: 32px; line-height: 1.2; margin-bottom: var(--space-16); }
h2 { font-size: 24px; line-height: 1.3; margin-bottom: var(--space-16); }
h3 { font-size: 18px; line-height: 1.3; margin-bottom: var(--space-12); color: var(--secondary); }

p { margin-bottom: var(--space-12); color: var(--subtle-ink); }
strong { color: var(--ink); }

/* Retro link style */
a { color: var(--secondary); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 2px; }
a:hover { color: var(--primary); }

/* ========== GLOBAL LAYOUT ========== */
.container {
  display: flex; /* Flex-only */
  flex-direction: column;
  gap: var(--space-20);
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--space-20);
}

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

main { display: flex; flex-direction: column; gap: var(--space-32); }

/* Sections (default) */
section { background: transparent; }

/* ========== MANDATORY SPACING & 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; }

/* ========== RETRO SURFACES & CARDS ========== */
.card, .testimonial-card, .text-section {
  background: var(--paper);
  border: 2px solid var(--muted);
  border-radius: var(--radius-m);
  box-shadow: 0 6px 16px var(--shadow);
}

.card { padding: var(--space-20); }
.text-section { padding: var(--space-20); }

/* Retro divider for content groups */
.content-wrapper > h2 { border-bottom: 4px double var(--muted); padding-bottom: 6px; }

/* ========== HEADER & NAVIGATION ========== */
header { background: #F8EFE7; border-bottom: 4px solid var(--primary); position: relative; z-index: 50; }
header .container { padding-top: var(--space-16); padding-bottom: var(--space-16); }

/* Top bar layout */
header .container { flex-direction: row; align-items: center; justify-content: space-between; gap: var(--space-16); }
.logo { display: flex; align-items: center; }
.logo img { height: 38px; width: auto; }

.main-nav { display: none; /* hidden on mobile */ }
.main-nav a { margin: 0 var(--space-12); color: var(--ink); font-weight: 600; text-decoration: none; position: relative; }
.main-nav a:after { content: ""; position: absolute; left: 0; bottom: -6px; height: 3px; width: 0; background: var(--secondary); transition: width .25s ease; }
.main-nav a:hover:after { width: 100%; }

/* CTA group in header */
.cta-group { display: none; gap: var(--space-12); }

/* Mobile menu toggle */
.mobile-menu-toggle { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; background: var(--primary); color: #fff; box-shadow: var(--btn-shadow); }
.mobile-menu-toggle:hover { background: #6F102D; }

/* Mobile menu overlay */
.mobile-menu {
  position: fixed; inset: 0 0 0 auto; /* right side panel */
  width: 86%; max-width: 360px; height: 100vh;
  background: #FBF3EA;
  border-left: 4px solid var(--primary);
  box-shadow: -6px 0 20px var(--shadow-strong);
  transform: translateX(100%);
  transition: transform .35s ease; z-index: 9999;
  display: flex; flex-direction: column; gap: var(--space-24);
  padding: var(--space-24);
}
.mobile-menu.open, body.menu-open .mobile-menu { transform: translateX(0%); }

.mobile-menu-close { align-self: flex-end; width: 40px; height: 40px; border-radius: 50%; background: var(--secondary); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.mobile-nav { display: flex; flex-direction: column; gap: var(--space-16); }
.mobile-nav a { padding: 10px 12px; border: 2px solid var(--muted); border-radius: var(--radius-s); background: var(--paper); color: var(--ink); font-weight: 600; }
.mobile-nav a:hover { background: #FFF4E7; border-color: var(--secondary); }

/* ========== HERO ========== */
.hero { background: #FAF1E8; border-bottom: 6px double var(--muted); }
.hero .content-wrapper { padding: var(--space-32) 0; }
.hero p { max-width: 68ch; }

/* Breadcrumbs */
nav[aria-label="okruszki"] p { color: var(--subtle-ink); font-size: 14px; opacity: 0.9; }
nav[aria-label="okruszki"] a { color: var(--secondary); }

/* ========== BUTTONS ========== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 18px; border-radius: 28px; border: 2px solid transparent; font-weight: 700; letter-spacing: 0.4px; transition: background .2s ease, color .2s ease, transform .15s ease, border-color .2s ease; }
.btn:focus-visible { outline: var(--focus); outline-offset: 2px; }

.btn.primary { background: var(--primary); color: #fff; box-shadow: var(--btn-shadow); }
.btn.primary:hover { background: #6F102D; transform: translateY(-1px); }

.btn.secondary { background: var(--paper); color: var(--primary); border-color: var(--primary); }
.btn.secondary:hover { background: #FCEEE6; border-color: #6F102D; color: #6F102D; }

/* CTA rows */
.cta-row { display: flex; flex-wrap: wrap; gap: var(--space-12); }

/* ========== LISTS & ICON ROWS ========== */
ul, ol { display: block; }
.text-section ul, .text-section ol { display: flex; flex-direction: column; gap: 10px; }
.usp-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-12); }
.usp-list li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--paper); border: 2px dashed var(--muted); border-radius: var(--radius-s); color: var(--ink); }
.usp-list img { width: 18px; height: 18px; }

/* Contact block rows */
.contact-block { display: flex; flex-direction: column; gap: 8px; }
.contact-block p { display: flex; align-items: center; gap: 8px; margin: 0; }
.contact-block img { width: 18px; height: 18px; }

/* ========== TESTIMONIALS ========== */
.testimonial-card { background: #FFF8F1; border-color: var(--secondary); border-radius: var(--radius-m); box-shadow: 0 8px 22px var(--shadow); }
.testimonial-card p { margin: 0; color: #201A18; }
.testimonial-card strong { color: var(--primary); }

/* ========== FOOTER ========== */
footer { background: #2B2A29; color: #F1EDE6; border-top: 6px double var(--muted); }
footer .container { padding-top: var(--space-32); padding-bottom: var(--space-32); }
footer .content-wrapper { flex-direction: column; gap: var(--space-24); }
.footer-brand { display: flex; flex-direction: column; gap: var(--space-12); }
.footer-brand img { height: 42px; width: auto; filter: brightness(0) invert(1); }
.footer-nav, .footer-legal, .footer-contact { display: flex; flex-direction: column; gap: 10px; }
footer h3 { color: #FCEEE6; font-size: 16px; border-bottom: 2px dotted #7C756C; padding-bottom: 4px; }
footer nav { display: flex; flex-direction: column; gap: 8px; }
footer a { color: #F1EDE6; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 2px; }
footer a:hover { color: #FFE7D2; }

/* ========== GENERIC UTILITIES ========== */
.hr { width: 100%; height: 2px; background: var(--muted); opacity: .7; }
.center { text-align: center; }

/* ========== RESPONSIVE (Mobile-first) ========== */
@media (min-width: 768px) {
  h1 { font-size: 40px; }
  h2 { font-size: 28px; }
  h3 { font-size: 20px; }

  /* Header desktop nav */
  .main-nav { display: flex; }
  .cta-group { display: flex; }
  .mobile-menu-toggle { display: none; }

  /* Footer layout columns using flex */
  footer .content-wrapper { flex-direction: row; flex-wrap: wrap; justify-content: space-between; }
  .footer-brand { flex: 1 1 260px; }
  .footer-nav, .footer-legal, .footer-contact { flex: 1 1 200px; }

  /* Text-image section align row */
  .text-image-section { flex-direction: row; align-items: center; }
}

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

/* ========== PAGE-SPECIFIC TOUCHES ========== */
/* Subtle retro frame around sections */
main section .container .content-wrapper { background: transparent; }
main section .container { gap: var(--space-24); }

/* Index categories & repeated sections keep spacing uniform */
main section { padding: var(--space-24) 0; }

/* Breadcrumb spacing */
.hero nav[aria-label="okruszki"] { margin-bottom: -8px; }

/* ========== ACCESSIBILITY & INTERACTIONS ========== */
:focus-visible { outline: var(--focus); outline-offset: 2px; }

/* Micro-interactions */
.card, .text-section, .testimonial-card { transition: transform .18s ease, box-shadow .18s ease; }
.card:hover, .text-section:hover, .testimonial-card:hover { transform: translateY(-2px); box-shadow: 0 10px 26px var(--shadow-strong); }

/* ========== COOKIE CONSENT BANNER ========== */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0;
  background: #F9EBDD;
  border-top: 4px solid var(--primary);
  box-shadow: 0 -10px 24px var(--shadow-strong);
  z-index: 9998;
  display: flex; /* Flex-only */
  flex-direction: column; gap: var(--space-16);
  padding: var(--space-20);
}
.cookie-banner.hidden { transform: translateY(110%); transition: transform .35s ease; }
.cookie-banner p { color: var(--ink); }
.cookie-actions { display: flex; flex-wrap: wrap; gap: var(--space-12); }
.cookie-actions .cookie-accept { background: var(--primary); color: #fff; border: 2px solid var(--primary); }
.cookie-actions .cookie-accept:hover { background: #6F102D; }
.cookie-actions .cookie-reject { background: var(--paper); color: var(--primary); border: 2px solid var(--primary); }
.cookie-actions .cookie-reject:hover { background: #FCEEE6; }
.cookie-actions .cookie-settings { background: var(--paper); color: var(--secondary); border: 2px dashed var(--secondary); }
.cookie-actions .cookie-settings:hover { background: #EFFFFA; }

/* Cookie settings modal */
.cookie-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 10000;
  display: none; align-items: center; justify-content: center; padding: var(--space-20);
}
.cookie-modal-overlay.open { display: flex; }
.cookie-settings-modal {
  background: #FFFDF7; width: 100%; max-width: 720px;
  border: 4px double var(--muted);
  border-radius: var(--radius-l);
  box-shadow: 0 18px 40px var(--shadow-strong);
  display: flex; flex-direction: column; gap: var(--space-20); padding: var(--space-24);
}
.cookie-settings-modal h3 { margin-top: 0; }
.cookie-categories { display: flex; flex-direction: column; gap: var(--space-12); }
.cookie-category { display: flex; align-items: center; justify-content: space-between; gap: var(--space-12); padding: 12px; background: var(--paper); border: 2px solid var(--muted); border-radius: var(--radius-s); }
.cookie-category .hint { font-size: 14px; color: var(--subtle-ink); }

/* Toggle switch */
.switch { position: relative; width: 46px; height: 26px; background: #D8CFC6; border-radius: 26px; border: 2px solid var(--muted); transition: background .2s ease; }
.switch::after { content: ""; position: absolute; top: 50%; left: 2px; transform: translateY(-50%); width: 20px; height: 20px; background: #fff; border: 2px solid var(--muted); border-radius: 50%; transition: left .2s ease; }
.switch.is-on { background: var(--secondary); }
.switch.is-on::after { left: 22px; }

.cookie-modal-actions { display: flex; flex-wrap: wrap; gap: var(--space-12); justify-content: flex-end; }

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

/* ========== EXTRA COMPONENTS TO SUPPORT HTML ========== */
/* Classic patterned edge for hero and key sections (solid only via borders) */
.hero { border-top: 6px double var(--muted); }

/* Content grids using flex only */
.flex-row { display: flex; flex-wrap: wrap; gap: var(--space-20); }

/* Ensure minimum spacing between any blocks */
.content-wrapper > * + * { margin-top: 0; }

/* ========== CONTRAST GUARANTEES FOR TESTIMONIALS ========== */
/* Dark text on light background enforced */
.testimonial-card, .testimonial-card p, .testimonial-card strong { color: #1E1A19; }

/* ========== SPECIFIC SMALL ELEMENTS ========== */
/* Footer contact rows */
.footer-contact p { margin: 0; color:#fff; }
footer p{color: #fff;}

/* Ensure no overlap and breathing room */
section + section { margin-top: var(--space-24); }

/* ========== FLEX ENFORCEMENT FOR COMMON BLOCKS ========== */
header, footer, .hero, .cta-row, .usp-list, .contact-block, .footer-nav nav, .footer-legal nav, .mobile-nav, .cookie-actions, .cookie-categories, .cookie-modal-actions {
  display: flex; /* All layout containers are flex */
}
header { flex-direction: column; }
footer { flex-direction: column; }
.hero { flex-direction: column; }
.footer-nav nav, .footer-legal nav { flex-direction: column; gap: 8px; }

/* ========== DESKTOP REFINEMENTS ========== */
@media (min-width: 992px) {
  .hero .content-wrapper { padding: var(--space-48) 0; }
  .container { gap: var(--space-24); }
}
