/* =======================================================================
   CSS RESET & NORMALIZE
   ======================================================================= */
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,
main, menu, nav, output, ruby, section, summary,
time, mark, audio, video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
  box-sizing: border-box;
}
html { line-height: 1.15; -webkit-text-size-adjust: 100%; }
body { line-height: 1.5; background: #fff; color: #303030; }
article, aside, details, figcaption, figure,
footer, header, hgroup, main, menu, nav, section { display: block; }
img, picture, video, canvas, svg { display: block; max-width: 100%; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
button, [type="button"], [type="reset"], [type="submit"] { cursor: pointer; }
a { background-color: transparent; text-decoration: none; color: inherit; cursor: pointer; }
ul, ol { list-style: none; }

/* =======================================================================
   FONT IMPORTS & GLOBAL VARS (with fallbacks)
   ======================================================================= */
@import url('https://fonts.googleapis.com/css?family=Montserrat:400,700&display=swap');
@import url('https://fonts.googleapis.com/css?family=Open+Sans:400,700&display=swap');
:root {
  --color-primary: #303030;
  --color-secondary: #E5401D;
  --color-accent: #F4F5F7;
  --color-white: #fff;
  --color-shadow: rgba(30,30,30,0.05);
  --color-border: #E7E8EA;
  --font-display: 'Montserrat', Arial, sans-serif;
  --font-body: 'Open Sans', Arial, sans-serif;
}

body {
  font-family: var(--font-body);
  background: var(--color-white);
  color: var(--color-primary);
  font-size: 16px;
  letter-spacing: 0.01em;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* =======================================================================
   CONTAINER & LAYOUT
   ======================================================================= */
.container {
  max-width: 1060px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.content-wrapper {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: none;
  border-radius: 18px;
  box-shadow: none;
}

/* =======================================================================
   TYPOGRAPHY
   ======================================================================= */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--color-primary);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.15;
}
h1 { font-size: 2.5rem; margin-bottom: 18px; }
h2 { font-size: 2rem; margin-bottom: 14px; }
h3 { font-size: 1.3rem; margin-bottom: 10px; }
h4, h5, h6 { font-size: 1rem; margin-bottom: 5px; }
p {
  font-size: 1.06rem;
  color: var(--color-primary);
  margin-bottom: 16px;
  line-height: 1.7;
}
strong { font-weight: 700; }

/* Content lists */
ul, ol {
  margin-bottom: 18px;
  margin-left: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
ul li, ol li {
  font-size: 1.07rem;
  color: var(--color-primary);
  padding-left: 0;
}
address {
  font-style: normal;
  color: var(--color-primary);
  margin-bottom: 10px;
  letter-spacing: 0.003em;
}

/* =======================================================================
   HEADER & NAVIGATION BAR
   ======================================================================= */
header {
  width: 100%;
  background: var(--color-white);
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 4px 10px -8px var(--color-shadow);
}
header .container {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
}

header img {
  height: 44px;
  width: auto;
  margin-right: 32px;
}

header nav {
  display: flex;
  flex-direction: row;
  gap: 24px;
  align-items: center;
}
header nav a {
  color: var(--color-primary);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1rem;
  padding: 5px 8px;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
  position: relative;
  line-height: 24px;
}
header nav a:hover, header nav a:focus {
  background: var(--color-accent);
  color: var(--color-secondary);
  outline: none;
  text-decoration: none;
}
header nav .cta.primary {
  background: var(--color-secondary);
  color: var(--color-white);
  padding: 10px 20px;
  border-radius: 16px;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 1px 7px 0 var(--color-shadow);
  margin-left: 8px;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
header nav .cta.primary:hover, header nav .cta.primary:focus {
  background: #c63112;
  color: var(--color-white);
  box-shadow: 0 4px 14px -5px var(--color-shadow);
}

/* Mobile menu burger */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--color-primary);
  margin-left: 24px;
  z-index: 101;
  border-radius: 50%;
  width: 44px; height: 44px;
  transition: background 0.17s;
}
.mobile-menu-toggle:hover, .mobile-menu-toggle:focus {
  background: var(--color-accent);
}

/* MOBILE MENU STYLES */
.mobile-menu {
  position: fixed;
  left: 0; top: 0;
  width: 100vw;
  height: 100vh;
  background: var(--color-white);
  z-index: 120;
  box-shadow: 0 8px 24px 0 var(--color-shadow);
  transform: translateX(-100%);
  transition: transform 0.32s cubic-bezier(.5,.1,.5,1);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0;
}
.mobile-menu.open {
  transform: translateX(0);
}
.mobile-menu-close {
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--color-primary);
  position: absolute;
  top: 24px; right: 24px;
  z-index: 130;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  transition: background 0.18s;
}
.mobile-menu-close:hover, .mobile-menu-close:focus {
  background: var(--color-accent);
}

.mobile-nav {
  margin-top: 82px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: flex-start;
  padding: 0 36px;
}
.mobile-nav a {
  font-family: var(--font-display);
  font-size: 1.16rem;
  padding: 12px 0;
  color: var(--color-primary);
  border-bottom: 1px solid var(--color-border);
  width: 100%;
  transition: background 0.15s, color 0.15s;
}
.mobile-nav a:last-child { border-bottom: none; }
.mobile-nav a:hover, .mobile-nav a:focus {
  background: var(--color-accent);
  color: var(--color-secondary);
}

/* Hide desktop nav on mobile, show mobile menu toggle */
@media (max-width: 900px) {
  header nav { display: none !important; }
  .mobile-menu-toggle { display: block; }
}
@media (min-width: 901px) {
  .mobile-menu { display: none !important; }
}

/* Prevent horizontal scroll on menu open */
body.mobile-menu-open { overflow: hidden !important; }

/* =======================================================================
   SECTIONS & LAYOUT SYSTEMS
   ======================================================================= */
.section {
  margin-bottom: 60px;
  padding: 40px 20px;
}
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  margin-bottom: 20px;
  background: var(--color-accent);
  border-radius: 16px;
  box-shadow: 0 2px 16px 0 var(--color-shadow);
  padding: 32px 28px;
  position: relative;
  transition: box-shadow 0.23s, transform 0.23s;
  flex: 1 1 300px;
}
.card:hover, .card:focus-within {
  box-shadow: 0 6px 20px -2px var(--color-shadow);
  transform: translateY(-2px) scale(1.015);
}
.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;
}
.text-section {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.testimonial-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  background: var(--color-accent);
  border-radius: 14px;
  box-shadow: 0 1px 8px 0 var(--color-shadow);
  padding: 20px;
  margin-bottom: 20px;
  min-width: 280px;
  max-width: 520px;
  color: var(--color-primary);
}
.testimonial-card p {
  font-size: 1.08rem;
  color: var(--color-primary);
  margin-bottom: 8px;
}
.testimonial-card span {
  font-size: 0.94rem;
  color: #585858;
  margin-left: 2px;
  font-style: italic;
}

.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}

/* =======================================================================
   BUTTONS, LINKS, CTA STYLES
   ======================================================================= */
.cta, .cta.primary, .cta.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  font-family: var(--font-display);
  font-weight: 600;
  border: none;
  border-radius: 18px;
  font-size: 1.04rem;
  text-align: center;
  margin-top: 14px;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s, outline 0.13s;
  box-shadow: 0 1px 8px 0 var(--color-shadow);
  cursor: pointer;
  outline: none;
  background: var(--color-accent);
  color: var(--color-primary);
}
.cta.primary {
  background: var(--color-secondary);
  color: var(--color-white);
}
.cta.secondary {
  background: var(--color-white);
  color: var(--color-secondary);
  border: 1px solid var(--color-secondary);
}
.cta:hover, .cta:focus,
.cta.primary:hover, .cta.primary:focus,
.cta.secondary:hover, .cta.secondary:focus {
  box-shadow: 0 8px 24px 0 var(--color-shadow);
  transform: translateY(-1.5px) scale(1.01);
  background: #fafbfc;
  color: var(--color-secondary);
}
.cta.primary:hover, .cta.primary:focus {
  background: #c63112;
  color: #fff;
}
.cta.secondary:hover, .cta.secondary:focus {
  background: var(--color-secondary);
  color: #fff;
}

/* =======================================================================
   FOOTER
   ======================================================================= */
footer {
  background: var(--color-accent);
  border-top: 1px solid var(--color-border);
  padding: 0;
  box-shadow: none;
}
footer .container {
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  min-height: 70px;
  font-size: 0.97rem;
}
footer nav {
  display: flex;
  gap: 20px;
}
footer nav a {
  color: var(--color-primary);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  border-radius: 6px;
  padding: 3px 7px;
  transition: background 0.16s, color 0.14s;
}
footer nav a:hover, footer nav a:focus {
  background: var(--color-white);
  color: var(--color-secondary);
}
footer span {
  color: #7a7a7a;
}

/* =======================================================================
   COOKIE CONSENT BANNER & MODAL
   ======================================================================= */
.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  width: 100vw;
  background: var(--color-white);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -2px 18px 0 var(--color-shadow);
  z-index: 250;
  padding: 20px 12px 18px 12px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 24px;
  transition: transform 0.37s cubic-bezier(.6,0,.7,1);
}
.cookie-banner.hide {
  transform: translateY(120%);
  pointer-events: none;
  opacity: 0.5;
}
.cookie-banner strong {
  font-family: var(--font-display);
  font-size: 1.08rem;
}
.cookie-banner p { font-size: 1rem; margin-bottom: 0 !important; color: var(--color-primary) }
.cookie-banner .banner-actions {
  display: flex;
  flex-direction: row;
  gap: 10px;
}
.cookie-banner button {
  padding: 8px 18px;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-display);
  background: var(--color-accent);
  color: var(--color-primary);
  margin-left: 0;
  transition: background 0.15s, color 0.15s;
}
.cookie-banner .accept {
  background: var(--color-secondary);
  color: var(--color-white);
  margin-right: 6px;
}
.cookie-banner .accept:hover, .cookie-banner .accept:focus {
  background: #bb2c0d;
  color: #fff;
}
.cookie-banner .reject {
  background: #e7e8ea;
  color: var(--color-primary);
}
.cookie-banner .reject:hover, .cookie-banner .reject:focus {
  background: #eaeaea;
}
.cookie-banner .settings {
  background: var(--color-accent);
  color: var(--color-secondary);
  border: 1px solid var(--color-secondary);
}
.cookie-banner .settings:hover, .cookie-banner .settings:focus {
  background: var(--color-secondary);
  color: #fff;
}

.cookie-modal {
  position: fixed;
  left: 0; top: 0; right:0; bottom:0;
  width: 100vw; height: 100vh;
  z-index: 270;
  background: rgba(48,48,48,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: all;
  opacity: 1;
  transition: opacity 0.25s;
}
.cookie-modal.hide {
  opacity: 0;
  pointer-events: none;
}
.cookie-modal-dialog {
  background: var(--color-white);
  border-radius: 18px;
  box-shadow: 0 12px 40px 0 var(--color-shadow);
  padding: 40px 28px 32px 28px;
  min-width: 320px;
  max-width: 94vw;
  display: flex;
  flex-direction: column;
  gap: 22px;
  align-items: flex-start;
  min-height: 280px;
  position: relative;
}
.cookie-modal .close-modal {
  position: absolute;
  top: 18px; right: 16px;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: #A1A1A1;
  width: 40px; height: 40px;
  border-radius: 50%;
  transition: background 0.15s;
}
.cookie-modal .close-modal:hover, .cookie-modal .close-modal:focus {
  background: #f5f5f5;
}
.cookie-modal h3 {
  font-size: 1.28rem;
  margin-bottom: 0.4em;
}
.cookie-preference-category {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
  font-size: 1rem;
}
.cookie-preference-category label {
  font-family: var(--font-body);
  font-size: 1rem;
}
.cookie-preference-category .switch {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 22px;
}
.cookie-preference-category .switch input { display: none; }
.cookie-preference-category .slider {
  position: absolute; cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #e5e5e5;
  border-radius: 22px;
  transition: background 0.25s;
}
.cookie-preference-category .switch input:checked + .slider {
  background-color: var(--color-secondary);
}
.cookie-preference-category .slider:before {
  position: absolute; content: "";
  height: 15px; width: 15px;
  left: 4px; bottom: 3.5px;
  background: var(--color-white);
  border-radius: 50%;
  box-shadow: 0 1px 4px 0 var(--color-shadow);
  transition: transform 0.22s;
}
.cookie-preference-category .switch input:checked + .slider:before {
  transform: translateX(14px);
}
.cookie-modal .modal-actions {
  display: flex; flex-direction: row; gap: 12px;
  margin-top: 18px;
}
.cookie-modal .modal-actions button {
  padding: 8px 18px;
  border-radius: 12px;
  border: none;
  font-size: 1rem;
  font-family: var(--font-display);
  font-weight: 600;
}
.cookie-modal .modal-actions .accept {
  background: var(--color-secondary);
  color: #fff;
}
.cookie-modal .modal-actions .accept:hover, .cookie-modal .modal-actions .accept:focus {
  background: #bb2c0d;
}
.cookie-modal .modal-actions .reject {
  background: #e7e8ea;
  color: var(--color-primary);
}
.cookie-modal .modal-actions .reject:hover, .cookie-modal .modal-actions .reject:focus {
  background: #eaeaea;
}

/* Essential category always enabled (greyed out switch) */
.cookie-preference-category.essential .slider {
  background: #d5d5d5 !important;
}
.cookie-preference-category.essential .slider:before {
  background: #bbb !important;
}
.cookie-preference-category.essential label {
  color: #a6a6a6;
  font-style: italic;
}
.cookie-preference-category.essential .switch {
  pointer-events: none;
  opacity: 0.7;
}

/* =======================================================================
   RESPONSIVE & FLEXBOX LAYOUT ADJUSTMENTS
   ======================================================================= */
@media (max-width: 1060px) {
  .container { max-width: 100%; }
}
@media (max-width: 900px) {
  .container { padding: 0 10px; }
  header img { height: 38px; }
}
@media (max-width: 768px) {
  .section { padding: 30px 8px; }
  .content-wrapper { margin-top: 12px; gap: 10px; }
  h1 { font-size: 2rem; margin-bottom: 12px; }
  h2 { font-size: 1.34rem; margin-bottom: 8px; }
  .testimonial-card { min-width: 160px; max-width: 100%; padding: 13px; }
  .footer .container, footer .container { flex-direction: column; gap: 12px; align-items: stretch; }
}
@media (max-width: 600px) {
  .testimonial-card { min-width: 120px; padding: 10px; font-size: 1rem; }
  .section { margin-bottom: 38px; }
}
@media (max-width: 600px) {
  .cookie-banner { flex-direction: column; gap: 12px; align-items: flex-start; }
  .cookie-banner .banner-actions { width: 100%; gap: 6px; }
}
@media (max-width: 768px) {
  .content-grid, .card-container {
    flex-direction: column;
    gap: 14px;
  }
  .text-image-section {
    flex-direction: column;
    gap: 18px;
    align-items: stretch;
  }
  header .container { flex-direction: row; justify-content: space-between; padding: 6px 10px; }
}

/* Flex spacing for all grouped content */
.card-container > *, .content-grid > *, .section > *, .content-wrapper > * {
  margin: 0 0 0 0;
}

/* =======================================================================
   MISC - ACCESSIBILITY & SELECTION
   ======================================================================= */
::selection { background: var(--color-secondary); color: #fff; }
:focus-visible { outline: 2px solid var(--color-secondary); outline-offset: 2px; }

/* Hide visually but keep for screen readers */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* =======================================================================
   ANIMATIONS & MICRO-INTERACTIONS
   ======================================================================= */
.card, .testimonial-card {
  transition: box-shadow 0.19s, transform 0.18s;
}
.cta, .cta.primary, .cta.secondary, button, .mobile-menu-toggle, .mobile-menu-close {
  transition: background 0.16s, color 0.14s, box-shadow 0.16s, transform 0.13s;
}
.mobile-menu, .mobile-menu.open { transition: transform 0.32s cubic-bezier(.5,.1,.5,1); }

/* =======================================================================
   SPECIAL - PAGE SPECIFIC/MINOR COMPONENTS
   ======================================================================= */
.section:last-child { margin-bottom: 38px; }

/* Ensure address/p text don't overlap in Kontakt sections */
.content-wrapper address + p {
  margin-top: 5px;
}

/* For table columns in legal pages if needed */
table {
  width: 100%; border-collapse: collapse; margin-bottom: 32px; }
th, td { padding: 9px 6px; text-align: left; font-size: 1rem; border-bottom: 1px solid var(--color-accent); }
thead th { background: var(--color-accent); }

/* =======================================================================
   END OF CSS - Bauhaus Pfade Minimalist Identity
   ======================================================================= */
