/* =========================================================
   Spektralhain Ausbau & Fliesen - style.css
   Design style: geometric_structured (geometric shapes, structured, angular)
   Mobile-first, Flexbox-only (no CSS Grid or Columns)
   Fonts: Trebuchet MS (display), Arial (body)
   Brand colors: primary #1F2937, secondary #8A5A44, accent #F3F4F6
   ========================================================= */

/* =====================
   CSS RESET / NORMALIZE
   ===================== */
* { box-sizing: border-box; }
*::before, *::after { box-sizing: inherit; }
html, body { margin: 0; padding: 0; }
img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
ul, ol { padding-left: 0; margin: 0; }

/* ===============
   ROOT & TYPOGRAPHY
   =============== */
:root {
  --color-primary: #1F2937;
  --color-secondary: #8A5A44;
  --color-accent: #F3F4F6;
  --color-white: #FFFFFF;
  --color-muted: #6B7280; /* neutral for text */
  --shadow-soft: 0 4px 14px rgba(31,41,55,0.08);
  --shadow-sharp: 0 8px 0 rgba(31,41,55,0.08);
}

body {
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  color: var(--color-primary);
  background-color: #FAFAFB;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Trebuchet MS", Arial, sans-serif;
  margin: 0 0 12px 0;
  line-height: 1.2;
  letter-spacing: 0.4px;
}

h1 { font-size: 32px; }
h2 { font-size: 24px; }
h3 { font-size: 18px; }
p { margin: 0 0 12px 0; }
small { color: var(--color-muted); }

/* Headline accent: geometric underline bar */
.heading-accent { position: relative; padding-top: 8px; }
.heading-accent::before {
  content: "";
  display: block;
  width: 56px;
  height: 4px;
  background: var(--color-secondary);
}

/* =====================
   LAYOUT CONTAINERS
   (Flexbox-only everywhere)
   ===================== */
.container {
  display: flex; /* flex container by rule */
  flex-direction: column;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

.content-wrapper {
  display: flex; /* flex container */
  flex-direction: column;
  align-items: flex-start;
  gap: 24px; /* consistent space between blocks */
  width: 100%;
}

/* Section spacing (generic and mandatory class) */
section { margin: 0 0 60px 0; padding: 32px 0; }
.section { margin-bottom: 60px; padding: 40px 20px; }

/* Cards and grids (mandatory classes) */
.card-container { display: flex; flex-wrap: wrap; gap: 24px; }
.card { margin-bottom: 20px; position: relative; display: flex; flex-direction: column; padding: 20px; background: var(--color-white); border: 2px solid #E5E7EB; border-radius: 10px; box-shadow: var(--shadow-soft); }
.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; border: 2px solid #E5E7EB; border-radius: 10px; background: var(--color-accent); color: var(--color-primary); box-shadow: var(--shadow-soft); }
.feature-item { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; }

/* Lists: structured, geometric bullets */
ul { display: flex; flex-direction: column; gap: 10px; list-style: none; }
ol { display: flex; flex-direction: column; gap: 10px; padding-left: 20px; }
ul li { position: relative; padding-left: 22px; }
ul li::before { content: ""; position: absolute; left: 0; top: 8px; width: 10px; height: 10px; border: 2px solid var(--color-secondary); transform: rotate(45deg); background: transparent; }
ol li { counter-increment: step; }
ol li::marker { font-weight: bold; }

/* =====================
   HEADER & NAVIGATION
   ===================== */
header { background: var(--color-white); border-bottom: 3px solid #E5E7EB; position: relative; z-index: 10; }
header .content-wrapper { flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; }
.logo { display: flex; align-items: center; }
.logo img { height: 40px; width: auto; }

.main-nav { display: none; align-items: center; gap: 18px; }
.main-nav a { font-weight: 600; padding: 8px 10px; border-bottom: 3px solid transparent; transition: color .2s ease, border-color .2s ease; }
.main-nav a:hover, .main-nav a:focus { color: var(--color-secondary); border-color: var(--color-secondary); outline: none; }

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

/* Mobile burger */
.mobile-menu-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; font-size: 22px; background: var(--color-primary); color: var(--color-white); border: none; border-radius: 8px; cursor: pointer; box-shadow: var(--shadow-soft); transition: transform .2s ease, background .2s ease; }
.mobile-menu-toggle:hover { transform: translateY(-1px); background: #111827; }
.mobile-menu-toggle:focus { outline: 2px solid var(--color-secondary); outline-offset: 2px; }

/* Mobile menu overlay */
.mobile-menu { position: fixed; inset: 0; display: flex; flex-direction: column; background: var(--color-primary); color: var(--color-white); transform: translateX(100%); transition: transform .35s ease; z-index: 9999; padding: 16px; gap: 16px; }
.mobile-menu.active { transform: translateX(0); }
.mobile-menu-close { align-self: flex-end; background: transparent; color: var(--color-white); border: 2px solid var(--color-white); border-radius: 8px; padding: 6px 10px; cursor: pointer; font-weight: 700; }
.mobile-nav { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.mobile-nav a { padding: 14px 10px; border: 2px solid rgba(255,255,255,0.15); border-radius: 10px; background: rgba(255,255,255,0.04); transition: background .2s ease, transform .2s ease; }
.mobile-nav a:hover { background: rgba(255,255,255,0.10); transform: translateX(4px); }

/* =====================
   HERO SECTION
   ===================== */
.hero { background: var(--color-accent); position: relative; overflow: hidden; border-bottom: 4px solid var(--color-secondary); }
.hero .content-wrapper { padding: 24px 0; }
/* Decorative geometric block */
.hero::before { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; background: rgba(138,90,68,0.08); transform: rotate(45deg); border: 3px solid rgba(138,90,68,0.25); z-index: 0; }
.hero .container, .hero .content-wrapper { position: relative; z-index: 1; }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.trust-badges { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.trust-badges li { padding: 6px 10px; border: 2px solid #E5E7EB; border-radius: 10px; background: var(--color-white); font-weight: 600; }

/* =====================
   BUTTONS & LINKS
   ===================== */
.btn-primary, .btn-secondary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 18px; border-radius: 10px; font-weight: 700; letter-spacing: 0.3px; text-transform: none; transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease, border-color .2s ease; border: 2px solid transparent; }

.btn-primary { background: var(--color-secondary); color: var(--color-white); box-shadow: var(--shadow-soft); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 18px rgba(138,90,68,0.25); color: white; }
.btn-primary:focus { outline: 2px solid var(--color-secondary); outline-offset: 3px; }

.btn-secondary { background: var(--color-white); color: var(--color-primary); border-color: var(--color-secondary); }
.btn-secondary:hover { background: var(--color-secondary); color: var(--color-white); transform: translateY(-2px); }

.text-link { color: var(--color-secondary); font-weight: 700; border-bottom: 2px solid var(--color-secondary); padding-bottom: 2px; }
.text-link:hover { color: #6f4536; border-color: #6f4536; }

/* =====================
   GENERIC CONTENT STYLES
   ===================== */
.text-image-section > * { flex: 1 1 280px; }

/* Quotes / Testimonials: readable dark text on light background */
.testimonial-card p { margin: 0; }
.testimonial-card strong { font-family: "Trebuchet MS", Arial, sans-serif; }

/* =====================
   FOOTER
   ===================== */
footer { background: var(--color-primary); color: var(--color-white); border-top: 4px solid var(--color-secondary); }
footer section { margin: 0; padding: 32px 0; }
footer .content-wrapper { flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 24px; }
.footer-brand, .footer-links, .footer-contact, .footer-legal, .footer-social, .footer-news { display: flex; flex-direction: column; gap: 10px; flex: 1 1 220px; }
footer a { color: var(--color-white); text-decoration: none; border-bottom: 2px solid transparent; }
footer a:hover { border-color: rgba(255,255,255,0.5); }
footer img { height: 36px; width: auto; }

/* =====================
   TABLES (if any appear later)
   ===================== */
.table { display: flex; flex-direction: column; width: 100%; gap: 8px; }
.table-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; background: var(--color-white); border: 2px solid #E5E7EB; border-radius: 10px; }
.table-row > * { flex: 1 1 160px; }

/* =====================
   ACCESSIBILITY & STATES
   ===================== */
:focus-visible { outline: 2px solid var(--color-secondary); outline-offset: 2px; }

/* =====================
   COOKIE CONSENT BANNER
   ===================== */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; gap: 12px; background: var(--color-primary); color: var(--color-white); padding: 16px; z-index: 9998; transform: translateY(110%); transition: transform .35s ease; box-shadow: 0 -8px 20px rgba(0,0,0,0.2); }
.cookie-banner.show { transform: translateY(0); }
.cookie-banner .cookie-content { display: flex; flex-direction: column; gap: 8px; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 14px; border-radius: 10px; font-weight: 700; border: 2px solid transparent; cursor: pointer; }
.cookie-accept { background: var(--color-secondary); color: var(--color-white); }
.cookie-accept:hover { filter: brightness(0.95); }
.cookie-reject { background: var(--color-white); color: var(--color-primary); border-color: var(--color-secondary); }
.cookie-reject:hover { background: var(--color-secondary); color: var(--color-white); }
.cookie-settings { background: transparent; color: var(--color-white); border-color: var(--color-white); }
.cookie-settings:hover { background: rgba(255,255,255,0.1); }

/* Cookie modal */
.cookie-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 9999; opacity: 0; pointer-events: none; transition: opacity .25s ease; display: flex; align-items: center; justify-content: center; }
.cookie-overlay.show { opacity: 1; pointer-events: auto; }
.cookie-modal { background: var(--color-white); color: var(--color-primary); width: 92%; max-width: 640px; border: 3px solid #E5E7EB; border-radius: 12px; box-shadow: var(--shadow-sharp); padding: 18px; display: flex; flex-direction: column; gap: 14px; transform: translateY(12px); transition: transform .25s ease; }
.cookie-overlay.show .cookie-modal { transform: translateY(0); }
.cookie-modal-header { display: flex; align-items: center; justify-content: space-between; }
.cookie-modal-body { display: flex; flex-direction: column; gap: 12px; }
.cookie-category { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px; border: 2px solid #E5E7EB; border-radius: 10px; background: var(--color-accent); }
.cookie-modal-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }

/* =====================
   UTILITIES
   ===================== */
.hide { display: none !important; }
.muted { color: var(--color-muted); }

/* =====================
   RESPONSIVE (mobile-first)
   ===================== */
@media (min-width: 480px) {
  h1 { font-size: 36px; }
}

@media (min-width: 768px) {
  h1 { font-size: 42px; }
  h2 { font-size: 28px; }
  .content-wrapper { gap: 28px; }
  section { padding: 40px 0; }

  /* Show desktop nav, align header tools */
  .main-nav { display: flex; }
  .header-cta { display: flex; }
  .mobile-menu-toggle { display: none; }

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

  /* Footer density */
  footer .content-wrapper { gap: 28px; }
}

@media (min-width: 1024px) {
  h1 { font-size: 48px; }
  .container { padding: 0 20px; }
  .main-nav a { padding: 10px 12px; }
  .cta-row { gap: 14px; }
}

/* =====================
   PAGE-SPECIFIC POLISH
   ===================== */
/* 404 Page hero tone */
body:has(main .hero h1:contains("404")) .hero { background: #FFF; }
/* Note: Some browsers may ignore :has/:contains. General hero styles already ensure readability. */

/* Project/Reference emphasis */
.btn-primary + .btn-secondary { margin-left: 0; }

/* =====================
   GEOMETRIC DETAILS
   ===================== */
/* Angular corners via borders for strong geometry */
.box-angular { border: 3px solid #E5E7EB; border-radius: 12px; background: var(--color-white); box-shadow: var(--shadow-soft); }

/* Sharp separators */
.separator { height: 4px; width: 72px; background: var(--color-secondary); display: inline-flex; }

/* =====================
   LINKS HOVER IN CONTENT
   ===================== */
main a { color: var(--color-secondary); }
main a:hover { color: #6f4536; }

/* =====================
   ENSURE NO OVERLAP
   ===================== */
/* All flex containers use gaps; ensure children have min vertical spacing */
.content-wrapper > * { margin: 0; }

/* =====================
   FORMS (if later added)
   ===================== */
.input, input[type="text"], input[type="email"], textarea, select { width: 100%; padding: 12px 14px; border: 2px solid #E5E7EB; border-radius: 10px; background: var(--color-white); }
.input:focus, input[type="text"]:focus, input[type="email"]:focus, textarea:focus, select:focus { outline: none; border-color: var(--color-secondary); box-shadow: 0 0 0 3px rgba(138,90,68,0.15); }

/* =====================
   MANDATORY SPACING & ALIGNMENT CLASSES (already defined above but reiterated) 
   ===================== */
/* Provided as-is per instruction to ensure presence */
/* .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; } */

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