/* ==== CSS RESET & NORMALIZE ==== */
html {box-sizing: border-box;}
*, *:before, *:after {box-sizing: inherit; margin: 0; padding: 0;}
body, h1, h2, h3, h4, h5, h6, p, ul, ol, li, figure, figcaption, blockquote, dl, dd {margin: 0; padding: 0;}
ul, ol {list-style: none;}
a {text-decoration: none; color: inherit;}
img, svg {display: block; max-width: 100%; height: auto; border: 0;}
button, input, textarea {font: inherit; color: inherit; background: none; border: none; outline: none;}

/* ==== BRAND VARIABLES (fallbacks included) ==== */
:root {
  --color-primary: #1D2541;
  --color-secondary: #1982A9;
  --color-accent: #F8F9FB;
  --color-bright: #fff;
  --color-dark: #13192B;
  --color-shadow: rgba(16,20,41,0.08);
  --color-hover: #263575;
  --color-attention: #FFB300;
  --color-border: #DEE2ED;
  --brand-font-display: 'Montserrat', Arial, Helvetica, sans-serif;
  --brand-font-body: 'Open Sans', Arial, Helvetica, sans-serif;
}

/* ==== HTML & BODY ==== */
html {
  font-size: 100%;
  background: var(--color-accent);
  color: var(--color-primary);
  scroll-behavior: smooth;
}
body {
  font-family: var(--brand-font-body);
  background: var(--color-accent);
  color: var(--color-primary);
  min-height: 100vh;
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: 0.03em;
}

/* ==== CONTAINER ==== */
.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* ==== TYPOGRAPHY ==== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--brand-font-display);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--color-primary);
}
h1 { font-size: 2.5rem; margin-bottom: 24px; }
h2 { font-size: 2rem; margin-bottom: 18px; }
h3 { font-size: 1.4rem; margin-bottom: 12px; }
h4 { font-size: 1.15rem; }

@media (min-width: 700px) {
  h1 { font-size: 3.5rem; }
  h2 { font-size: 2.5rem; }
  h3 { font-size: 1.7rem; }
}
p, li, ul, ol {
  font-size: 1rem;
  color: var(--color-primary);
  margin-bottom: 12px;
  line-height: 1.7;
}
strong, b {font-weight: 700; color: var(--color-secondary);}
.text-section h3 {margin-top: 16px;}

/* ==== GEOMETRIC SHAPE DECORATIONS ==== */
section, .feature-card, .testimonial-card, .card, .topic-card {
  border-radius: 18px;
}

/* ==== LAYOUT: FLEX (NO GRID, NO COLUMNS!) ==== */
.content-wrapper,
.footer-nav,
.footer-contact,
.feature-grid,
.topic-grid,
.featured-articles ul,
.faq-snippets ul {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: var(--color-accent);
  border-radius: 20px;
}

/* ==== HEADER ==== */
header {
  background: var(--color-bright);
  box-shadow: 0 6px 30px var(--color-shadow);
  border-bottom: 3px solid var(--color-secondary);
}
header .container {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 84px;
  gap: 15px;
  padding-top: 8px; padding-bottom: 8px;
}
.logo img {
  height: 50px;
  width: auto;
}
.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}
.main-nav a {
  font-family: var(--brand-font-display);
  font-weight: 700;
  font-size: 1.05rem;
  padding: 4px 8px;
  border-radius: 6px;
  color: var(--color-primary);
  transition: background .2s, color .2s;
}
.main-nav a:hover, .main-nav a:focus {
  background: var(--color-secondary);
  color: #fff;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--brand-font-display);
  font-weight: 800;
  letter-spacing: 0.04em;
  font-size: 1.08rem;
  min-width: 44px;
  min-height: 44px;
  border-radius: 12px;
  padding: 0 32px;
  background: var(--color-secondary);
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 3px 16px var(--color-shadow);
  transition: background .18s, box-shadow .18s, color .18s, transform .18s;
}
.cta-button.primary {
  background: var(--color-primary);
  color: #fff;
}
.cta-button.primary:hover, .cta-button.primary:focus {
  background: var(--color-secondary);
  color: #fff;
  transform: translateY(-2px) scale(1.045);
  box-shadow: 0 10px 40px var(--color-shadow);
}
.cta-button:hover, .cta-button:focus {
  background: var(--color-hover);
  color: #fff;
  transform: translateY(-1px) scale(1.01);
}

/* ==== MOBILE MENU ==== */
.mobile-menu-toggle {
  display: inline-flex;
  font-size: 2.1rem;
  color: var(--color-primary);
  background: var(--color-accent);
  border-radius: 8px;
  border: none;
  min-width: 44px;
  min-height: 44px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
  transition: background .18s, color .18s;
  z-index: 205;
}
.mobile-menu-toggle:focus, .mobile-menu-toggle:hover {
  background: var(--color-secondary);
  color: #fff;
}

.mobile-menu {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--color-primary);
  color: #fff;
  padding: 0 0 0 0;
  transform: translateX(-100vw);
  transition: transform .38s cubic-bezier(.7,0,.3,1);
  z-index: 200;
  pointer-events: none;
  opacity: 0;
}
.mobile-menu.open {
  transform: translateX(0);
  pointer-events: auto;
  opacity: 1;
}
.mobile-menu-close {
  background: none;
  color: #fff;
  font-size: 2rem;
  border: none;
  align-self: flex-end;
  margin: 32px 22px 16px 0;
  cursor: pointer;
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  width: 100vw;
  gap: 18px;
  padding: 0 36px 0 36px;
}
.mobile-nav a {
  font-family: var(--brand-font-display);
  font-weight: 700;
  font-size: 1.30rem;
  color: #fff;
  margin: 0;
  padding: 20px 8px 10px 8px;
  border-radius: 10px;
  transition: background .14s, color .14s;
}
.mobile-nav a:hover, .mobile-nav a:focus {
  background: var(--color-secondary);
  color: #fff;
}

@media (max-width: 1023px) {
  .main-nav, .cta-button.primary {
    display: none !important;
  }
  .mobile-menu-toggle {
    display: flex;
  }
}
@media (min-width: 1024px) {
  .mobile-menu, .mobile-menu-toggle {
    display: none !important;
  }
  .main-nav, .cta-button.primary {
    display: flex;
  }
}

/* ==== MAIN: SECTIONS ==== */
section {
  margin-bottom: 60px;
  padding: 40px 0 36px 0;
  background: var(--color-accent);
  border-radius: 21px;
  box-shadow: 0 1px 12px var(--color-shadow);
}

@media (max-width: 768px) {
  section { padding: 32px 0 28px 0; margin-bottom: 40px; }
  .container { padding-left: 12px; padding-right: 12px; }
}

.text-section {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 0;
}

/* ==== FEATURE CARDS & GRIDS ==== */
.feature-grid, .topic-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 18px;
}
.feature-card, .topic-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 12px var(--color-shadow);
  padding: 36px 24px 24px 24px;
  flex: 1 1 320px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 240px;
  min-height: 220px;
  gap: 12px;
  margin-bottom: 20px;
  border: 2px solid var(--color-border);
  transition: border-color .25s, box-shadow .25s, transform .22s;
}
.feature-card img { height: 42px; margin-bottom: 6px; }
.feature-card h3, .topic-card h3 { color: var(--color-secondary); }
.feature-card:hover, .topic-card:hover {
  border-color: var(--color-secondary);
  box-shadow: 0 8px 32px var(--color-shadow), 0 1.5px 0 var(--color-secondary);
  transform: translateY(-3px) scale(1.025);
}

@media (max-width: 1023px) {
  .feature-grid, .topic-grid { flex-direction: column; gap: 20px; }
}

/* ==== TOPIC CARDS IN WISSENSPORTAL ==== */
.topic-card {
  background: #fff;
  border: 2px solid var(--color-border);
  border-radius: 16px;
  box-shadow: 0 3px 16px var(--color-shadow);
  padding: 30px 18px 22px 18px;
  min-height: 160px;
}

/* ==== CARDS GENERIC ==== */
.card-container {
  display: flex; flex-wrap: wrap; gap: 24px;
}
.card {
  margin-bottom: 20px;
  position: relative;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 3px 12px var(--color-shadow);
  padding: 30px 20px;
}
.card-content { display: flex; flex-direction: column; justify-content: center; }

/* ==== CONTENT GRID (example usage) ==== */
.content-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
  margin-bottom: 30px;
}

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

/* ==== BUTTONS ==== */
button, .cta-button {
  outline: none;
  border: none;
  cursor: pointer;
}

/* ==== TESTIMONIALS ==== */
.testimonial-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  padding: 28px 32px 20px 32px;
  margin-bottom: 24px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 3px 22px var(--color-shadow);
  border-left: 6px solid var(--color-secondary);
  color: var(--color-primary);
  transition: box-shadow .18s, border-color .18s;
}
.testimonial-card p {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 0;
  font-family: var(--brand-font-display);
}
.testimonial-card span {
  font-size: 1rem;
  color: var(--color-dark);
  opacity: 0.8;
  margin-left: 2px;
  margin-bottom: 3px;
  font-weight: 600;
  font-family: var(--brand-font-body);
}
.testimonial-card:hover { box-shadow: 0 8px 32px var(--color-shadow), 0 1.5px 0 var(--color-secondary); border-color: var(--color-primary); }

/* === LISTS === */
ul, ol {
  padding-left: 22px;
  margin-bottom: 10px;
}
ul li, ol li {
  margin-bottom: 10px;
  position: relative;
  padding-left: 0;
}
ul li:before {
  content: '';
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--color-secondary);
  margin-right: 13px; vertical-align: middle;
  position: relative; top: -1.5px;
}
ol li:before { content: none; }
.text-section ul {
  padding-left: 18px;
  gap: 0;
}

/* === SEARCH BAR (in Wissensportal) === */
.search-bar {
  display: flex;
  align-items: center;
  margin-top: 16px;
  gap: 12px;
}
.search-bar input[type="text"] {
  flex: 1 1 200px;
  border: 2px solid var(--color-border);
  border-radius: 8px;
  padding: 13px 16px;
  font-size: 1rem;
  background: #fff;
  color: var(--color-primary);
  transition: border-color .15s;
}
.search-bar input[type="text"]:focus { border-color: var(--color-secondary); }
.search-bar .cta-button { min-width: 100px; padding: 0 20px; border-radius: 8px; }

/* ==== FEATURED ARTICLES & FAQ SNIPPETS (Wissensportal) ==== */
.featured-articles, .faq-snippets {
  background: #f4f7fa;
  border-radius: 12px;
  padding: 28px 24px 16px 24px;
  margin-top: 18px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px var(--color-shadow);
}
.featured-articles ul,
.faq-snippets ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.featured-articles a {
  color: var(--color-secondary);
  font-weight: 700;
  transition: color .14s;
}
.featured-articles a:hover, .featured-articles a:focus {
  color: var(--color-primary);
  text-decoration: underline;
}

/* ==== CTA SPECIAL SECTION ==== */
.text-section .cta-button {margin-top: 24px;}

/* ==== FOOTER ==== */
footer {
  background: var(--color-primary);
  color: #fff;
  padding: 42px 0 24px 0;
  font-size: 1rem;
  box-shadow: 0 -3px 24px var(--color-shadow);
  margin-top: 48px;
}
footer .container {
  display: flex; flex-direction: column; gap: 28px;
}
.footer-nav {
  display: flex; flex-wrap: wrap; gap: 20px; justify-content: center;
  margin-bottom: 18px;
}
.footer-nav a {
  color: var(--color-secondary);
  font-family: var(--brand-font-display);
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: color .14s;
}
.footer-nav a:hover, .footer-nav a:focus { color: var(--color-attention);}
.footer-contact {
  display: flex; flex-wrap: wrap; gap: 24px; justify-content: center;
  align-items: center;
}
.footer-contact span {
  display: flex; align-items: center;
  gap: 8px;
  font-size: 1rem;
  opacity: .93;
}
.footer-contact img {
  display: inline;
  width: 22px; height: 22px;
}

/* ==== FEATURE ITEM (for future extension) ==== */
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}

/* ==== OPENING HOURS (Kontaktseite) ==== */
.opening-hours {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  font-weight: 600;
  font-size: 1rem;
}
.opening-hours img { width: 20px; height: 20px; }

/* ==== RESPONSIVE ==== */
@media (max-width: 900px) {
  .footer-contact, .footer-nav {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }
  .testimonials {
    flex-direction: column;
  }
}
@media (max-width: 768px) {
  h1 {font-size: 2.1rem;}
  h2 {font-size: 1.4rem;}
  .footer-contact, .footer-nav { align-items: flex-start; gap: 10px; }
  .container {padding-left: 8px; padding-right: 8px;}
  .testimonial-card {padding: 18px 12px 12px 12px;}
}
@media (max-width: 500px) {
  .cta-button, .search-bar .cta-button { padding: 0 12px; font-size: .97rem; }
  .feature-card, .topic-card { padding: 18px 8px; }
}

/* ==== TRANSITIONS & SHADOWS ==== */
.card, .feature-card, .topic-card, .testimonial-card, .search-bar input[type="text"] {
  transition: box-shadow 0.18s, border 0.18s, transform 0.18s;
}

/* ==== FOCUS VISIBLE ==== */
a:focus,
button:focus,
.cta-button:focus,
input:focus {
  outline: 2.5px solid var(--color-attention);
  outline-offset: 1.5px;
}

/* ==== COOKIE CONSENT BANNER ==== */
.cookie-consent-banner {
  position: fixed;
  bottom: 0; left: 0; width: 100vw;
  background: var(--color-bright);
  color: var(--color-primary);
  box-shadow: 0 -2px 16px var(--color-shadow);
  z-index: 9999;
  padding: 24px 16px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  border-radius: 25px 25px 0 0;
  opacity: 1;
  transform: translateY(0);
  transition: opacity .36s, transform .36s;
}
.cookie-consent-banner.hide {
  opacity: 0;
  transform: translateY(120%);
  pointer-events: none;
}
.cookie-consent-banner .cookie-actions {
  display: flex; flex-wrap: wrap; gap: 16px; margin-top: 10px;
  align-items: center;
  justify-content: center;
  width: 100%;
}
.cookie-consent-banner .cookie-btn {
  font-family: var(--brand-font-display);
  font-weight: 700;
  padding: 10px 24px;
  font-size: 1rem;
  border-radius: 9px;
  border: none;
  cursor: pointer;
  margin-bottom: 4px;
  transition: background .16s, color .16s, box-shadow .15s;
  box-shadow: 0 2px 10px var(--color-shadow);
}
.cookie-consent-banner .cookie-btn.accept {
  background: var(--color-secondary);
  color: #fff;
}
.cookie-consent-banner .cookie-btn.reject {
  background: #fff;
  color: var(--color-secondary);
  border: 2px solid var(--color-secondary);
}
.cookie-consent-banner .cookie-btn.settings {
  background: var(--color-primary);
  color: #fff;
}
.cookie-consent-banner .cookie-btn:hover, .cookie-consent-banner .cookie-btn:focus {
  box-shadow: 0 6px 24px var(--color-shadow);
  filter: brightness(1.12);
}

/* ==== COOKIE MODAL ==== */
.cookie-modal-overlay {
  position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
  z-index: 10001;
  background: rgba(29, 37, 65, 0.55);
  display: flex; align-items: center; justify-content: center;
  opacity: 1;
  pointer-events: auto;
  transition: opacity .26s;
}
.cookie-modal-overlay.hide { opacity: 0; pointer-events: none; }
.cookie-modal {
  background: #fff;
  border-radius: 18px;
  max-width: 420px;
  min-width: 320px;
  padding: 36px 32px 28px 32px;
  box-shadow: 0 7px 40px rgba(29,37,65,0.23);
  text-align: left;
  color: var(--color-primary);
  z-index: 10002;
  display: flex;
  flex-direction: column;
  gap: 22px;
  opacity: 1;
}
.cookie-modal h2 {
  font-size: 1.35rem;
  margin-bottom: 10px;
  font-family: var(--brand-font-display);
}
.cookie-category {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 15px;
}
.cookie-category label {
  font-family: var(--brand-font-body); font-size: 1.05rem;
  color: var(--color-primary);
  flex: 1;
}
.cookie-toggle {
  width: 36px; height: 20px;
  border-radius: 12px;
  background: var(--color-border);
  position: relative;
  cursor: pointer;
}
.cookie-toggle input[type="checkbox"] { display: none; }
.cookie-toggle .toggle-slider {
  position: absolute;
  left: 2px; top: 2px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--color-secondary);
  transition: left .16s, box-shadow .14s, background .17s;
}
.cookie-toggle input[type="checkbox"]:checked + .toggle-slider {
  left: 18px;
  background: var(--color-primary);
}
.cookie-modal .modal-actions {
  display: flex;
  gap: 16px;
  justify-content: flex-end;
}
.cookie-modal .cookie-btn { min-width: 90px; }

@media (max-width: 599px) {
  .cookie-modal {max-width: 97vw; padding: 19px 6vw 18px 6vw;}
}

/* ==== ANIMATIONS ==== */
@keyframes slideInUp {
  from { opacity: 0; transform: translateY(120%); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.cookie-consent-banner { animation: slideInUp .38s cubic-bezier(.73,0,.27,1); }
.cookie-modal { animation: fadeIn .4s cubic-bezier(.73,0,.27,1); }

/* ==== MISC ==== */
::-webkit-input-placeholder { color: #9CB2C7; }
:-moz-placeholder { color: #9CB2C7; }
::-moz-placeholder { color: #9CB2C7; }
:-ms-input-placeholder { color: #9CB2C7; }
::placeholder { color: #9CB2C7; }

/* ==== PRINT SUPPORT ==== */
@media print {
  header, footer, .mobile-menu, .cookie-consent-banner, .cookie-modal-overlay { display: none !important; }
  main { margin: 0; padding: 0; }
}
