/* =====================================================
   Aurex Glint Apartamenty – style.css
   Warm Friendly UI • Mobile-first • Flexbox-only
   Fonts: Trebuchet MS (display), Verdana (body)
   Colors: brand + warm neutrals, solid fills, soft shadows
   ===================================================== */

/* -----------------------------
   0) CSS Reset & Base 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, menu, nav, section { display: block; }
body { line-height: 1; }
ol, ul { list-style: disc inside; padding-left: 1rem; }
blockquote, q { quotes: none; }
blockquote::before, blockquote::after, q::before, q::after { content: ""; }
table { border-collapse: collapse; border-spacing: 0; }
img { max-width: 100%; height: auto; display: block; }
button { background: none; border: none; cursor: pointer; font: inherit; }
a { text-decoration: none; color: inherit; }

/* -----------------------------
   1) Design Tokens (with fallbacks)
   ----------------------------- */
:root {
  --brand-primary: #1F3B58;
  --brand-secondary: #2FA39A;
  --brand-accent: #F4F7FB;
  --warm-cream: #FFF7F0; /* warm friendly */
  --warm-peach: #FCE7D8;
  --warm-amber: #FFB36B;
  --ink: #1F2A37; /* dark text */
  --muted: #5C6B7A;
  --line: #E6EDF5;
  --white: #FFFFFF;
  --shadow-soft: 0 8px 24px rgba(31, 59, 88, 0.08);
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-20: 20px;
  --space-24: 24px;
  --space-32: 32px;
}

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

h1, h2, h3, h4, h5 { font-family: "Trebuchet MS", Verdana, sans-serif; color: var(--brand-primary); line-height: 1.2; }

h1 { font-size: 32px; margin-bottom: var(--space-16); }
h2 { font-size: 24px; margin-bottom: var(--space-16); }
h3 { font-size: 18px; margin-bottom: var(--space-12); }

p { font-size: 16px; line-height: 1.65; color: var(--ink); }
.subheading { color: var(--muted); font-size: 18px; }
strong { font-weight: bold; }

/* Utility spacing between stacked children in wrappers */
.content-wrapper > * + * { margin-top: var(--space-16); }
.text-section > * + * { margin-top: var(--space-12); }

/* -----------------------------
   3) Containers & Layout (Flex-only)
   ----------------------------- */
.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: var(--space-20);
}

.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: var(--space-20);
  align-items: flex-start;
}

/* 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; }

/* Ensure min spacing between all content cards */
.card, .testimonial-card, .text-section, .cta-group { margin-bottom: 20px; }

/* -----------------------------
   4) Header & Navigation
   ----------------------------- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  position: relative;
  z-index: 20;
}
.site-header .container { padding-top: 10px; padding-bottom: 10px; }
.site-header .content-wrapper {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-16);
}
.logo img { height: 36px; width: auto; }

.main-nav, .header-cta {
  display: none; /* hidden on mobile */
}

.main-nav a, .footer-nav a {
  color: var(--brand-primary);
  font-size: 15px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  transition: background-color 200ms ease, color 200ms ease;
}
.main-nav a:hover, .main-nav a:focus { background-color: var(--brand-accent); color: var(--brand-primary); }

.header-cta a {
  background: var(--warm-amber);
  color: #5b3515; /* readable on amber */
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: bold;
  box-shadow: var(--shadow-soft);
  transition: transform 150ms ease, box-shadow 200ms ease, background-color 200ms ease;
}
.header-cta a + a { background: var(--brand-secondary); color: var(--white); margin-left: 10px; }
.header-cta a:hover { transform: translateY(-1px); box-shadow: 0 10px 28px rgba(31,59,88,0.12); }
.header-cta a:focus { outline: 2px solid var(--brand-secondary); outline-offset: 2px; }

.mobile-menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--brand-primary);
  color: var(--white);
  box-shadow: var(--shadow-soft);
}
.mobile-menu-toggle:focus { outline: 2px solid var(--warm-amber); outline-offset: 2px; }

/* Mobile Menu Overlay */
.mobile-menu {
  position: fixed;
  inset: 0 0 0 auto; /* right-side sheet */
  width: 100%;
  max-width: 420px;
  background: var(--warm-cream);
  box-shadow: -8px 0 24px rgba(31,59,88,0.15);
  transform: translateX(100%);
  transition: transform 300ms ease;
  z-index: 999;
  display: flex;
  flex-direction: column;
  padding: 20px;
  gap: 16px;
}
.mobile-menu.open, .mobile-menu.active, .mobile-menu.is-visible { transform: translateX(0%); }
.mobile-menu-close {
  align-self: flex-end;
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--brand-primary);
  color: var(--white);
}
.mobile-nav { display: flex; flex-direction: column; gap: 12px; }
.mobile-nav a {
  background: var(--white);
  color: var(--brand-primary);
  padding: 12px 14px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  transition: background-color 200ms ease, transform 120ms ease;
}
.mobile-nav a:active { transform: scale(0.98); }

/* -----------------------------
   5) Hero & Sections
   ----------------------------- */
.hero {
  background: var(--warm-cream);
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
}
.hero h1 { color: var(--brand-primary); }
.hero .subheading { color: #715a48; }

/* Generic section wrapper around provided markup */
main > section { padding: 28px 0; }

.text-section p a { color: var(--brand-secondary); text-decoration: underline; }
.text-section p a:hover { color: #228b83; }

/* CTA groups */
.cta-group, .header-cta {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 12px;
}
.cta-group a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-secondary);
  color: var(--white);
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: bold;
  box-shadow: var(--shadow-soft);
  transition: transform 150ms ease, box-shadow 200ms ease, background-color 200ms ease;
}
.cta-group a:nth-child(2) { background: var(--warm-amber); color: #5b3515; }
.cta-group a:hover { transform: translateY(-1px); box-shadow: 0 10px 28px rgba(31,59,88,0.12); }
.cta-group a:focus { outline: 2px solid var(--brand-primary); outline-offset: 2px; }

/* Lists spacing for readability */
ul, ol { margin-top: 8px; }
ul li, ol li { margin: 6px 0; }

/* Trust badges & quick search as soft info pills */
.trust-badges, .quick-search {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  padding: 16px;
}

/* -----------------------------
   6) Cards & Testimonials (warm, readable)
   ----------------------------- */
.card, .testimonial-card {
  background: var(--white); /* ensure high readability */
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}
.testimonial-card p { color: var(--ink); }
.testimonial-card strong { color: var(--brand-primary); }

/* -----------------------------
   7) Footer
   ----------------------------- */
.site-footer {
  background: var(--white);
  border-top: 1px solid var(--line);
  padding: 28px 0;
}
.site-footer .content-wrapper {
  display: flex; flex-direction: column; gap: 16px; align-items: flex-start;
}
.footer-nav {
  display: flex; flex-wrap: wrap; gap: 8px 12px;
}
.footer-contact p, .brand-signature p, .footer-brand p { color: var(--muted); }
.footer-social a { color: var(--brand-secondary); text-decoration: underline; }

/* -----------------------------
   8) Buttons, Links & Interactive States
   ----------------------------- */
button, .btn, .cta-group a, .header-cta a, .mobile-nav a {
  transition: background-color 200ms ease, color 200ms ease, box-shadow 200ms ease, transform 120ms ease;
}

/* Accessible focus */
a:focus, button:focus { outline: 2px solid var(--warm-amber); outline-offset: 2px; }

/* -----------------------------
   9) Mobile-first Navigation Visibility
   ----------------------------- */
@media (min-width: 769px) {
  .main-nav { display: flex; align-items: center; gap: 6px; }
  .header-cta { display: flex; align-items: center; }
  .mobile-menu-toggle { display: none; }

  /* Header spacing refinement */
  .site-header .container { padding-top: 14px; padding-bottom: 14px; }
}

/* -----------------------------
   10) Responsive Layout Enhancements
   ----------------------------- */
@media (min-width: 768px) {
  h1 { font-size: 40px; }
  h2 { font-size: 32px; }
  h3 { font-size: 20px; }

  .container { gap: var(--space-24); }
  .content-wrapper { gap: var(--space-24); }

  .text-image-section { flex-direction: row; align-items: center; }
  .content-grid { justify-content: space-between; }
}

@media (min-width: 1024px) {
  .container { max-width: 1200px; }
}

/* -----------------------------
   11) Forms & Inputs (generic styles if any added later)
   ----------------------------- */
input, select, textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--white);
  color: var(--ink);
  box-shadow: var(--shadow-soft);
}
input:focus, select:focus, textarea:focus { border-color: var(--brand-secondary); outline: 2px solid rgba(47,163,154,0.2); }

/* -----------------------------
   12) Accessibility helpers
   ----------------------------- */
.visually-hidden { position: absolute; clip: rect(1px,1px,1px,1px); clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; white-space: nowrap; }

/* -----------------------------
   13) Cookie Consent Banner & Modal
   ----------------------------- */
.cookie-banner {
  position: fixed;
  left: 16px; right: 16px; bottom: 16px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 16px;
  z-index: 1000;
  display: none; /* hidden by default, show via .show */
}
.cookie-banner.show, .cookie-banner.is-visible { display: flex; }
.cookie-banner { flex-direction: column; gap: 12px; }
.cookie-banner .cookie-actions {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: flex-start;
}
.cookie-banner .btn-accept, .cookie-banner .btn-reject, .cookie-banner .btn-settings {
  padding: 10px 14px; border-radius: 999px; font-weight: bold;
}
.cookie-banner .btn-accept { background: var(--brand-secondary); color: var(--white); }
.cookie-banner .btn-reject { background: var(--brand-accent); color: var(--brand-primary); }
.cookie-banner .btn-settings { background: var(--warm-amber); color: #5b3515; }
.cookie-banner a { color: var(--brand-secondary); text-decoration: underline; }

/* Modal overlay */
.cookie-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(31,59,88,0.45);
  display: none;
  z-index: 1001;
}
.cookie-modal-overlay.show, .cookie-modal-overlay.is-visible { display: flex; }
.cookie-modal {
  margin: auto;
  width: 92%; max-width: 640px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 40px rgba(31,59,88,0.25);
  padding: 20px;
  display: flex; flex-direction: column; gap: 16px;
}
.cookie-modal .modal-header, .cookie-modal .modal-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.cookie-modal .modal-content { display: flex; flex-direction: column; gap: 12px; }
.cookie-category { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--brand-accent); }
.cookie-category .note { color: var(--muted); font-size: 14px; }

/* Toggle switch (pure CSS style, requires input[type=checkbox]) */
.cookie-switch { display: inline-flex; align-items: center; gap: 8px; }
.cookie-switch input[type=checkbox] { appearance: none; width: 42px; height: 24px; background: #cfd8e3; border-radius: 999px; position: relative; outline: none; transition: background-color 200ms ease; }
.cookie-switch input[type=checkbox]::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; background: var(--white); border-radius: 50%; transition: transform 200ms ease; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.cookie-switch input[type=checkbox]:checked { background: var(--brand-secondary); }
.cookie-switch input[type=checkbox]:checked::after { transform: translateX(18px); }

/* -----------------------------
   14) Micro-interactions (subtle)
   ----------------------------- */
@keyframes slideInUp { from { transform: translateY(12px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.hero .container { animation: slideInUp 420ms ease 1; }

/* -----------------------------
   15) Icon alignment within text
   ----------------------------- */
.text-section img[alt^="Telefon"],
.text-section img[alt^="E-mail"],
.text-section img[alt^="Adres"],
.text-section img[alt^="Mail"],
.text-section img[alt^="Phone"],
.text-section img[alt^="pin"],
.text-section img[alt^="icon"] {
  display: inline-block; vertical-align: middle; margin-right: 8px; height: 18px; width: auto;
}

/* -----------------------------
   16) Helpers to avoid overlap and ensure spacing
   ----------------------------- */
main > section .testimonial-card + .testimonial-card { margin-top: 16px; }
main > section .text-section + .testimonial-card, main > section .testimonial-card + .text-section { margin-top: 16px; }

/* -----------------------------
   17) Visual hierarchy tweaks per page context
   ----------------------------- */
/* Hero headings slightly bolder */
.hero h1 { font-weight: 800; }
.hero .cta-group a:first-child { background: var(--brand-primary); color: var(--white); }

/* Index page specific soft separators */
main > section:not(.hero) .container { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-soft); padding: 16px; }

/* -----------------------------
   18) Ensure no overlapping and proper z-index when overlays are open
   ----------------------------- */
body.menu-open { overflow: hidden; }

/* -----------------------------
   19) Print basics
   ----------------------------- */
@media print {
  .site-header, .site-footer, .mobile-menu, .cookie-banner, .cookie-modal-overlay { display: none !important; }
  a { text-decoration: underline; }
}

/* -----------------------------
   20) Dark-on-light policy for testimonials/reviews
   ----------------------------- */
/* Ensures strong contrast for review text */
.testimonial-card { background: #FFFFFF; }
.testimonial-card p, .testimonial-card strong { color: #1F2A37; }

/* -----------------------------
   21) Flex-only verification note (no grid/columns used)
   ----------------------------- */
/* All layout containers use display:flex with flex-wrap where needed. */
