/* -------------------- CSS RESET & BASE -------------------- */
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;
}
article, aside, details, figcaption, figure,
footer, header, hgroup, main, menu, nav, section {
  display: block;
}
body {
  line-height: 1.5;
  font-family: 'Open Sans', Arial, sans-serif;
  background: #F5F3ED;
  color: #23213C;
  min-height: 100vh;
}
ul, ol {
  list-style: none;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
  border-style: none;
}
a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}
button {
  font-family: inherit;
  background: none;
  border: none;
  cursor: pointer;
}
*, *::before, *::after {
  box-sizing: inherit;
}

/* -------------------- SCANDINAVIAN CLEAN VARIABLES -------------------- */
:root {
  --color-primary: #23213C;
  --color-secondary: #B6AEC5;
  --color-accent: #F5F3ED;
  --color-white: #fff;
  --color-grey: #F2F2F7;
  --color-border: #E0DFE6;
  --color-focus: #948fba;
  --radius: 14px;
  --shadow: 0 2px 24px 0 rgba(35,33,60,0.07);
  --transition: 0.2s cubic-bezier(.4,0,.2,1);
  --header-height: 70px;
}

/* -------------------- TYPOGRAPHY -------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 700;
  color: #23213C;
}
h1 {
  font-size: 2.2rem;
  line-height: 1.15;
  margin-bottom: 18px;
  letter-spacing: -1px;
}
h2 {
  font-size: 1.6rem;
  margin-bottom: 16px;
}
h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}
h4, h5, h6 {
  font-size: 1rem;
}
p, li, ul, ol {
  font-family: 'Open Sans', Arial, sans-serif;
  font-size: 1rem;
  color: #23213C;
  margin-bottom: 10px;
}
.text-section p, .text-section li {
  font-size: 1.08rem;
  margin-bottom: 14px;
}

/* -------------------- CONTAINER & LAYOUT -------------------- */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 18px;
  display: flex;
  flex-direction: column;
  gap: 0px;
}
.content-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0px;
  margin-bottom: 0px;
}
.section {
  margin-bottom: 60px;
  padding: 40px 20px;
}
@media (max-width: 768px) {
  .section {
    margin-bottom: 36px;
    padding: 28px 7px;
  }
  .container {
    padding: 0 7px;
  }
}

/* -------------------- FLEX SPACING PATTERNS (MANDATORY) -------------------- */
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: flex-start;
}
.card {
  margin-bottom: 20px;
  position: relative;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover {
  box-shadow: 0 6px 24px 0 rgba(35,33,60,0.12);
  transform: translateY(-4px) scale(1.01);
}
.content-grid, .features-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: 12px;
  padding: 20px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 24px;
  flex: 1 1 300px;
  min-width: 240px;
  max-width: 500px;
  transition: box-shadow var(--transition), transform var(--transition);
}
.testimonial-card:hover {
  box-shadow: 0 4px 24px 0 rgba(35,33,60,0.13);
  transform: scale(1.012);
}
.testimonial-card p {
  font-size: 1.05rem;
  color: #23213C;
}
.testimonial-card span {
  font-size: 1rem;
  font-style: italic;
  color: #6A6A7A;
  opacity: 0.85;
}
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
  background: #fff;
  border-radius: var(--radius);
  padding: 26px 18px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

/* FEATURES GRID CARDS */
.features-grid > div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: #fff;
  border-radius: var(--radius);
  padding: 28px 18px 24px 18px;
  min-width: 260px;
  flex: 1 0 260px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  transition: box-shadow var(--transition), transform var(--transition);
}
.features-grid > div img {
  width: 44px;
  height: 44px;
  margin-bottom: 8px;
  filter: grayscale(0.2) contrast(1.1);
}
.features-grid > div:hover {
  box-shadow: 0 8px 30px 0 rgba(35,33,60,0.13);
  transform: translateY(-2px) scale(1.012);
}
.features-grid > div h3 {
  font-size: 1.08rem;
  margin-bottom: 6px;
  color: var(--color-primary);
}
.features-grid > div p {
  font-size: 1rem;
  color: #383754;
}

/* Responsive: Flex Grid switches to column on mobile */
@media (max-width: 830px) {
  .content-grid, .features-grid {
    flex-direction: column;
    gap: 18px;
  }
  .features-grid > div, .card {
    min-width: 0;
    width: 100%;
  }
}
@media (max-width: 600px) {
  .testimonial-card, .feature-item {
    min-width: 0;
    width: 100%;
  }
}

.text-image-section {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}
@media (max-width: 768px) {
  .text-image-section {
    flex-direction: column;
    gap: 18px;
    align-items: flex-start;
  }
}

/* -------------------- HEADER & NAVIGATION -------------------- */
header {
  width: 100%;
  background: var(--color-white);
  box-shadow: 0 1px 0 var(--color-border);
  position: relative;
  z-index: 10;
}
header .container {
  min-height: var(--header-height);
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
header a img {
  max-height: 38px;
  width: auto;
}
.main-nav {
  display: flex;
  gap: 22px;
  align-items: center;
}
.main-nav a {
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 1.01rem;
  color: #23213C;
  font-weight: 500;
  padding: 7px 0;
  position: relative;
  border: none;
  background: none;
  transition: color 0.15s, border-color 0.19s;
}
.main-nav a:hover, .main-nav a:focus {
  color: var(--color-secondary);
}
.btn {
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 600;
  letter-spacing: 0.03em;
  font-size: 1rem;
  border: none;
  border-radius: var(--radius);
  padding: 13px 32px;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
  box-shadow: none;
  outline: none;
  text-align: center;
  text-decoration: none;
  display: inline-block;
}
.btn-primary {
  background: var(--color-primary);
  color: var(--color-white);
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--color-secondary);
  color: var(--color-primary);
  box-shadow: 0 2px 14px 0 rgba(35,33,60,0.1);
}
.btn-secondary {
  background: var(--color-secondary);
  color: var(--color-primary);
}
.btn-secondary:hover, .btn-secondary:focus {
  background: var(--color-primary);
  color: var(--color-white);
}

/* Hide mobile nav by default, show menu toggle */
.mobile-menu-toggle {
  display: none;
  background: #fff;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 2rem;
  color: var(--color-primary);
  align-items: center;
  justify-content: center;
  position: absolute;
  right: 22px;
  top: 13px;
  z-index: 22;
  transition: background 0.15s, color 0.16s;
  border: 1px solid var(--color-border);
  box-shadow: 0 2px 10px 0 rgba(35,33,60,0.04);
}
.mobile-menu-toggle:focus, .mobile-menu-toggle:hover {
  background: var(--color-secondary);
  color: var(--color-white);
}
@media (max-width: 1024px) {
  .main-nav {
    display: none;
  }
  .mobile-menu-toggle {
    display: flex;
  }
  header .btn {
    display: none;
  }
}

/* Mobile full-screen nav */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100vw;
  height: 100vh;
  background: var(--color-accent);
  z-index: 200;
  flex-direction: column;
  transform: translateX(100vw);
  transition: transform 0.38s cubic-bezier(.68,-0.55,.27,1.55);
  box-shadow: 0 4px 40px 0 rgba(35,33,60,0.15);
}
.mobile-menu.open {
  display: flex;
  transform: translateX(0);
  animation: menu-slide-in 0.38s cubic-bezier(.68,-0.55,.27,1.55);
}
@keyframes menu-slide-in {
  from { transform: translateX(100vw); }
  to { transform: translateX(0); }
}
.mobile-menu-close {
  background: none;
  border: none;
  color: var(--color-primary);
  font-size: 2.2rem;
  align-self: flex-end;
  margin: 26px 24px 0 0;
  cursor: pointer;
  transition: color 0.16s;
  z-index: 201;
}
.mobile-menu-close:hover, .mobile-menu-close:focus {
  color: var(--color-secondary);
  background: var(--color-grey);
  border-radius: 50%;
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 38px;
  gap: 24px;
}
.mobile-nav a {
  font-size: 1.25rem;
  color: var(--color-primary);
  padding: 16px 0;
  border-radius: 7px;
  width: 88vw;
  text-align: center;
  transition: background 0.13s, color 0.16s;
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 600;
}
.mobile-nav a:hover, .mobile-nav a:focus {
  background: var(--color-secondary);
  color: #fff;
}

/* -------------------- MAIN -------------------- */
main {
  flex: 1 1 auto;
  width: 100%;
}
section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: none;
}
@media (max-width: 600px) {
  section {
    padding: 24px 4px;
    margin-bottom: 32px;
  }
}

.text-section {
  margin-bottom: 26px;
  padding: 0;
}

/* Article Lists */
ul, ol {
  list-style: none;
  margin-bottom: 12px;
}
ul li, ol li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 10px;
}
ul li::before, ol li::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 0.72em;
  width: 7px;
  height: 7px;
  background: var(--color-secondary);
  border-radius: 50%;
  display: inline-block;
}

/* -------------------- FOOTER -------------------- */
footer {
  width: 100%;
  background: var(--color-white);
  border-top: 1px solid var(--color-border);
  margin-top: 64px;
  padding: 32px 0 19px 0;
}
footer .container {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
}
footer nav.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
footer img {
  margin-bottom: 8px;
}
footer p {
  font-size: 1rem;
  color: #6A6A7A;
}
footer .container > div {
  min-width: 200px;
  margin-bottom: 10px;
}
@media (max-width: 900px) {
  footer .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }
}

/* Contact details icons */
footer img[alt="Telefon"], footer img[alt^="E-mail"], footer img[alt^="Adres"] {
  width: 22px;
  vertical-align: middle;
  margin-right: 7px;
  margin-bottom: 0;
}

/* -------------------- RESPONSIVE LAYOUT -------------------- */
@media (max-width: 640px) {
  h1 { font-size: 1.48rem; }
  h2 { font-size: 1.16rem; }
  .features-grid > div, .card, .testimonial-card, .feature-item {
    padding: 16px 11px;
  }
}

/* Section last-child margin fix */
section:last-child {
  margin-bottom: 0;
}

/* -------------------- ANIMATIONS & TRANSITIONS -------------------- */
.btn, .card, .features-grid > div, .testimonial-card, .mobile-nav a {
  transition: box-shadow var(--transition), background var(--transition), color var(--transition), transform var(--transition);
}

/* Minor fade-in effect for the main content */
body {
  animation: bodyfadein 0.7s ease;
}
@keyframes bodyfadein {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* -------------------- ACCESSIBILITY FOCUS STATES -------------------- */
a:focus, button:focus, .btn:focus {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

/* -------------------- COOKIE CONSENT BANNER -------------------- */
.cookie-consent-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  width: 100vw;
  background: var(--color-white);
  color: #23213C;
  box-shadow: 0 -6px 36px 0 rgba(35,33,60,0.09);
  padding: 24px 18px 18px 18px;
  z-index: 900;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  transition: transform 0.27s cubic-bezier(.55,0,.1,1);
  font-size: 0.98rem;
}
.cookie-consent-banner.hide {
  transform: translateY(100%);
}
.cookie-consent-banner .cookie-banner-actions {
  display: flex;
  gap: 16px;
}
.cookie-consent-banner .btn {
  padding: 9px 20px;
  min-width: 108px;
  font-size: 1rem;
  box-shadow: 0 1px 8px 0 rgba(35,33,60,0.05);
}
.cookie-consent-banner .btn-primary {
  background: var(--color-primary);
  color: #fff;
}
.cookie-consent-banner .btn-secondary {
  background: var(--color-secondary);
  color: var(--color-primary);
}
.cookie-consent-banner .btn[aria-pressed="true"],
.cookie-consent-banner .btn:active {
  background: var(--color-accent);
  color: var(--color-primary);
}

/* Cookie settings modal */
.cookie-modal {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%,-50%) scale(1);
  background: #fff;
  border-radius: 17px;
  box-shadow: 0 10px 40px 0 rgba(35,33,60,0.18);
  z-index: 1001;
  min-width: 340px;
  max-width: 99vw;
  padding: 32px 36px 28px 36px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  animation: cookie-modal-in 0.34s cubic-bezier(.68,-0.4,.27,1.45);
}
@keyframes cookie-modal-in {
  from { opacity: 0; transform: translate(-50%,-60%) scale(0.90); }
  to { opacity: 1; transform: translate(-50%,-50%) scale(1); }
}
.cookie-modal-close {
  position: absolute;
  top: 19px; right: 24px;
  font-size: 1.4rem;
  color: #544F97;
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0.9;
  transition: color 0.14s;
}
.cookie-modal-close:hover, .cookie-modal-close:focus {
  color: var(--color-primary);
}
.cookie-modal h3 {
  margin-bottom: 7px;
  font-size: 1.12rem;
}
.cookie-categories {
  display: flex;
  flex-direction: column;
  gap: 13px;
  width: 100%;
}
.cookie-category {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 1rem;
  padding: 7px 0;
}
.cookie-category input[type="checkbox"] {
  accent-color: var(--color-secondary);
  width: 22px;
  height: 22px;
  margin-right: 4px;
}
.cookie-category label {
  font-size: 1rem;
  color: #23213C;
}
.cookie-modal-footer {
  display: flex;
  gap: 20px;
  margin-top: 16px;
}
@media (max-width: 480px) {
  .cookie-modal {
    min-width: 96vw;
    padding: 18px 9px 18px 9px;
  }
}

/* Cookie overlay backdrop */
.cookie-overlay {
  position: fixed;
  left: 0; top: 0; right: 0; bottom:0;
  width: 100vw; height: 100vh;
  background: rgba(35,33,60,0.23);
  z-index: 1000;
  animation: cookiebackdrop 0.19s cubic-bezier(.4,0,.2,1);
}
@keyframes cookiebackdrop {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* -------------------- FORMS, INPUT, BASIC ELEMENTS -------------------- */
input, textarea, select {
  font-family: inherit;
  padding: 9px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-white);
  font-size: 1rem;
  color: var(--color-primary);
  margin-bottom: 14px;
  outline: none;
  box-sizing: border-box;
  transition: border 0.15s;
}
input:focus, select:focus, textarea:focus {
  border: 1.5px solid var(--color-secondary);
}
label {
  display: block;
  font-size: 1rem;
  color: #23213C;
  margin-bottom: 4px;
  font-family: 'Montserrat', Arial, sans-serif;
  font-weight: 500;
}

/* -------------------- BLOG PAGE ARTICLE CARDS -------------------- */
.content-wrapper > div {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 18px;
  margin-bottom: 20px;
}
.content-wrapper > div:last-child {
  margin-bottom: 0;
}
@media (max-width: 640px) {
  .content-wrapper > div {
    padding: 14px 8px;
  }
}

/* -------------------- MAP ICON SECTION (KONTAKT) -------------------- */
.content-wrapper img[alt^="Mapa"] {
  margin: 14px 0 0 0;
  width: 100%;
  max-width: 420px;
  align-self: center;
}

/* -------------------- COLOR SCHEME ENFORCEMENT -------------------- */
body, .content-wrapper, section, main, html {
  background: var(--color-accent);
}

/* Accent background for section if needed (very subtle) */
section.accent-bg, .section.accent-bg {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Emphasize visual hierarchy with strong heading color */
h1, h2, h3, h4 {
  color: var(--color-primary);
}

/* -------------------- Z-INDEX HANDLING -------------------- */
.mobile-menu,
.cookie-consent-banner,
.cookie-overlay,
.cookie-modal {
  z-index: 9999;
}

/* -------------------- MISC & UTILITY -------------------- */
.hide, .hidden { display: none !important; }
.d-flex { display: flex !important; }
.d-block { display: block !important; }

/* -------------------- END -------------------- */
