/* =====================
   CSS RESET & BASE SETUP
   ===================== */
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 {
  scroll-behavior: smooth;
}
body {
  min-height: 100vh;
  background: #F8F5F2;
  color: #2B2A28;
  font-family: 'Roboto', 'Georgia', serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, svg {
  max-width: 100%;
  height: auto;
  display: block;
  vertical-align: middle;
}
input, button, textarea, select {
  font-family: inherit;
  font-size: 1rem;
  color: inherit;
  background: transparent;
  border: none;
  outline: none;
}
a {
  color: #204060;
  text-decoration: none;
  position: relative;
  transition: color 0.2s;
}
a:hover, a:focus {
  color: #86A293;
  text-decoration: underline;
}
:focus {
  outline: 2px solid #204060;
  outline-offset: 2px;
}
ul, ol {
  padding-left: 1.5em;
}

/* ============================
   VARIABLE FONT & TYPE HIERARCHY
   ============================ */

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', 'Georgia', serif;
  color: #204060;
  margin-bottom: 16px;
  font-weight: 700;
  line-height: 1.2;
}
h1 { font-size: 2.67rem; margin-bottom: 24px; }
h2 { font-size: 2rem; margin-bottom: 20px; }
h3 { font-size: 1.5rem; margin-bottom: 12px; }
h4 { font-size: 1.15rem; }
h5, h6 { font-size: 1rem; }
strong, b { font-weight: 700; }
p, ul, ol { margin-bottom: 16px; }
.text-section {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

/* ==== BRAND COLOR PALETTE ==== */
:root {
  --primary: #204060;
  --secondary: #86A293;
  --accent: #F8F5F2;
  --black: #222;
  --white: #fff;
  --border: #dedede;
  --shadow: 0 4px 14px rgba(32, 64, 96, 0.06);
  --muted: #E4E1DD;
  --danger: #B64444;
  --neutral: #b7bab5;
}

/* =================
   HEADER & MAIN NAV
   ================= */
header {
  background: var(--accent);
  border-bottom: 1px solid var(--muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: relative;
  min-height: 64px;
  z-index: 1001;
}
header > a img {
  display: block;
  height: 44px;
  width: auto;
}
header nav {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 20px;
}
header nav a {
  font-family: 'Montserrat', Georgia, serif;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--primary);
  background: none;
  padding: 8px 10px;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}
header nav a:hover, header nav a:focus {
  background: var(--secondary);
  color: var(--accent);
}
.cta-button {
  background: var(--primary);
  color: var(--accent);
  font-family: 'Montserrat', serif;
  font-size: 1rem;
  border-radius: 8px;
  padding: 10px 28px;
  margin-left: 18px;
  font-weight: 700;
  border: none;
  box-shadow: 0 2px 8px rgba(32, 64, 96, 0.09);
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.12s;
  outline: none;
  display: inline-block;
}
.cta-button:hover, .cta-button:focus {
  background: var(--secondary);
  color: var(--white);
  box-shadow: 0 4px 18px rgba(32,64,96,0.13);
  transform: translateY(-2px) scale(1.03);
}

/* Hides main nav on mobile */
@media (max-width: 950px) {
  header nav {
    display: none;
  }
  .cta-button {
    margin-left: 0;
  }
}

/* ===============
   MOBILE MAIN MENU
   =============== */
.mobile-menu {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(32, 64, 96, 0.97);
  transform: translateX(100%);
  transition: transform 0.36s cubic-bezier(.35, .84, .36, 1);
  display: flex;
  flex-direction: column;
  z-index: 2000;
  pointer-events: none;
}
.mobile-menu.open {
  transform: translateX(0);
  pointer-events: auto;
}
.mobile-menu-close {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 2.2rem;
  font-weight: 700;
  align-self: flex-end;
  margin: 32px 28px 8px 0;
  cursor: pointer;
  transition: color 0.17s;
  z-index: 2;
}
.mobile-menu-close:hover, .mobile-menu-close:focus {
  color: var(--secondary);
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 32px 32px 0 28px;
  gap: 24px;
}
.mobile-nav a {
  color: var(--accent);
  background: none;
  font-family: 'Montserrat', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 600;
  padding: 10px 0;
  border-radius: 4px;
  transition: color 0.13s, background 0.13s;
}
.mobile-nav a:focus, .mobile-nav a:hover {
  color: var(--secondary);
  background: rgba(255,255,255,0.10);
}
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--primary);
  font-size: 2rem;
  cursor: pointer;
  margin-left: 16px;
  z-index: 1101;
}
@media (max-width: 950px) {
  .mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    width: 48px;
  }
}
@media (min-width: 951px) {
  .mobile-menu { display: none !important; }
  .mobile-menu-toggle { display: none !important; }
}

/* ========================
   PAGE CONTAINER + LAYOUTS
   ======================== */
.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px;
}
main {
  padding: 0 0 32px 0;
}
.section, section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: none;
  position: relative;
}
.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: flex-start;
}

/* ==========================
   FLEXBOX BASED CARD GRIDS
   ========================== */
.card-container, .card-grid, .feature-grid, .content-grid, .features {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: flex-start;
  align-items: stretch;
}
.card {
  background: var(--white);
  padding: 24px 20px 20px 20px;
  border-radius: 16px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow 0.18s;
}
.card:hover, .card:focus-within {
  box-shadow: 0 6px 28px rgba(32,64,96,0.14);
}
/* Used for feature list (index, leistungen, referenzen) */
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 20px;
}
.feature-grid > div {
  background: var(--white);
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(32,64,96,0.05);
  padding: 22px 16px 18px 16px;
  margin-bottom: 10px;
  flex: 1 1 275px;
  min-width: 240px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid var(--muted);
  transition: box-shadow 0.17s, border 0.14s;
}
.feature-grid > div:hover {
  box-shadow: 0 4px 18px rgba(32,64,96,0.11);
  border-color: var(--secondary);
}
.feature-grid img {
  height: 38px;
  width: 38px;
  margin-bottom: 8px;
}

/* ======= TESTIMONIAL CARD ======= */
.testimonial-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  background: var(--accent);
  border-radius: 14px;
  padding: 20px 32px;
  margin-bottom: 20px;
  box-shadow: 0 2px 14px rgba(32,64,96,0.09);
  border: 1px solid var(--muted);
  color: #222; /* Ensuring dark text */
  font-size: 1.08rem;
  position: relative;
  transition: box-shadow 0.16s, border 0.18s;
}
.testimonial-card:hover {
  box-shadow: 0 4px 30px rgba(32,64,96,0.12);
  border-color: var(--secondary);
}
.testimonial-card p {
  font-style: italic;
  color: #222;
}
.testimonial-card div:last-child {
  font-weight: 500;
  font-family: 'Montserrat', Georgia, serif;
}
.testimonial-card > div:first-of-type {
  color: var(--secondary);
  font-size: 1.4rem;
  letter-spacing: .09em;
  font-family: 'Montserrat', serif;
}

/* ====================
   MAP, DETAILS & MORE
   ==================== */
.map-info {
  background: var(--white);
  border: 1px solid var(--muted);
  border-radius: 10px;
  padding: 16px 18px;
  margin: 16px 0 8px 0;
  font-size: 1.07rem;
  color: #444;
  box-shadow: 0 1px 4px rgba(32,64,96,0.07);
}

.contact-details, .footer-contact {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 6px 0 18px 0;
}
.contact-details li,
.footer-contact span {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  color: #204060;
  line-height: 1.45;
}
.contact-details img, .footer-contact img {
  height: 22px;
  width: 22px;
  opacity: 0.8;
}

/* =================
   FOOTER LAYOUT
   ================= */
footer {
  background: var(--primary);
  color: var(--accent);
  padding: 36px 0 0 0;
  font-size: 1rem;
}
footer .container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}
footer nav {
  display: flex;
  flex-direction: row;
  gap: 26px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
footer nav a {
  color: var(--accent);
  background: none;
  text-decoration: none;
  font-family: 'Montserrat', Georgia, serif;
  font-weight: 500;
  letter-spacing: 0.01em;
  font-size: 1rem;
  border-radius: 4px;
  padding: 4px 6px;
  transition: color 0.19s, background 0.17s;
}
footer nav a:hover, footer nav a:focus {
  color: var(--secondary);
  background: rgba(255,255,255,0.07);
}
footer .footer-contact {
  margin-top: 6px;
  gap: 8px;
  color: var(--accent);
}
footer .footer-contact img {
  filter: brightness(100);
}
footer > .container div:last-child {
  margin-top: 8px;
  font-size: .95rem;
  color: var(--accent);
  opacity: 0.77;
}

/* =================
   SPACING CLASSES
   ================= */
.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; }

/* =====================
   FORMS, LISTS, GENERAL
   ===================== */
input, textarea, select {
  border: 1px solid var(--muted);
  background: var(--white);
  padding: 10px 12px;
  border-radius: 7px;
  margin-bottom: 12px;
  font-size: 1rem;
  transition: border 0.16s;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--secondary);
}

ul, ol {
  margin-bottom: 16px;
  padding-left: 1.5em;
}
ul li, ol li {
  margin-bottom: 8px;
  line-height: 1.6;
}

/* =================
   TABLE CLASSES (if needed)
   ================= */
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 1rem;
  margin-bottom: 24px;
}
th, td {
  border: 1px solid var(--muted);
  padding: 10px 14px;
  text-align: left;
  font-size: .95rem;
}
th {
  background: #eee;
}

/* =================
   ANIMATIONS
   ================= */
@keyframes cookie-banner-slide {
  from { transform: translateY(100%); opacity: 0;}
  to { transform: translateY(0); opacity: 1; }
}
@keyframes modal-appear {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =================
   RESPONSIVE DESIGN
   ================= */
@media (max-width: 950px) {
  header { padding: 0 8px; }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.19rem; }
  .container { padding: 0 10px; }
  .feature-grid > div { min-width: 170px; padding: 14px 8px 12px 8px; }
  footer nav { gap: 14px; }
  .testimonial-card { padding: 19px 16px; }
  .map-info { padding: 10px 8px; font-size: 1rem; }
}
@media (max-width: 768px) {
  .content-wrapper, .container {
    padding-left: 2px;
    padding-right: 2px;
  }
  .section { padding: 34px 4px; margin-bottom: 38px; }
  .feature-grid, .card-grid, .card-container, .content-grid, .features {
    flex-direction: column;
    gap: 18px;
  }
  .text-image-section {
    flex-direction: column;
    align-items: stretch;
    gap: 22px;
  }
}
@media (max-width: 480px) {
  h1 { font-size: 1.26rem; }
  h2 { font-size: 1.04rem; }
  .section { padding: 22px 2px; }
  .testimonial-card { padding: 14px 4px; font-size: .98rem; }
}

/* ===========================
   COOKIE CONSENT BANNER
   =========================== */
.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--accent);
  color: #222;
  font-size: 1rem;
  box-shadow: 0 -2px 24px rgba(32,64,96,0.13);
  border-top: 1px solid var(--muted);
  z-index: 3000;
  padding: 20px 14px 18px 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  animation: cookie-banner-slide 0.64s cubic-bezier(.28,.68,.45,1) 1;
}
.cookie-banner .cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.cookie-banner button {
  padding: 9px 24px;
  border-radius: 7px;
  font-family: 'Montserrat', serif;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  margin-right: 6px;
  background: var(--secondary);
  color: #fff;
  transition: background 0.18s, color 0.18s, box-shadow 0.17s;
  box-shadow: 0 2px 7px rgba(32,64,96,0.06);
}
.cookie-banner button.cookie-accept {
  background: var(--primary);
}
.cookie-banner button.cookie-reject {
  background: var(--danger);
}
.cookie-banner button.cookie-settings {
  background: var(--neutral);
  color: #222;
}
.cookie-banner button:hover, .cookie-banner button:focus {
  background: #204060;
  color: #fff;
  box-shadow: 0 4px 16px rgba(32,64,96,0.15);
}

/* COOKIE MODAL */
.cookie-modal-backdrop {
  position: fixed;
  z-index: 3111;
  left: 0; right: 0; top: 0; bottom: 0;
  background: rgba(32,64,96,0.40);
  display: none;
  animation: fade-in 0.44s;
}
.cookie-modal-backdrop.open {
  display: block;
}
.cookie-modal {
  position: fixed;
  z-index: 3112;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  background: var(--white);
  color: #204060;
  border-radius: 18px;
  box-shadow: 0 12px 42px rgba(32,64,96,0.19);
  padding: 36px 30px 28px 36px;
  min-width: 320px;
  max-width: 98vw;
  max-height: 95vh;
  display: flex;
  flex-direction: column;
  gap: 18px;
  animation: modal-appear 0.43s cubic-bezier(.28,.7,.5,1); 
  display: none;
}
.cookie-modal.open {
  display: flex;
}
.cookie-modal h2 {
  font-size: 1.25rem; color: #204060; margin-bottom: 8px; font-family: 'Montserrat', serif;
}
.cookie-modal .cookie-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cookie-modal label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  cursor: pointer;
}
.cookie-modal input[type="checkbox"] {
  width: 22px; height: 22px;
}
.cookie-modal .cookie-option-essential {
  color: #7b7b7b; font-size: 0.95rem;
}
.cookie-modal .cookie-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 16px;
}
.cookie-modal .cookie-modal-close {
  align-self: flex-end;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #204060;
  cursor: pointer;
  padding: 0;
}
.cookie-modal .cookie-modal-close:hover {
  color: var(--danger);
}
@media(max-width: 600px){
  .cookie-modal {
    min-width: 0; padding: 18px 7px 14px 13px;
  }
}

/* =============
   MISC ELEMENTS
   ============= */
hr {
  border: 0;
  border-top: 1px solid var(--muted);
  margin: 24px 0;
}
code, pre {
  background: #eee;
  color: #204060;
  padding: 3px 5px;
  font-size: .97rem;
  border-radius: 4px;
}

/* ===== ICON BUTTONS ===== */
button {
  transition: background 0.18s, color 0.18s, box-shadow 0.17s, transform 0.13s;
}
button:active {
  transform: scale(0.97);
}

/* =======================
   Z-INDEX
   ======================= */
header, .mobile-menu, .cookie-banner, .cookie-modal, .cookie-modal-backdrop {
  z-index: 3000;
}

/* ======================
   PRINT STYLES (Optional)
   ====================== */
@media print {
  header, footer, .mobile-menu, .cookie-banner, .cookie-modal, .cookie-modal-backdrop {
    display: none !important;
  }
  body { background: #fff !important; }
}
