/* =====================================================
   Mistrovská Obnova — Vintage Retro Style (Flex-only)
   Author: Senior CSS Dev & UI Designer
   ===================================================== */

/* ----------------------------
   0) Reset / Normalize
   ---------------------------- */
* { box-sizing: border-box; }
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video { margin: 0; padding: 0; border: 0; font: inherit; vertical-align: baseline; }
article, aside, details, figcaption, figure,
footer, header, hgroup, main, menu, nav, section { display: block; }
body { line-height: 1.55; }
ol, ul { list-style: none; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }
button { background: none; border: none; font: inherit; cursor: pointer; }
:focus { outline: 2px dashed #8C5A3C; outline-offset: 2px; }

/* ----------------------------
   1) Theme / Tokens
   ---------------------------- */
:root {
  --clr-primary: #1F3A4D; /* deep vintage ink */
  --clr-secondary: #8C5A3C; /* warm chestnut */
  --clr-accent: #F4F1EA; /* parchment */
  --clr-ink: #1A262F; /* body text */
  --clr-ink-strong: #0f1b22;
  --clr-paper: #FFFCF5; /* lighter paper tint */
  --clr-cream: #F8F3E7;
  --clr-border: #CBB9A3; /* vintage border */
  --shadow-soft: 0 6px 16px rgba(31,58,77,0.10);
  --shadow-mid: 0 10px 24px rgba(31,58,77,0.12);
  --radius-s: 6px;
  --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;
  --speed: 220ms;
  --easing: cubic-bezier(.2,.7,.2,1);
}

/* ----------------------------
   2) Base Typography
   ---------------------------- */
html { font-size: 16px; }
body {
  font-family: Verdana, Geneva, Tahoma, sans-serif; /* brand body */
  color: var(--clr-ink);
  background-color: var(--clr-accent); /* parchment overall */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 { font-family: "Trebuchet MS", Verdana, Geneva, Tahoma, sans-serif; color: var(--clr-primary); letter-spacing: 0.02em; }

h1 { font-size: 2rem; line-height: 1.2; margin-bottom: var(--space-16); }
h2 { font-size: 1.5rem; line-height: 1.25; margin-bottom: var(--space-16); }
h3 { font-size: 1.125rem; line-height: 1.3; margin: var(--space-12) 0 var(--space-8); color: var(--clr-ink-strong); }

p { margin-bottom: var(--space-12); }
strong { font-weight: 700; }
em { font-style: italic; }

/* Links */
a { color: var(--clr-secondary); transition: color var(--speed) var(--easing), background-color var(--speed) var(--easing); }
a:hover { color: #6f452f; }

/* Lists inside text blocks get vintage bullets */
.text-section ul { padding-left: 0; display: flex; flex-direction: column; gap: var(--space-8); }
.text-section ul li { position: relative; padding-left: 26px; }
.text-section ul li::before {
  content: "◆"; /* retro diamond */
  color: var(--clr-secondary);
  position: absolute;
  left: 0; top: 0;
}
.text-section ol { counter-reset: v-ol; display: flex; flex-direction: column; gap: var(--space-8); }
.text-section ol li { counter-increment: v-ol; padding-left: 32px; position: relative; }
.text-section ol li::before {
  content: counter(v-ol) ".";
  color: var(--clr-primary);
  font-weight: 700;
  position: absolute; left: 0; top: 0; width: 24px; text-align: right;
}

/* ----------------------------
   3) Layout Primitives (Flex-only)
   ---------------------------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-20);
}

.content-wrapper {
  display: flex; /* FLEX REQUIRED */
  flex-direction: column; /* mobile-first */
  align-items: flex-start;
  gap: var(--space-20);
}

.text-section {
  display: flex; /* FLEX REQUIRED */
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-12);
  max-width: 900px;
}

section { background: var(--clr-paper); border: 1px solid var(--clr-border); border-radius: var(--radius-l); box-shadow: var(--shadow-soft); }

/* MANDATORY spacing class */
.section { margin-bottom: 60px; padding: 40px 20px; }

/* Ensure all sections respect spacing even without .section class */
main > section { margin: var(--space-32) 0; padding: var(--space-40) 0; background: transparent; border: none; box-shadow: none; }
main > section > .container > .content-wrapper { background: var(--clr-paper); border: 1px solid var(--clr-border); border-radius: var(--radius-l); padding: var(--space-32); box-shadow: var(--shadow-soft); }

/* Content grids (flex only) */
.content-grid { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; }

/* Text + Image sections */
.text-image-section { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; }
.text-image-section > * { flex: 1 1 300px; }

/* Cards */
.card-container { display: flex; flex-wrap: wrap; gap: 24px; }
.card { margin-bottom: 20px; position: relative; display: flex; flex-direction: column; gap: var(--space-12); padding: var(--space-20); background: var(--clr-paper); border: 1px solid var(--clr-border); border-radius: var(--radius-m); box-shadow: var(--shadow-soft); transition: transform var(--speed) var(--easing), box-shadow var(--speed) var(--easing); }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-mid); }

/* Feature item */
.feature-item { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; padding: var(--space-16); border: 1px dashed var(--clr-border); border-radius: var(--radius-s); background: var(--clr-cream); }

/* Testimonial card — dark text on light BG for readability */
.testimonial-card { display: flex; align-items: center; gap: 20px; padding: 20px; border-radius: var(--radius-m); background: var(--clr-accent); border: 1px solid var(--clr-border); color: var(--clr-ink); box-shadow: var(--shadow-soft); }
.testimonial-card p { margin: 0; }
.testimonial-card + .testimonial-card { margin-top: var(--space-16); }

/* Trust badges */
.trust-badges { width: 100%; }
.trust-badges ul { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-16); }
.trust-badges li { display: flex; align-items: center; gap: var(--space-8); padding: 8px 12px; border-radius: var(--radius-s); background: var(--clr-cream); border: 1px solid var(--clr-border); }
.trust-badges img { width: 18px; height: 18px; }

/* ----------------------------
   4) Header & Navigation
   ---------------------------- */
header { position: sticky; top: 0; z-index: 50; background: var(--clr-accent); border-bottom: 2px solid var(--clr-border); box-shadow: 0 2px 0 rgba(0,0,0,0.02); }
header .container { padding-top: var(--space-12); padding-bottom: var(--space-12); }
header .content-wrapper { flex-direction: row; align-items: center; justify-content: space-between; gap: var(--space-16); background: transparent; border: 0; box-shadow: none; padding: 0; }

.logo img { height: 36px; width: auto; filter: sepia(10%) saturate(90%); }

/* Main nav (hidden on mobile) */
.main-nav { display: none; align-items: center; gap: var(--space-16); }
.main-nav a { color: var(--clr-primary); padding: 8px 10px; border-radius: var(--radius-s); position: relative; }
.main-nav a:hover { background: var(--clr-cream); }
.main-nav .cta { color: #fff; background: var(--clr-secondary); padding: 10px 14px; border-radius: 999px; font-weight: 700; box-shadow: var(--shadow-soft); }
.main-nav .cta:hover { background: #74482f; }

/* Mobile hamburger */
.mobile-menu-toggle { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 999px; background: var(--clr-primary); color: #fff; box-shadow: var(--shadow-soft); }
.mobile-menu-toggle:hover { background: #173042; }

/* Mobile menu overlay */
.mobile-menu { position: fixed; inset: 0; background: var(--clr-accent); transform: translateX(100%); transition: transform var(--speed) var(--easing); z-index: 100; display: flex; flex-direction: column; }
.mobile-menu.open { transform: translateX(0); }
.mobile-menu-close { align-self: flex-end; margin: var(--space-16); width: 42px; height: 42px; border-radius: 999px; background: var(--clr-secondary); color: #fff; }
.mobile-nav { display: flex; flex-direction: column; gap: var(--space-12); padding: var(--space-24); }
.mobile-nav a { padding: 14px 16px; border: 1px solid var(--clr-border); border-radius: var(--radius-m); background: var(--clr-paper); color: var(--clr-primary); box-shadow: var(--shadow-soft); }
.mobile-nav a:hover { background: var(--clr-cream); }

/* ----------------------------
   5) Buttons
   ---------------------------- */
.button, .main-nav .cta, .mobile-nav a.button {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 18px; border-radius: 999px; border: 1px solid var(--clr-border);
  background: #fff; color: var(--clr-primary);
  font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase;
  box-shadow: var(--shadow-soft); transition: transform var(--speed) var(--easing), background-color var(--speed) var(--easing), color var(--speed) var(--easing);
}
.button:hover { transform: translateY(-1px); background: var(--clr-cream); }
.button.primary { background: var(--clr-secondary); color: #fff; border-color: #74482f; }
.button.primary:hover { background: #74482f; }
.button.secondary { background: var(--clr-paper); color: var(--clr-primary); }
.button img { width: 18px; height: 18px; }

/* Inline CTAs within text */
.text-section a.button { align-self: flex-start; }

/* ----------------------------
   6) Footer
   ---------------------------- */
footer { background: var(--clr-primary); color: #e8edf0; border-top: 4px double #0f1b22; }
footer .content-wrapper { background: transparent; border: none; box-shadow: none; padding: var(--space-24) 0; }
footer a { color: #f2d7c4; }
footer a:hover { color: #fff; }
.footer-nav { display: flex; flex-wrap: wrap; gap: var(--space-16); }
.footer-nav a { padding: 6px 10px; border-radius: var(--radius-s); background: rgba(255,255,255,0.06); }
.footer-nav a:hover { background: rgba(255,255,255,0.12); }

/* ----------------------------
   7) Forms (generic, for future use)
   ---------------------------- */
input, select, textarea { width: 100%; padding: 12px 14px; border-radius: var(--radius-m); border: 1px solid var(--clr-border); background: var(--clr-paper); color: var(--clr-ink); }
label { font-weight: 700; color: var(--clr-primary); margin-bottom: 6px; display: inline-block; }

/* ----------------------------
   8) Utilities / Helpers
   ---------------------------- */
.vintage-rule { width: 100%; height: 10px; border-top: 2px solid var(--clr-border); border-bottom: 2px solid var(--clr-border); background: var(--clr-cream); border-radius: 6px; }
.muted { color: #5b6b74; }
.hidden { display: none !important; }
.centered { text-align: center; }

/* ----------------------------
   9) Page-specific stylings
   ---------------------------- */
/* Hero blocks emphasize retro look */
[aria-labelledby="hero-title"],
[aria-labelledby="sluzby-hero"],
[aria-labelledby="ref-hero"],
[aria-labelledby="about-hero"],
[aria-labelledby="ceny-hero"],
[aria-labelledby="blog-hero"],
[aria-labelledby="contact-hero"],
[aria-labelledby="poptavka-hero"],
[aria-labelledby="privacy-hero"],
[aria-labelledby="gdpr-hero"],
[aria-labelledby="cookies-hero"],
[aria-labelledby="terms-hero"],
[aria-labelledby="thankyou-hero"] {
  background: transparent;
}
[aria-labelledby="hero-title"] .content-wrapper,
[aria-labelledby="sluzby-hero"] .content-wrapper,
[aria-labelledby="ref-hero"] .content-wrapper,
[aria-labelledby="about-hero"] .content-wrapper,
[aria-labelledby="ceny-hero"] .content-wrapper,
[aria-labelledby="blog-hero"] .content-wrapper,
[aria-labelledby="contact-hero"] .content-wrapper,
[aria-labelledby="poptavka-hero"] .content-wrapper,
[aria-labelledby="privacy-hero"] .content-wrapper,
[aria-labelledby="gdpr-hero"] .content-wrapper,
[aria-labelledby="cookies-hero"] .content-wrapper,
[aria-labelledby="terms-hero"] .content-wrapper,
[aria-labelledby="thankyou-hero"] .content-wrapper {
  background: var(--clr-cream);
  border: 2px solid var(--clr-border);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-soft);
}

/* CTA sections */
[aria-labelledby="cta-start"] .content-wrapper,
[aria-labelledby="cta-nabidka"] .content-wrapper,
[aria-labelledby="cta-ref"] .content-wrapper,
[aria-labelledby="cta-o-nas"] .content-wrapper,
[aria-labelledby="cta-rychla"] .content-wrapper,
[aria-labelledby="cta-blog"] .content-wrapper {
  background: var(--clr-accent);
  border: 2px dashed var(--clr-border);
}

/* Kvalita & jistoty row of items */
#kvalita + .text-section ul,
[aria-labelledby="kvalita"] .text-section ul {
  display: flex; flex-wrap: wrap; gap: var(--space-12);
}
[aria-labelledby="kvalita"] .text-section li { display: flex; align-items: center; gap: var(--space-8); background: var(--clr-cream); border: 1px solid var(--clr-border); border-radius: var(--radius-s); padding: 8px 12px; }
[aria-labelledby="kvalita"] img { width: 16px; height: 16px; }

/* Index: badges under hero already styled via .trust-badges */

/* Reference: project blocks (use text-section structure) */
[aria-labelledby="projekty"] .text-section h3 { margin-top: var(--space-16); padding-top: var(--space-8); border-top: 1px dashed var(--clr-border); }

/* Blog: Article list inside text-section */
[aria-labelledby="doporuucene"] .text-section { gap: var(--space-20); }
[aria-labelledby="doporuucene"] article { padding: var(--space-16); border: 1px solid var(--clr-border); border-radius: var(--radius-m); background: var(--clr-paper); box-shadow: var(--shadow-soft); }
[aria-labelledby="doporuucene"] article:hover { box-shadow: var(--shadow-mid); }

/* Contact: quick links */
[aria-labelledby="udaje"] .text-section ul li { background: var(--clr-cream); border: 1px solid var(--clr-border); border-radius: var(--radius-s); padding: 8px 12px; }
[aria-labelledby="udaje"] .text-section ul li img { width: 16px; height: 16px; }

/* Thank-you: list styling already handled */

/* ----------------------------
   10) Cookie Consent (Banner + Modal)
   ---------------------------- */
/* Banner */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 2000;
  transform: translateY(110%);
  transition: transform var(--speed) var(--easing);
  display: flex; flex-direction: column; gap: var(--space-16);
  background: var(--clr-paper);
  border-top: 3px double var(--clr-border);
  box-shadow: 0 -10px 24px rgba(0,0,0,0.12);
  padding: var(--space-20);
}
.cookie-banner.show { transform: translateY(0); }
.cookie-banner .cookie-content { display: flex; flex-direction: column; gap: var(--space-12); color: var(--clr-ink); }
.cookie-actions { display: flex; flex-wrap: wrap; gap: var(--space-12); }
.cookie-actions .btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 14px; border-radius: 999px; border: 1px solid var(--clr-border); font-weight: 700; }
.cookie-actions .accept { background: var(--clr-secondary); color: #fff; }
.cookie-actions .reject { background: #fff; color: var(--clr-primary); }
.cookie-actions .settings { background: var(--clr-cream); color: var(--clr-primary); }
.cookie-actions .btn:hover { filter: brightness(0.96); }

/* Modal */
.cookie-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.45); opacity: 0; pointer-events: none; transition: opacity var(--speed) var(--easing); z-index: 2100; }
.cookie-backdrop.open { opacity: 1; pointer-events: auto; }
.cookie-modal { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(0.96); opacity: 0; transition: transform var(--speed) var(--easing), opacity var(--speed) var(--easing); z-index: 2200; width: min(92%, 680px); background: var(--clr-paper); border: 2px solid var(--clr-border); border-radius: var(--radius-l); box-shadow: var(--shadow-mid); display: flex; flex-direction: column; }
.cookie-modal.open { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.cookie-modal header { padding: var(--space-20); border-bottom: 1px dashed var(--clr-border); background: var(--clr-accent); color: var(--clr-primary); }
.cookie-modal .cookie-body { display: flex; flex-direction: column; gap: var(--space-12); padding: var(--space-20); }
.cookie-modal .cookie-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-12); padding: 10px 0; border-bottom: 1px dashed var(--clr-border); }
.cookie-modal .cookie-row:last-child { border-bottom: 0; }
.cookie-modal .cookie-footer { display: flex; flex-wrap: wrap; gap: var(--space-12); padding: var(--space-16); border-top: 1px dashed var(--clr-border); justify-content: flex-end; }
.cookie-toggle { display: inline-flex; align-items: center; gap: 8px; }
.cookie-toggle input[type="checkbox"] { width: 18px; height: 18px; }

/* ----------------------------
   11) Responsive (Flex directions & spacing)
   ---------------------------- */
@media (min-width: 600px) {
  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.75rem; }
}

@media (min-width: 768px) {
  .content-wrapper { flex-direction: row; align-items: center; justify-content: space-between; }
  .text-section { flex: 1 1 60%; }
  .logo img { height: 40px; }
  .main-nav { display: flex; }
  .mobile-menu-toggle { display: none; }

  /* Align text-image sections horizontally */
  .text-image-section { flex-direction: row; }
  .testimonial-card { padding: var(--space-24); }
}

@media (min-width: 1024px) {
  h1 { font-size: 2.75rem; }
  h2 { font-size: 2rem; }
  .container { padding-left: var(--space-24); padding-right: var(--space-24); }
  main > section { margin: 48px 0; }
  main > section > .container > .content-wrapper { padding: var(--space-40); }

  /* Nav spacing */
  .main-nav a { padding: 10px 12px; }
}

/* ----------------------------
   12) Accessibility & Print
   ---------------------------- */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

@media print {
  header, footer, .mobile-menu, .cookie-banner, .cookie-modal, .cookie-backdrop { display: none !important; }
  main > section, .content-wrapper { box-shadow: none !important; border: none !important; background: #fff !important; }
}

/* ----------------------------
   13) Ensure mandatory spacing between cards/sections
   ---------------------------- */
.content-wrapper > * + * { margin-top: 0; }
.card + .card { margin-left: 0; }
main > section + section { margin-top: 24px; }

/* ----------------------------
   14) Ensuring no overlap & good z-index discipline
   ---------------------------- */
header { z-index: 100; }
.mobile-menu { z-index: 1000; }
.cookie-backdrop { z-index: 2000; }
.cookie-modal { z-index: 2200; }
.cookie-banner { z-index: 2300; }

/* ----------------------------
   15) Misc small enhancements
   ---------------------------- */
/* Footnote style inline details */
small, .small { font-size: 0.875rem; color: #5b6b74; }

/* Icon alignment in text lists */
.text-section li img { width: 18px; height: 18px; display: inline-block; vertical-align: middle; margin-right: 6px; }

/* Ensure adequate gaps in all flex containers per requirements */
nav.main-nav, nav.footer-nav, .card-container, .content-grid, .text-image-section, .testimonial-card, .feature-item, .mobile-nav, .cookie-actions { gap: 20px; }

/* End of stylesheet */
