/* ---------------- CSS RESET & NORMALIZATION --------------------- */
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-family: inherit;
  vertical-align: baseline;
  box-sizing: border-box;
}
html { box-sizing: border-box; font-size: 16px; }
*, *:before, *:after { box-sizing: inherit; }
body {
  line-height: 1.5;
  min-height: 100vh;
  background: #F5F6FA;
  color: #274864;
  font-family: 'Open Sans', Arial, sans-serif;
  font-size: 16px;
  overflow-x: hidden;
}
img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; transition: color 0.2s; }
ul, ol { list-style: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
:focus { outline: 2px solid #F9C846; outline-offset: 2px; }

/* ------------------ BRAND VARIABLES & TYPOGRAPHY ------------------ */
:root {
  --color-primary: #274864;
  --color-secondary: #F5F6FA;
  --color-accent: #F9C846;
  --color-white: #FFF;
  --color-dark: #1a2633;
  --shadow-card: 0 4px 18px -4px rgba(39,72,100,0.10);
  --shadow-card-hover: 0 8px 32px -6px rgba(39,72,100,0.16);
  --radius-md: 14px;
  --radius-sm: 8px;
}

body, .body-font { font-family: 'Open Sans', Arial, sans-serif; font-weight: 400; letter-spacing: 0.01em; }
h1, h2, h3, h4, h5, h6, .display-font {
  font-family: 'Roboto Slab', 'Open Sans', serif;
  font-weight: 700;
  letter-spacing: 0.005em;
}
h1 { font-size: 2.5rem; line-height: 1.2; margin-bottom: 24px; }
h2 { font-size: 2rem; line-height: 1.2; margin-bottom: 20px; }
h3 { font-size: 1.375rem; margin-bottom: 16px; font-weight: 700; }
h4 { font-size: 1.125rem; font-weight: 600; }
p, li { font-size: 1rem; line-height: 1.7; color: var(--color-dark); }
p { margin-bottom: 16px; }
strong, b { font-weight: 700; }

/* ------------ HEADER & PRIMARY NAV ----------------------- */
header { background: var(--color-primary); color: var(--color-white); box-shadow: 0 4px 18px -4px rgba(39,72,100,0.07); }
.container {
  width: 100%;
  max-width: 1250px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
}
header .container {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  height: 88px;
  gap: 18px;
}
header img { height: 44px; }
header nav {
  display: flex;
  gap: 24px;
  align-items: center;
}
header nav a {
  color: var(--color-white);
  font-weight: 600;
  padding: 8px 0;
  font-size: 1rem;
  border-radius: var(--radius-sm);
  transition: background 0.18s, color 0.18s;
}
header nav a:hover:not(.btn-primary), header nav a:focus:not(.btn-primary) {
  background: var(--color-accent);
  color: var(--color-primary);
}
.btn-primary {
  background: var(--color-accent);
  color: var(--color-primary) !important;
  padding: 10px 28px;
  border-radius: var(--radius-md);
  font-family: 'Roboto Slab',serif;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.03em;
  box-shadow: 0 2px 8px rgba(39,72,100,0.06);
  border: none;
  cursor: pointer;
  display: inline-block;
  transition: transform 0.16s, box-shadow 0.2s, background 0.25s;
}
.btn-primary:hover, .btn-primary:focus {
  background: #ffd86a;
  transform: translateY(-2px) scale(1.03);
  box-shadow: var(--shadow-card-hover);
}

/* --------- MOBILE NAVIGATION ---------- */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--color-accent);
  font-size: 2rem;
  cursor: pointer;
  margin-left: 16px;
  transition: color 0.2s;
}
.mobile-menu-toggle:focus, .mobile-menu-toggle:hover {
  color: #ffd557;
}
.mobile-menu {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100vw;
  height: 100vh;
  background: var(--color-primary);
  z-index: 1100;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.77,0,0.175,1);
}
.mobile-menu.active {
  display: flex;
  transform: translateX(0%);
}
.mobile-menu-close {
  margin: 28px 0 14px 20px;
  background: none;
  border: none;
  color: var(--color-accent);
  font-size: 2.2rem;
  align-self: flex-start;
  cursor: pointer;
  z-index: 1200;
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin: 32px 0 0 28px;
}
.mobile-nav a {
  color: var(--color-accent);
  font-size: 1.25rem;
  font-weight: bold;
  padding: 10px 0;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
}
.mobile-nav a:hover, .mobile-nav a:focus {
  background: #ffe7a5;
  color: var(--color-primary);
}
@media (max-width: 1050px) {
  header nav { gap: 12px; }
  .container { padding: 0 10px; }
}
@media (max-width: 900px) {
  header nav { display: none; }
  .mobile-menu-toggle { display: block; }
}

/* --------------- MAIN CONTAINER, SECTIONS, SPACING ------------------- */
main { background: var(--color-secondary); }
section { margin-bottom: 60px; padding: 40px 20px; }
.section { margin-bottom: 60px; padding: 40px 20px; }
.content-wrapper { max-width: 900px; margin: 0 auto; }
.text-section { margin-bottom: 28px; }

.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;
}

.feature-grid, .feature-item {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  align-items: flex-start;
  margin-top: 24px;
}
.feature-grid > div {
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 32px 28px 24px 28px;
  flex: 1 1 260px;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: box-shadow 0.16s, transform 0.14s;
  margin-bottom: 20px;
}
.feature-grid > div:hover, .feature-grid > div:focus-within {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px) scale(1.03);
}
.feature-grid img { height: 48px; margin-bottom: 20px; }

ul, ol { margin-bottom: 16px; margin-left: 22px; }
ul li, ol li {
  margin-bottom: 12px;
  line-height: 1.7;
}
ul li:last-child, ol li:last-child { margin-bottom: 0; }

/* ---------------------- CARD PATTERNS --------------------- */
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 28px;
  margin-bottom: 20px;
  position: relative;
  transition: box-shadow 0.16s, transform 0.12s;
}
.card:hover, .card:focus-within {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px) scale(1.03);
}
.card-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ------------------ NEWS TEASER GRID --------------------- */
.news_teaser_grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 12px;
}
.news_teaser_grid > div {
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  flex: 1 1 280px;
  min-width: 220px;
  padding: 24px 22px 18px 22px;
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
  transition: box-shadow .16s, transform .12s;
}
.news_teaser_grid > div:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-3px) scale(1.025);
}

/* ------------------ TESTIMONIALS ------------------------- */
.testimonial-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: var(--color-white);
  color: var(--color-dark);
  border-left: 6px solid var(--color-accent);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  font-style: italic;
  margin-bottom: 24px;
}
.testimonial-card p {
  margin-bottom: 0!important;
  flex: 1;
  font-size: 1.13rem;
}
.testimonial-card span {
  color: var(--color-primary);
  font-style: normal;
  font-weight: 600;
  font-size: 1rem;
}

/* -------------------- TABLES (Mitgliedschaft) --------------------- */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--color-white);
  margin-bottom: 28px;
  box-shadow: var(--shadow-card);
  border-radius: var(--radius-md);
  overflow: hidden;
}
thead tr {
  background: var(--color-primary);
  color: var(--color-white);
  font-family: 'Roboto Slab', serif;
  font-weight: 800;
  font-size: 1.06rem;
}
th, td {
  padding: 14px 12px;
  text-align: left;
}
tbody tr:nth-child(even) { background: #f8fafd; }
td, th { border-bottom: 1px solid #e0e4ed; }
tbody tr:last-child td { border-bottom: none; }

/* ------------------ FORMS ------------------------- */
form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 12px 0 0 0;
}
input[type="text"], input[type="email"] {
  font-size: 1rem;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid #c4ccd8;
  background: #f7fafd;
  margin-bottom: 6px;
  transition: border-color 0.17s;
}
input[type="text"]:focus, input[type="email"]:focus {
  border-color: var(--color-accent);
}
form button[type="submit"], button[type="submit"].btn-primary {
  margin-top: 8px;
}

/* ----------------- FOOTER ---------------------- */
footer {
  background: var(--color-primary);
  color: var(--color-white);
  padding: 48px 0 40px 0;
  box-shadow: 0 -2px 12px rgba(39,72,100,0.05);
}
footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 40px;
  justify-content: space-between;
}
footer img { height: 42px; }
footer nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
footer nav a {
  color: var(--color-accent);
  font-weight: 600;
  font-size: 1rem;
}
footer nav a:hover, footer nav a:focus {
  color: #ffd557;
}
footer .text-section {
  font-size: .97rem;
  color: #e3edf7;
}
footer a { text-decoration: underline; color: var(--color-accent); }

/* ----------------------------------------------------------------------------
   RESPONSIVENESS & FLEXBOX BREAKPOINTS  
----------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .content-wrapper { max-width: 100%; }
  header .container, footer .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 26px;
    height: auto;
  }
}
@media (max-width: 768px) {
  section, .section { padding: 28px 10px; }
  .feature-grid { flex-direction: column; gap: 24px; }
  .feature-grid > div { min-width: unset; width: 100%; }
  .testimonial-card { flex-direction: column; gap: 12px; }
  .content-grid { flex-direction: column; gap: 20px; }
  .news_teaser_grid { flex-direction: column; gap: 18px; }
  .card-container { flex-direction: column; gap: 16px; }
  .card { width: 100%; }
  .text-image-section { flex-direction: column; gap: 18px; }
  header .container { height: 70px; }
}
@media (max-width: 520px) {
  h1 { font-size: 1.48rem; }
  h2 { font-size: 1.1rem; }
  h3 { font-size: .98rem; }
  .btn-primary { font-size: .97rem;padding: 10px 13px; }
}
@media (max-width: 430px) {
  .testimonial-card { padding: 10px; }
  footer .container, header .container { padding: 0 4px; }
}

/* ------------------ BUTTONS & INTERACTIVE ------------------------------ */
button, .btn-primary {
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s, color 0.2s;
}
button:active, .btn-primary:active {
  transform: translateY(1px) scale(.98);
}

/* ------------------ PAGINATION NAVIGATION ------------------------------- */
.text-section nav {
  display: flex;
  gap: 14px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.text-section nav a {
  background: var(--color-accent);
  color: var(--color-primary);
  border-radius: 7px;
  padding: 7px 15px;
  font-weight: bold;
  font-family: 'Roboto Slab', serif;
  transition: background .18s, color .18s;
}
.text-section nav a:hover, .text-section nav a:focus {
  background: #ffe7a5;
  color: var(--color-primary);
}

/* -------------- MISC ICON SIZING ------------------ */
.text-section img, .text-section svg {
  display: inline-block;
  vertical-align: middle;
  height: 20px;
  width: auto;
  margin-right: 8px;
}

/* ----------------- COOKIE CONSENT BANNER --------------------------- */
.cookie-banner {
  display: flex;
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100vw;
  padding: 28px 18px 22px 18px;
  background: var(--color-dark);
  color: var(--color-white);
  z-index: 2000;
  align-items: flex-start;
  justify-content: center;
  gap: 32px;
  box-shadow: 0 -6px 24px -5px #20334022;
  font-size: 1rem;
  animation: cookiebanner-slidein 0.6s cubic-bezier(0.44,1.7,0.84,1) 1;
  flex-wrap: wrap;
}
@keyframes cookiebanner-slidein {
  from { transform: translateY(120%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.cookie-banner p { color: var(--color-white); max-width: 600px; margin-bottom: 0; }
.cookie-banner .cookie-btns {
  display: flex;
  flex-direction: row;
  gap: 16px;
  align-items: flex-start;
}
.cookie-banner .cookie-btns button {
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-family: 'Roboto Slab', serif;
  font-size: 1rem;
  padding: 10px 22px;
  border: none;
  cursor: pointer;
  background: var(--color-accent);
  color: var(--color-primary);
  box-shadow: 0 1px 5px #0b1b2a08;
  margin-right: 1px;
  transition: background .18s, color .18s;
}
.cookie-banner .cookie-btns button.reject {
  background: #fff;
  color: var(--color-primary);
  border: 1.5px solid #ccc;
}
.cookie-banner .cookie-btns button.settings {
  background: #274864;
  color: var(--color-accent);
  border: 1.5px solid #f9c84633;
}
.cookie-banner .cookie-btns button:hover, .cookie-banner .cookie-btns button:focus {
  background: #ffe7a5;
  color: var(--color-primary);
}
@media (max-width: 680px) {
  .cookie-banner { flex-direction: column; gap: 18px; align-items: flex-start; }
  .cookie-banner .cookie-btns { flex-direction: column; gap: 10px; }
}

/* ---------------- COOKIE PREFERENCES MODAL -------------------------- */
.cookie-modal-overlay {
  display: none;
  position: fixed;
  z-index: 3000;
  left: 0; right: 0; top: 0; bottom: 0;
  width: 100vw; height: 100vh;
  background: #0008;
  align-items: center; justify-content: center;
  animation: fadein-modal .32s;
}
.cookie-modal-overlay.active { display: flex; }
@keyframes fadein-modal {
  from { opacity: 0; } to { opacity: 1; }
}
.cookie-modal {
  background: var(--color-secondary);
  border-radius: var(--radius-md);
  max-width: 98vw;
  min-width: 320px;
  box-shadow: 0 8px 44px -14px #2635581d, 0 2px 16px -10px #233e6644;
  padding: 38px 24px 30px 24px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 19px;
  width: 98%;
  max-width: 440px;
  animation: modal-pop 0.34s cubic-bezier(0.42,1.65,0.6,0.9);
}
@keyframes modal-pop {
  from { transform: scale(0.93); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.cookie-modal h2 {
  font-family: 'Roboto Slab',serif;
  font-size: 1.28rem;
  margin-bottom: 12px;
  color: var(--color-primary);
}
.cookie-modal .cookie-category {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
  background: #fff;
  padding: 12px 10px 12px 14px;
  border-radius: 7px;
  box-shadow: 0 1px 5px #27486414;
}
.cookie-modal .cookie-category label {
  flex: 1;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-primary);
}
.cookie-modal .cookie-category input[type=checkbox]:disabled + label {
  color: #8994a8;
  opacity: 0.88;
}
.cookie-modal .modal-btns {
  display: flex;
  flex-direction: row;
  gap: 14px;
  justify-content: flex-end;
  margin-top: 12px;
}
.cookie-modal .modal-btns button {
  border-radius: var(--radius-sm);
  font-weight: bold;
  font-family: 'Roboto Slab',serif;
  font-size: 1rem;
  padding: 9px 18px;
  border: none;
  cursor: pointer;
  background: var(--color-accent);
  color: var(--color-primary);
  box-shadow: 0 1px 5px #1827390A;
  transition: background .19s;
}
.cookie-modal .modal-btns button.close-modal {
  background: #e2e6ee;
  color: var(--color-primary);
}
.cookie-modal .modal-btns button:hover, .cookie-modal .modal-btns button:focus {
  background: #ffd557;
}

/* ---------------- LINK & INTERACTIVE STATES ------------------ */
a { transition: color 0.22s, background .21s; }
a:hover, a:focus {
  color: var(--color-accent);
}

/* ------------------- VISUAL HIERARCHY ---------------------------- */
h1, h2, h3, h4 { color: var(--color-primary); text-shadow: 0 1px 0 #fff5; }
h1 {
  font-size: 2.8rem; letter-spacing: -0.02em;
  text-shadow: 0 3px 15px #27486413;
}
h2 {
  font-size: 2rem; letter-spacing: -0.015em; text-shadow: 0 2px 8px #f9c84611;
}
h3 {
  font-size: 1.3rem; letter-spacing: -0.011em;
}
@media (max-width: 700px) { h1 { font-size: 2rem; } h2 { font-size: 1.1rem; } }

/* ---------------------- GEOMETRIC SHAPES EFFECTS --------------------------- */
.feature-grid > div, .card {
  position: relative;
}
.feature-grid > div:after {
  content: '';
  position: absolute;
  top: -21px; right: -21px;
  width: 44px; height: 44px;
  background: #F9C84633;
  border-radius: 36% 80% 64% 52%/55% 67% 57% 40%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.38;
}
.card:after {
  content: '';
  position: absolute;
  bottom: -16px; left: -16px;
  width: 37px; height: 37px;
  background: #27486410;
  border-radius: 51% 49% 58% 42%/34% 56% 44% 66%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.30;
}

/* ---------------------- COLOR CONTRAST ACCESSIBILITY ----------------------- */
.testimonial-card,
.news_teaser_grid > div,
.card,
.feature-grid > div,
input[type="text"], input[type="email"] {
  color: #243042;
  background-color: var(--color-white);
}
.testimonial-card p { color: #192330; }
footer {
  color: #f7fafc;
  background: #274864;
}
footer nav a {
  color: #F9C846;
}

/* ---------------------- TRANSITIONS, MICRO-ANIMATIONS --------------------- */
.card, .feature-grid > div, .news_teaser_grid > div, .testimonial-card {
  transition: box-shadow .18s, transform .13s, background .18s;
}
.card:hover, .feature-grid > div:hover, .news_teaser_grid > div:hover {
  box-shadow: 0 8px 32px -9px #2748642a, 0 1.5px 4px #f9c84617;
  transform: translateY(-3px) scale(1.025);
}

/* ---------------------- FEATURE ITEM LAYOUT for FLEXBOX MANDATE ------------ */
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}

/* ----------- MINIMAL SUPPORT FOR PRINT (optional, hidden mobile nav) ------- */
@media print {
  .mobile-menu, .mobile-menu-toggle, .cookie-banner, .cookie-modal-overlay { display: none !important; }
}
