/* ==========================================================================
   CSS RESET & NORMALIZE (modern)
   ========================================================================== */
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-size: 100%;
  font: inherit;
  vertical-align: baseline;
  box-sizing: border-box;
}
html {
  line-height: 1.15;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  background: #F7F7F5;
  color: #1F3659;
  font-family: 'Roboto', Arial, sans-serif;
  font-size: 16px;
  min-height: 100vh;
}
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
  display: block;
}
ul, ol {
  list-style: none;
}
a {
  background: transparent;
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}
a:focus { outline: 2px solid #1F3659; outline-offset: 2px;}
img {
  border-style: none;
  max-width: 100%;
  display: block;
  height: auto;
}
button,
input,select,textarea {
  font-family: inherit;
  font-size: 100%;
  margin: 0;
  border: none;
  background: none;
  outline: none;
}
button {
  cursor: pointer;
  background: none;
}
* { box-sizing: border-box; }
h1,h2,h3,h4,h5,h6 {
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #1F3659;
}

/* ==========================================================================
   COLOR VARIABLES & ROOT
   ========================================================================== */
:root {
  --primary: #1F3659;
  --secondary: #B4C6DC;
  --accent: #F7F7F5;
  --white: #fff;
  --gray: #E4E9F1;
  --dark: #1C2537;
  --text: #1F3659;
  --success: #13ce66;
  --danger: #e64747;
  --focus: #1F3659;
  --shadow: 0 4px 24px rgba(31,54,89,0.07), 0 2px 8px rgba(31,54,89,0.08);
}

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */
body {
  font-family: 'Roboto', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
}
h1 {
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--primary);
  letter-spacing: -1.2px;
  margin-bottom: 24px;
}
h2 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 20px;
}
h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary);
}
h4, h5, h6 { font-weight: 700; }
.hero-sub {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 28px;
  line-height: 1.4;
}
p, ul, ol {
  font-size: 1rem;
  font-weight: 400;
  margin-bottom: 14px;
}
ul, ol {
  margin-left: 16px;
  margin-bottom: 18px;
  font-size: 1rem;
}
ul li, ol li {
  margin-bottom: 8px;
  position: relative;
  padding-left: 18px;
}
ul li:before {
  content: '';
  position: absolute;
  left: 0; top: 10px;
  width: 8px; height: 8px;
  background: var(--secondary);
  border-radius: 2px;
}
strong, b {
  font-weight: 700;
}

/* ==========================================================================
   LAYOUT CONTAINER
   ========================================================================== */
.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.content-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.section {
  margin-bottom: 60px;
  padding: 40px 20px;
}
/* Section backgrounds for visual separation */
section:nth-of-type(odd) {
  background: var(--accent);
}
section:nth-of-type(even) {
  background: var(--white);
}
.section:last-child { margin-bottom: 0; }


/* ==========================================================================
   NAVIGATION (HEADER, MAIN NAV, BURGER)
   ========================================================================== */
header {
  background: var(--white);
  box-shadow: 0 2px 12px rgba(31,54,89,0.07);
  z-index: 101;
  position: sticky;
  top: 0;
}
header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.main-nav {
  display: flex;
  gap: 24px;
  align-items: center;
}
.main-nav a {
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.02em;
  position: relative;
  padding: 8px 0;
  transition: color 0.2s;
}
.main-nav a:hover,
.main-nav a:focus {
  color: var(--secondary);
}
.cta-btn {
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  background: var(--primary);
  color: var(--white);
  border-radius: 28px;
  padding: 12px 32px;
  margin-left: 20px;
  box-shadow: var(--shadow);
  letter-spacing: 0.02em;
  transition: background 0.2s, box-shadow 0.2s, color 0.2s, transform 0.18s;
  display: inline-block;
}
.cta-btn:hover, .cta-btn:focus {
  background: var(--secondary);
  color: var(--primary);
  box-shadow: 0 6px 18px rgba(31,54,89,0.13);
  transform: translateY(-2px) scale(1.04);
}
.mobile-menu-toggle {
  display: none;
  font-size: 2rem;
  color: var(--primary);
  background: var(--accent);
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  margin-left: 20px;
  z-index: 102;
  transition: background 0.2s, color 0.2s;
}
.mobile-menu-toggle:hover, .mobile-menu-toggle:focus {
  background: var(--secondary);
  color: var(--dark);
}

/* ==========================================================================
   MOBILE MENU
   ========================================================================== */
.mobile-menu {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--white);
  z-index: 1200;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(.77,.41,.2,1.2);
  box-shadow: -2px 0 16px rgba(31,54,89,0.09);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 0;
  padding-top: 32px;
}
.mobile-menu.active {
  transform: translateX(0);
}
.mobile-menu-close {
  background: none;
  font-size: 2.2rem;
  color: var(--primary);
  padding: 16px 24px;
  cursor: pointer;
  border: none;
  align-self: flex-end;
  margin-bottom: 10px;
  transition: color 0.16s;
  z-index: 1300;
}
.mobile-menu-close:hover,
.mobile-menu-close:focus {
  color: var(--secondary);
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 22px;
  width: 100%;
  padding: 12px 32px;
}
.mobile-nav a {
  font-size: 1.25rem;
  font-family: 'Montserrat', Arial, sans-serif;
  color: var(--primary);
  font-weight: 800;
  padding: 14px 0;
  border-bottom: 1px solid var(--gray);
  transition: color 0.19s;
}
.mobile-nav a:hover,
.mobile-nav a:focus {
  color: var(--secondary);
}

/* Hide main nav & show burger on mobile */
@media (max-width: 1020px) {
  .main-nav {
    display: none;
  }
  .cta-btn {
    display: none;
  }
  .mobile-menu-toggle {
    display: block;
  }
}

/* ==========================================================================
   FOOTER STYLES
   ========================================================================== */
footer {
  background: var(--primary);
  color: var(--white);
  padding-top: 48px; padding-bottom: 48px;
}
footer .container {
  flex-direction: row;
  gap: 40px;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
}
.footer-logo img {
  width: 64px;
  height: auto;
  margin-bottom: 10px;
}
footer nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
footer nav a {
  color: var(--secondary);
  font-family: 'Montserrat', Arial, sans-serif;
  letter-spacing: 0.01em;
  font-weight: 600;
  font-size: 1rem;
  transition: color 0.19s;
}
footer nav a:hover,
footer nav a:focus {
  color: var(--white);
}
.footer-contact {
  font-size: 1rem;
  margin-top: 10px;
}
.footer-contact p {
  color: var(--accent);
  font-size: 1rem;
}

@media (max-width: 900px) {
  footer .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 28px;
  }
}

/* ==========================================================================
   HERO AREA / FEATURED CONTENT
   ========================================================================== */
.content-wrapper > h1,
.content-wrapper .hero-sub,
.content-wrapper > a.cta-btn {
  align-self: flex-start;
  margin-bottom: 10px;
}
@media (max-width: 768px) {
  .content-wrapper > h1,
  .content-wrapper > h2,
  .content-wrapper > .hero-sub,
  .content-wrapper > a.cta-btn {
    align-self: stretch;
  }
}

/* ==========================================================================
   FLEX LAYOUTS & UTILITIES
   ========================================================================== */
.card-container, .features-grid, .feature-grid, .testimonial-slider, .testimonial-list,
.team-list, .job-list, .service-grid, .card-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  margin-bottom: 20px;
  position: relative;
  background: var(--white);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 32px 24px;
  transition: box-shadow 0.18s, transform 0.18s;
}
.card:hover, .card:focus {
  box-shadow: 0 8px 32px rgba(31,54,89,0.16);
  transform: translateY(-2px) scale(1.02);
}
.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;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  padding: 20px;
  background: var(--accent);
  border-radius: 15px;
  box-shadow: var(--shadow);
  min-width: 260px;
  max-width: 420px;
  margin-bottom: 24px;
  font-size: 1.08rem;
  font-weight: 500;
  color: var(--primary);
  transition: box-shadow 0.16s, transform 0.18s;
}
.testimonial-card span {
  color: var(--secondary);
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: .99em;
}
.testimonial-card:hover, .testimonial-card:focus {
  box-shadow: 0 5px 24px rgba(31,54,89, 0.16);
  transform: translateY(-2px) scale(1.03);
}
.feature-item, .service-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
  padding: 22px;
  margin-bottom: 16px;
  background: var(--white);
  border-radius: 13px;
  box-shadow: var(--shadow);
  min-width: 220px;
  max-width: 350px;
  transition: box-shadow 0.14s, transform 0.15s;
}
.feature-item:hover, .service-item:hover {
  box-shadow: 0 6px 22px rgba(31,54,89,0.15);
  transform: translateY(-1.5px) scale(1.02);
}
.usp-icons {
  display: flex;
  gap: 20px;
  margin: 20px 0;
}
/* Other grids */
.team-list, .job-list {
  gap: 28px;
  flex-wrap: wrap;
}
.team-member, .job-item {
  background: var(--accent);
  border-radius: 13px;
  box-shadow: var(--shadow);
  padding: 18px 18px 14px 18px;
  margin-bottom: 20px;
  min-width: 210px;
  max-width: 320px;
  font-weight: 500;
  transition: box-shadow 0.17s, transform 0.17s;
}
.team-member:hover, .job-item:hover {
  box-shadow: 0 7px 24px rgba(31,54,89,0.13);
  transform: translateY(-2px) scale(1.025);
}
.contact-teaser {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  background: var(--accent);
  border-radius: 13px;
  padding: 22px 28px;
  margin-top: 18px;
  box-shadow: var(--shadow);
}
.review-summary {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  margin-top: 20px;
  margin-bottom: 0;
}
.trust-elements {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 24px 0 0 0;
  font-size: 1rem;
  color: var(--primary);
}

/* ==========================================================================
   FORMATS: FEATURE, SERVICE, TESTIMONIAL, ETC.
   ========================================================================== */
.feature-grid, .features-grid, .service-grid {
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 26px;
}
.feature-item img, .service-item img {
  width: 40px;
  height: 40px;
  margin-bottom: 6px;
}
.feature-item h3, .service-item h3 {
  margin-bottom: 8px;
}

/* Card grid & list helpers */
.card-grid, .testimonial-slider, .testimonial-list, .team-list {
  flex-wrap: wrap;
  gap: 24px;
}
.card-grid .card, .testimonial-slider .testimonial-card, .testimonial-list .testimonial-card {
  flex: 1 1 300px;
  min-width: 250px;
  max-width: 430px;
}

/* Reference page (Erfolgsgeschichten) */
.testimonial-list {
  margin-top: 20px;
  margin-bottom: 24px;
}
.testimonial-list .testimonial-card {
  background: var(--white);
  color: var(--primary);
  border-left: 8px solid var(--secondary);
}

/* About page, Karriere (Team, jobs) */
.team-list, .job-list {
  margin-top: 16px;
  margin-bottom: 14px;
}

/* Embed map area */
.map-embed {
  background: var(--accent);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 18px;
  margin-top: 10px;
  margin-bottom: 12px;
}

/* ==========================================================================
   CONTACT & PRIVACY
   ========================================================================== */
.contact-details {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 16px;
  padding: 20px 28px;
  background: var(--accent);
  border-radius: 12px;
  font-size: 1.1rem;
  box-shadow: var(--shadow);
}
.privacy-note {
  padding: 16px;
  background: var(--gray);
  border-radius: 9px;
  color: var(--dark);
  font-size: .97rem;
  margin-top: 10px;
}
.privacy-note a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: underline;
}

/* =====================================================================
   COOKIE CONSENT BANNER & MODAL
   ===================================================================== */
#cookie-banner, .cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  width: 100vw;
  box-sizing: border-box;
  background: var(--primary);
  color: var(--white);
  padding: 22px 32px;
  z-index: 1600;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 -6px 32px rgba(31,54,89,0.12);
  transition: transform 0.29s;
  gap: 32px;
}
.cookie-banner__text {
  font-size: 1rem;
  max-width: 600px;
  line-height: 1.5;
  color: var(--white);
}
.cookie-banner__actions {
  display: flex;
  gap: 16px;
  flex-shrink: 0;
}
.cookie-btn, .cookie-settings-btn {
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 1rem;
  font-weight: 800;
  border-radius: 28px;
  padding: 10px 26px;
  background: var(--secondary);
  color: var(--primary);
  border: none;
  box-shadow: 0 2px 8px rgba(31,54,89,0.09);
  margin-right: 6px;
  transition: background 0.18s, color 0.18s, box-shadow 0.17s;
}
.cookie-btn.accept {
  background: var(--success);
  color: var(--white);
}
.cookie-btn.reject {
  background: var(--danger);
  color: var(--white);
}
.cookie-btn:hover, .cookie-btn:focus, .cookie-settings-btn:hover, .cookie-settings-btn:focus {
  background: var(--focus);
  color: var(--white);
}
.cookie-btn:last-child {
  margin-right: 0;
}

/* Cookie Modal Overlay */
#cookie-modal, .cookie-modal {
  position: fixed;
  left: 0; top: 0; width: 100vw; height: 100vh;
  background: rgba(31,54,89, 0.54);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1700;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s;
}
#cookie-modal.open, .cookie-modal.open {
  opacity: 1;
  pointer-events: all;
}
.cookie-modal__content {
  background: var(--white);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 32px;
  min-width: 340px;
  max-width: 95vw;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.cookie-modal__header {
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
}
.cookie-modal__categories {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.cookie-modal__category {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  font-size: 1.1rem;
}
.cookie-modal__category label {
  font-weight: 600;
}
.cookie-modal__category input[type="checkbox"] {
  accent-color: var(--secondary);
  width: 18px;
  height: 18px;
  margin-right: 0.4em;
}
.cookie-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 16px;
  justify-content: flex-end;
}
.cookie-modal__close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--danger);
  cursor: pointer;
  position: absolute;
  top: 18px; right: 32px;
}
@media (max-width: 600px) {
  #cookie-banner, .cookie-banner {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 20px 10px;
  }
  .cookie-banner__actions {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }
  .cookie-modal__content {
    padding: 22px 10px;
    min-width: unset;
    width: 98vw;
    border-radius: 12px;
  }
  .cookie-modal__close {
    right: 12px; top: 10px;
  }
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 1200px) {
  .container { max-width: 970px; }
}
@media (max-width: 970px) {
  .container { max-width: 700px; padding-left: 10px; padding-right: 10px; }
  .feature-item, .service-item { min-width: unset; max-width: 100%; }
}
@media (max-width: 808px) {
  h1 { font-size: 2.1rem; }
  h2 { font-size: 1.2rem; }
  .section { padding: 32px 10px; }
  .card, .feature-item, .service-item, .testimonial-card { padding: 18px 10px; }
  .footer-logo img { width: 52px; }
}
@media (max-width: 768px) {
  .container { max-width: 98vw; padding: 0 5px; }
  .card-container, .features-grid, .feature-grid, .testimonial-slider,
  .testimonial-list, .team-list, .job-list, .service-grid, .card-grid {
    flex-direction: column;
    gap: 20px;
  }
  .content-grid, .text-image-section {
    flex-direction: column;
    gap: 18px;
  }
  footer .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 22px;
  }
}
@media (max-width: 600px) {
  .section { padding: 18px 2vw; }
  h1 { font-size: 1.4rem; }
  h2 { font-size: 1.08rem; }
  .footer-logo img { width: 40px; }
  .feature-item, .service-item, .testimonial-card, .card { border-radius: 7px; }
}

/* ==========================================================================
   MICRO-INTERACTIONS & ANIMATION
   ========================================================================== */
a, .cta-btn, .cookie-btn, .cookie-settings-btn, button {
  transition: background 0.16s, color 0.16s, box-shadow 0.14s, transform 0.15s, border 0.16s;
}
.card, .feature-item, .service-item, .testimonial-card, .team-member, .job-item {
  transition: box-shadow 0.21s, transform 0.20s;
}
.cta-btn:active, .cookie-btn:active, .cookie-settings-btn:active {
  transform: scale(.98) translateY(1px);
}

/* ==========================================================================
   LAYOUT SPACING & FLEX REQUIREMENTS (CRITICAL)
   ========================================================================== */
.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; }

/* Gap/margin override for all component containers */
.card-container > *, .features-grid > *, .feature-grid > *, .testimonial-slider > *,
.testimonial-list > *, .team-list > *, .job-list > *, .service-grid > *, .card-grid > * {
  margin-bottom: 0;
}

.section > .container, .container > .content-wrapper {
  margin-bottom: 0; /* prevent duplicate spacing */
}

/* Ensure NO overlapping & adequate spaces: */
.card, .feature-item, .service-item, .testimonial-card, .team-member, .job-item, .contact-teaser {
  margin-bottom: 20px;
}

/* ==========================================================================
   OVERRIDES FOR INTERMEDIATE FLEX SPACING
   ========================================================================== */
.content-wrapper > *:not(:last-child) {
  margin-bottom: 18px;
}
.card-container, .features-grid, .feature-grid, .testimonial-slider,
.testimonial-list, .team-list, .job-list, .service-grid, .card-grid {
  margin-bottom: 0;
}

/* ==========================================================================
   MISC: THANK-YOU, CONFIRMATION, ETC.
   ========================================================================== */
.confirmation {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: var(--accent);
  border-radius: 15px;
  padding: 32px 20px;
  box-shadow: var(--shadow);
  margin-top: 20px;
}
.confirmation h2 { color: var(--primary); margin-bottom: 12px; }
.confirmation a.cta-btn { margin-top: 18px; }

/* ==========================================================================
   PRINT MEDIA (optional)
   ========================================================================== */
@media print {
  header, footer, .mobile-menu, .cookie-banner, #cookie-banner { display: none !important; }
  body { color: #000 !important; background: #fff !important; }
}
