/* RESET & BASE ------------------------------------------- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img, svg { max-width: 100%; display: block; height: auto; }
ul, ol { margin: 0; padding: 0 0 0 24px; }
dt, dd { margin: 0; }
a { color: inherit; text-decoration: none; }
button { background: transparent; border: none; font: inherit; color: inherit; cursor: pointer; }

/* THEME VARIABLES ------------------------------------------- */
:root {
  /* Brand */
  --brand-primary: #1F3A5F; /* deep steel blue */
  --brand-secondary: #D97706; /* energetic orange */
  --brand-accent: #F5F7FA; /* light accent */
  /* Playful supporting accents (used subtly for dynamic feel) */
  --fun-teal: #06B6D4;
  --fun-pink: #FF5EA8;
  --fun-lime: #A3E635;
  /* Neutrals */
  --ink: #0F172A;
  --text: #1E293B;
  --muted: #64748B;
  --white: #FFFFFF;
  --card: #FFFFFF;
  --shadow: rgba(15, 23, 42, 0.12);
  --shadow-strong: rgba(15, 23, 42, 0.18);
}

/* TYPOGRAPHY ------------------------------------------- */
body {
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  color: var(--text);
  background: var(--brand-accent);
  line-height: 1.6;
  font-size: 16px;
}
h1, h2, h3, h4, h5, h6 { font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif; color: var(--ink); line-height: 1.2; margin: 0 0 12px; }
h1 { font-size: 32px; letter-spacing: 0.3px; }
h2 { font-size: 24px; }
h3 { font-size: 20px; }
p { margin: 0 0 12px; }
strong { color: var(--ink); }
.small { font-size: 14px; color: var(--muted); }

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

/* LAYOUT PRIMITIVES ------------------------------------------- */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;               /* flexbox everywhere */
  flex-direction: column;
  gap: 20px;                   /* ensure spacing between children */
}
section { padding: 40px 0; }

/* 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; background: var(--card); border-radius: 16px; box-shadow: 0 6px 16px var(--shadow); }
.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; }

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

/* HEADER ------------------------------------------- */
header { position: sticky; top: 0; z-index: 1000; background: var(--white); box-shadow: 0 6px 18px var(--shadow); }
header .container { flex-direction: row; align-items: center; justify-content: space-between; padding: 14px 16px; gap: 16px; }
.logo img { height: 42px; width: auto; }

.main-nav { display: none; align-items: center; gap: 14px; flex-wrap: wrap; }
.main-nav a { padding: 10px 14px; border-radius: 999px; color: var(--brand-primary); transition: transform .18s ease, background-color .18s ease, color .18s ease; font-weight: 600; }
.main-nav a:hover { background: var(--brand-accent); transform: translateY(-2px); }

.cta-primary, .cta-secondary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 18px; border-radius: 14px; font-weight: 700; letter-spacing: 0.2px; transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease; }
.cta-primary { background: var(--brand-secondary); color: var(--white); box-shadow: 0 10px 20px var(--shadow); }
.cta-primary:hover { transform: translateY(-3px); box-shadow: 0 14px 28px var(--shadow-strong); background: #F59E0B; }
.cta-primary:active { transform: translateY(0); }

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

/* MOBILE NAV ------------------------------------------- */
.mobile-menu-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 10px; background: var(--brand-primary); color: var(--white); box-shadow: 0 6px 16px var(--shadow); }
.mobile-menu-toggle:hover { background: #25466F; }

.mobile-menu { position: fixed; inset: 0 0 0 auto; right: 0; top: 0; width: 100%; height: 100%; background: var(--brand-primary); color: var(--white); transform: translateX(100%); transition: transform .35s ease; z-index: 2000; display: flex; flex-direction: column; }
.mobile-menu.active { transform: translateX(0); }
.mobile-menu .mobile-menu-close { align-self: flex-end; margin: 16px; width: 44px; height: 44px; border-radius: 10px; background: var(--white); color: var(--brand-primary); box-shadow: 0 6px 16px var(--shadow); }
.mobile-nav { display: flex; flex-direction: column; gap: 14px; padding: 20px; align-items: flex-start; }
.mobile-nav a { display: flex; padding: 14px 16px; width: 100%; border-radius: 12px; background: rgba(255, 255, 255, 0.08); color: #F8FAFC; font-weight: 700; }
.mobile-nav a:hover { background: rgba(255, 255, 255, 0.16); }

@media (min-width: 992px) {
  .main-nav { display: flex; }
  .mobile-menu-toggle { display: none; }
}

/* HERO ------------------------------------------- */
.hero-section { background: var(--white); position: relative; overflow: hidden; }
.hero-section .container { padding-top: 32px; padding-bottom: 24px; }
.hero-section .content-wrapper { display: flex; flex-direction: column; gap: 16px; }

/* Playful decorative spark shapes (decorative only) */
.hero-section::before, .hero-section::after { content: ""; position: absolute; z-index: 0; pointer-events: none; opacity: .08; }
.hero-section::before { width: 220px; height: 220px; background: var(--fun-teal); border-radius: 40px; top: -40px; right: -40px; transform: rotate(18deg); }
.hero-section::after { width: 180px; height: 180px; background: var(--fun-pink); border-radius: 50%; bottom: -60px; left: -40px; animation: floaty 6s ease-in-out infinite; }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* Content items inside hero */
.usp-badges { display: flex; flex-wrap: wrap; gap: 10px; z-index: 1; }
.badge { display: inline-flex; align-items: center; padding: 8px 12px; background: var(--brand-accent); color: var(--brand-primary); border-radius: 999px; font-weight: 700; box-shadow: 0 6px 16px var(--shadow); position: relative; }
.badge::after { content: ""; width: 6px; height: 6px; background: var(--fun-lime); border-radius: 50%; margin-left: 8px; animation: blink 1.6s infinite ease-in-out; }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: .2; } }

.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; z-index: 1; }

.trust-marks { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; color: var(--muted); z-index: 1; }
.trust-marks span { display: inline-flex; align-items: center; gap: 8px; background: var(--brand-accent); padding: 8px 12px; border-radius: 12px; }
.trust-marks img { width: 18px; height: 18px; }

/* GENERIC LIST STYLES (playful markers) ----------------------- */
ul li, ol li { margin: 0 0 8px; }
ul { list-style: none; padding-left: 0; }
ul li { display: flex; align-items: flex-start; gap: 10px; }
ul li::before { content: "\2726"; /* spark star */ color: var(--brand-secondary); background: var(--white); border: 2px solid var(--brand-secondary); width: 20px; height: 20px; min-width: 20px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; line-height: 1; margin-top: 2px; box-shadow: 0 3px 8px var(--shadow); }

ol { padding-left: 20px; }

/* CONTENT WRAPPER ------------------------------------------- */
.content-wrapper { display: flex; flex-direction: column; gap: 16px; position: relative; z-index: 1; }

/* TESTIMONIALS ------------------------------------------- */
#kundenstimmen .content-wrapper, .testimonial-wrap { display: flex; flex-direction: column; gap: 16px; }
.testimonial-card { background: var(--white); border: 2px solid var(--brand-accent); border-left: 6px solid var(--brand-secondary); border-radius: 16px; box-shadow: 0 8px 20px var(--shadow); align-items: flex-start; }
.testimonial-card p { color: var(--ink); font-size: 16px; }
.testimonial-card span { color: var(--muted); font-weight: 700; }
.rating { display: flex; align-items: center; gap: 10px; color: var(--brand-primary); font-weight: 700; }
.rating img { width: 100px; height: auto; }

/* PRICES, FAQ, LIST SECTIONS --------------------------------- */
#preise .content-wrapper a, #richtpreise .content-wrapper a, #fliesen a, #putz a, #estrich a, #spachtel a, #abdichtung a, #fugen-silikon a { color: var(--brand-primary); font-weight: 700; border-bottom: 2px dashed var(--fun-teal); padding-bottom: 2px; transition: color .2s ease, border-color .2s ease; }
#preise .content-wrapper a:hover { color: var(--brand-secondary); border-color: var(--fun-pink); }

dt { font-weight: 800; color: var(--brand-primary); margin: 10px 0 4px; }
dd { margin: 0 0 10px; color: var(--text); }

/* CONTACT SECTIONS ------------------------------------------- */
#kontakt ul, #kontakt-infos ul { display: flex; flex-direction: column; gap: 8px; padding-left: 0; }
#kontakt li, #kontakt-infos li { list-style: none; display: flex; align-items: center; gap: 10px; }
#kontakt img, #kontakt-infos img { width: 20px; height: 20px; }
.map-hint { display: flex; align-items: center; gap: 8px; background: var(--brand-accent); border-left: 4px solid var(--fun-teal); padding: 12px 14px; border-radius: 12px; color: var(--brand-primary); font-weight: 700; }

/* MINI FORM (placeholder UI) --------------------------------- */
.mini-form { display: flex; flex-direction: column; gap: 10px; background: var(--white); border-radius: 16px; padding: 16px; box-shadow: 0 8px 20px var(--shadow); border: 1px solid var(--brand-accent); }
.mini-form ul { display: flex; flex-wrap: wrap; gap: 10px; padding-left: 0; }
.mini-form li { list-style: none; padding: 10px 12px; background: var(--brand-accent); border-radius: 10px; }

/* FOOTER ------------------------------------------- */
footer { background: var(--white); border-top: 6px solid var(--brand-secondary); margin-top: 20px; }
footer .container { padding-top: 24px; padding-bottom: 24px; gap: 20px; }
.footer-info { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; justify-content: space-between; }
.logo-footer img { height: 40px; }
.footer-nav, .legal-nav { display: flex; flex-wrap: wrap; gap: 12px; }
.footer-nav a, .legal-nav a { color: var(--brand-primary); padding: 8px 10px; border-radius: 10px; transition: background-color .2s ease, transform .2s ease; }
.footer-nav a:hover, .legal-nav a:hover { background: var(--brand-accent); transform: translateY(-2px); }
.footer-contact { display: flex; flex-direction: column; gap: 6px; color: var(--muted); }
.footer-copy { color: var(--muted); text-align: center; font-size: 14px; padding-top: 8px; }

/* RICH CONTENT BLOCKS ---------------------------------------- */
.text-section { display: flex; flex-direction: column; gap: 10px; }
.content-grid > * { flex: 1 1 260px; }
.card-container > .card { flex: 1 1 280px; padding: 18px; }

/* RESPONSIVE WRAPPING RULES ---------------------------------- */
@media (min-width: 768px) {
  .actions { gap: 14px; }
}
@media (min-width: 1024px) {
  /* Example of text-image layout if used */
  .text-image-section.row, .hero-row { flex-direction: row; align-items: center; }
}

/* ACCESSIBILITY & FOCUS -------------------------------------- */
:focus-visible { outline: 3px solid var(--fun-teal); outline-offset: 2px; border-radius: 6px; }

/* BUTTON MICRO-ANIMATIONS ------------------------------------ */
@keyframes pop { 0% { transform: scale(1); } 50% { transform: scale(1.04); } 100% { transform: scale(1); } }
.cta-primary:hover, .cta-secondary:hover { animation: pop .25s ease; }

/* TABLE-LIKE LISTS (ensure spacing) --------------------------- */
#ablauf ol, #weitergabe ol, #naechste-schritte ol { display: flex; flex-direction: column; gap: 8px; }

/* IMAGE ICON SIZING ------------------------------------------ */
.trust-marks img, #kontakt img, #kontakt-infos img { filter: none; }

/* SECTIONS GENERAL SPACING ----------------------------------- */
main section + section { margin-top: 20px; }

/* PLAYFUL ACCENT BORDERS FOR HEADINGS ------------------------- */
h2 { position: relative; padding-bottom: 6px; }
h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 64px; height: 6px; background: var(--brand-secondary); border-radius: 6px; }

/* MOBILE-FIRST NAV/LAYOUT SAFETY MARGINS ---------------------- */
header .cta-primary, header .cta-secondary { display: none; }
@media (min-width: 1200px) {
  header .cta-primary, header .cta-secondary { display: inline-flex; }
}

/* COOKIE CONSENT BANNER -------------------------------------- */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 3000; background: var(--white); border-top: 3px solid var(--brand-secondary); box-shadow: 0 -10px 24px var(--shadow); display: flex; align-items: center; }
.cookie-banner .container { flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; }
.cookie-text { display: flex; flex: 1 1 auto; gap: 10px; align-items: center; color: var(--text); }
.cookie-buttons { display: flex; gap: 10px; flex-wrap: wrap; }
.cookie-btn { padding: 10px 14px; border-radius: 12px; font-weight: 700; }
.cookie-accept { background: var(--brand-secondary); color: var(--white); }
.cookie-accept:hover { background: #F59E0B; }
.cookie-reject { background: var(--brand-accent); color: var(--brand-primary); border: 2px solid var(--brand-primary); }
.cookie-reject:hover { background: var(--brand-primary); color: var(--white); }
.cookie-settings { background: var(--white); color: var(--brand-primary); border: 2px dashed var(--brand-primary); }
.cookie-settings:hover { border-style: solid; }

/* COOKIE MODAL ----------------------------------------------- */
.cookie-modal { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 4000; display: none; align-items: center; justify-content: center; padding: 20px; }
.cookie-modal.active { display: flex; }
.cookie-modal .modal-inner { background: var(--white); width: 100%; max-width: 680px; border-radius: 18px; box-shadow: 0 20px 40px var(--shadow-strong); display: flex; flex-direction: column; gap: 16px; padding: 18px; border: 2px solid var(--brand-accent); }
.cookie-modal .modal-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cookie-modal .modal-body { display: flex; flex-direction: column; gap: 12px; }
.cookie-category { display: flex; align-items: center; justify-content: space-between; background: var(--brand-accent); border-radius: 12px; padding: 12px; }
.cookie-category .label { display: flex; flex-direction: column; gap: 4px; }
.cookie-category .toggle { display: inline-flex; align-items: center; gap: 8px; }
.toggle input[type="checkbox"] { width: 44px; height: 24px; appearance: none; background: #CBD5E1; border-radius: 999px; position: relative; outline: none; transition: background-color .2s ease; }
.toggle input[type="checkbox"]::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; background: var(--white); border-radius: 50%; transition: transform .2s ease; box-shadow: 0 2px 6px var(--shadow); }
.toggle input[type="checkbox"]:checked { background: var(--brand-secondary); }
.toggle input[type="checkbox"]:checked::after { transform: translateX(20px); }
.cookie-modal .modal-footer { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }

/* PAGE-SPECIFIC MINOR TWEAKS --------------------------------- */
#projekte .text-section h3 { color: var(--brand-primary); margin-top: 8px; }

/* ADDITIONAL FLEX UTILITIES ---------------------------------- */
.flex { display: flex; }
.row { display: flex; flex-direction: row; }
.col { display: flex; flex-direction: column; }
.center { align-items: center; justify-content: center; }
.wrap { flex-wrap: wrap; }
.gap-20 { gap: 20px; }

/* ENSURE NO OVERLAP BETWEEN CARDS/SECTIONS -------------------- */
section .testimonial-card + .testimonial-card,
section ul + ul,
section .card + .card,
section .content-wrapper > * + * { margin-top: 20px; }

/* RESPONSIVE ADJUSTMENTS ------------------------------------- */
@media (min-width: 768px) {
  .hero-section .container { padding-top: 48px; padding-bottom: 36px; }
}

/* PRINT STYLES BASIC ----------------------------------------- */
@media print {
  header, .mobile-menu, .cookie-banner, .cookie-modal { display: none !important; }
  a { text-decoration: underline; color: #000; }
}
