/* =====================
   CSS RESET & NORMALIZE
   ===================== */
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;
}
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
  display: block;
}
body {
  line-height: 1.6;
  background: #F4F7FA;
  color: #1e2a36;
}
ol, ul {
  list-style: none;
}
a {
  text-decoration: none;
  color: inherit;
}
img {
  border: none;
  max-width: 100%;
  display: block;
}
input, button, select, textarea {
  font-family: inherit;
  font-size: 100%;
  outline: none;
  border: none;
  background: none;
  color: inherit;
}
button, [type='button'], [type='submit'] {
  cursor: pointer;
}
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* ===== BRAND FONTS & COLORS ===== */
@import url('https://fonts.googleapis.com/css?family=Roboto+Slab:700&display=swap');
@import url('https://fonts.googleapis.com/css?family=Open+Sans:400,600,700&display=swap');

:root {
  --color-primary: #11487A;
  --color-accent: #FFB44C;
  --color-secondary: #F4F7FA;
  --color-bg: #fff;
  --color-border: #E6E7E9;
  --color-text-main: #203146;
  --color-heading: #11487A;
  --color-link: #11487A;
  --color-card-bg: #fff;
  --color-shadow: rgba(17,72,122,0.06);
  --color-accent-light: #FFEBCD;
}

body {
  font-family: 'Open Sans', Arial, Helvetica, sans-serif;
  color: var(--color-text-main);
  font-size: 16px;
  background: var(--color-secondary); /* soft warm background */
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Roboto Slab', serif;
  color: var(--color-heading);
  margin-bottom: 16px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0.02em;
}
h1 {font-size: 2.5rem;}
h2 {font-size: 2rem;}
h3 {font-size: 1.4rem;}
h4,h5,h6 {font-size: 1.1rem;}

p, ul, ol, address, blockquote {
  font-family: 'Open Sans', Arial, sans-serif;
  font-size: 1rem;
  margin-bottom: 12px;
  color: #37405a;
}

strong {font-weight: 700; color: var(--color-heading);}

/* ========================
   MAIN CONTAINER & LAYOUT
   ======================== */
.container {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
}

.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
  align-items: flex-start;
}

/* ===============
   HEADER & NAVBAR
   =============== */
header {
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  padding: 0;
  box-shadow: 0 1px 12px 0 var(--color-shadow);
  position: sticky;
  top: 0;
  z-index: 10;
}
header .container {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  padding-bottom: 8px;
}
.logo img {
  height: 42px;
  border-radius: 12px;
  background: var(--color-secondary);
  padding: 4px 6px;
  box-shadow: 0px 2px 12px 0 var(--color-shadow);
  transition: box-shadow 0.2s;
}
.logo:hover img {
  box-shadow: 0px 4px 18px 0 var(--color-accent-light);
}

.main-nav {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 18px;
}
.main-nav a {
  font-size: 1rem;
  color: var(--color-link);
  background: none;
  border-radius: 24px;
  padding: 7px 16px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: background 0.18s, color 0.18s;
}
.main-nav a.cta,
.cta {
  background: var(--color-accent);
  color: #183147;
  border-radius: 24px;
  font-weight: 700;
  padding: 8px 20px;
  box-shadow: 0 2px 10px 0 var(--color-shadow);
  transition: background 0.22s, box-shadow 0.2s, color 0.2s;
}
.main-nav a:hover,
.main-nav a:focus {
  background: var(--color-accent-light);
  color: var(--color-primary);
}
.main-nav a.cta:hover, .cta:hover, .main-nav a.cta:focus, .cta:focus {
  background: #ffd590;
  color: var(--color-primary);
  box-shadow: 0 8px 24px 0 var(--color-shadow);
}

/* ================
   MOBILE MENU
   ================ */
.mobile-menu-toggle {
  background: var(--color-accent);
  color: var(--color-primary);
  border: none;
  font-size: 2rem;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 18px;
  box-shadow: 0 2px 10px 0 var(--color-shadow);
  transition: background 0.2s;
  z-index: 120;
}
.mobile-menu-toggle:focus, .mobile-menu-toggle:hover {
  background: #ffd590;
  color: var(--color-primary);
}

.mobile-menu {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  right: 0;
  background: rgba(17,72,122,0.92);
  transform: translateX(100%);
  transition: transform 0.34s cubic-bezier(0.8,0,0.2,1);
  z-index: 130;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-end;
  width: 100vw;
  height: 100vh;
  overflow-y: auto;
}
.mobile-menu.open {
  transform: translateX(0);
}
.mobile-menu-close {
  margin: 18px 24px 0 0;
  background: none;
  color: #fff;
  font-size: 2.2rem;
  border-radius: 50%;
  width: 44px; height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.14s;
}
.mobile-menu-close:focus, .mobile-menu-close:hover {
  background: var(--color-accent);
  color: var(--color-primary);
}
.mobile-nav {
  margin: 32px 24px 0 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 16px;
}
.mobile-nav a {
  font-size: 1.25rem;
  color: #fff;
  background: none;
  border-radius: 18px;
  padding: 10px 24px;
  width: 100%;
  max-width: 320px;
  text-align: right;
  font-weight: 600;
  transition: background 0.15s, color 0.12s;
  margin-bottom: 4px;
}
.mobile-nav a:hover, .mobile-nav a:focus {
  background: var(--color-accent);
  color: var(--color-primary);
}

@media (min-width: 980px) {
  .mobile-menu-toggle, .mobile-menu { display: none !important; }
}
@media (max-width: 979px) {
  .main-nav {
    display: none !important;
  }
  .mobile-menu-toggle {
    display: flex !important;
  }
}

/* ============
   HERO SECTION
   ============ */
.hero {
  background: linear-gradient(120deg, var(--color-accent-light) 0%, var(--color-secondary) 100%);
  padding: 54px 0 44px 0;
  margin-bottom: 40px;
}
.hero .container {
  align-items: flex-start;
  justify-content: center;
}
.hero h1 {
  color: var(--color-primary);
  font-size: 2.4rem;
}
.hero p {
  font-size: 1.1rem;
  color: #31435f;
}
.hero .cta {
  margin-top: 18px;
}

/* ================
   SECTIONS & CARDS
   ================ */
.section, .features, .step-guides, .category-listing, .contact, .about, .team, .download-cta, .benefits, .cta, .thank-you, .legal, .intro, .testimonials {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: var(--color-bg);
  border-radius: 32px;
  box-shadow: 0 4px 32px 0 var(--color-shadow);
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.features {
  background: var(--color-accent-light);
}
.step-guides {
  background: var(--color-secondary);
}
.cta {
  background: var(--color-accent);
  color: var(--color-primary);
  box-shadow: 0 6px 32px 0 var(--color-shadow);
}
.cta .cta,
.cta a {
  margin-top: 12px;
}
.intro {
  background: var(--color-bg);
}

/* FEATURE GRID & CARDS (MANDATORY FLEXBOX) */
.features-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 18px;
  width: 100%;
  justify-content: flex-start;
}
.features-grid > div {
  background: #fff;
  box-shadow: 0 2px 8px var(--color-shadow);
  border-radius: 24px;
  padding: 26px 18px 20px 18px;
  flex: 1 1 230px;
  min-width: 210px;
  max-width: 300px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  transition: box-shadow 0.2s, transform 0.18s;
  margin-bottom: 20px;
}
.features-grid > div:hover {
  box-shadow: 0 8px 28px 0 var(--color-accent-light), 0 2px 12px var(--color-shadow);
  transform: translateY(-4px) scale(1.01);
}
.features-grid img {
  width: 38px;
  height: 38px;
  margin-bottom: 9px;
}
.features-grid h3 {
  margin-bottom: 6px;
}

/* OL/UL in Steps & Benefits */
ol, ul {
  margin-left: 18px;
}
ol li, ul li {
  margin-bottom: 10px;
  padding-left: 0px;
  line-height: 1.6;
}

ul li::before {
  content: "";
  display: inline-block;
  vertical-align: middle;
  width: 10px;
  height: 10px;
  background: var(--color-accent);
  border-radius: 50%;
  margin-right: 12px;
}
ol li {
  counter-increment: step-counter;
  padding-left: 0;
}

/* ==============
   TESTIMONIALS
   ============== */
.testimonials {
  background: var(--color-accent-light);
}
.testimonial-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  background: #fff;
  border-radius: 24px;
  margin-bottom: 20px;
  box-shadow: 0 1px 9px var(--color-shadow);
  padding: 24px;
}
.testimonial-card blockquote {
  font-size: 1.2rem;
  color: #2d3650;
  font-style: italic;
  margin-bottom: 8px;
}
.testimonial-meta {
  font-size: 1rem;
  color: var(--color-primary);
  font-weight: 600;
}

/* ============
   FOOTER
   ============ */
footer {
  background: var(--color-primary);
  color: #fff;
  border-radius: 32px 32px 0 0;
  box-shadow: 0 -2px 12px var(--color-shadow);
  margin-top: 40px;
  padding: 0 0 16px 0;
}
.footer-cols {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 32px;
  padding: 32px 0 0 0;
}
.footer-cols > div,
.footer-nav {
  flex: 1 1 240px;
  min-width: 180px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-cols img[alt="WLAN Klartext"] {
  width: 54px;
  margin-bottom: 8px;
}
.footer-nav a {
  color: #fff;
  font-size: 1rem;
  padding: 4px 0;
  transition: color 0.14s;
  border-radius: 14px;
  margin-bottom: 4px;
}
.footer-nav a:hover, .footer-nav a:focus {
  color: var(--color-accent);
  background: #fff2df;
}
footer a {
  color: var(--color-accent);
  word-break: break-all;
  transition: color 0.16s;
}
footer a:hover, footer a:focus {
  color: #fff;
  text-decoration: underline;
}
footer address {
  font-style: normal;
  font-size: 1rem;
  margin-bottom: 8px;
}

/* ==============
   LEGAL PAGES
   ============== */
.legal {
  background: var(--color-secondary);
  border-radius: 32px;
}
.legal h2, .legal h3 {
  margin-top: 18px;
  margin-bottom: 8px;
}
.legal p, .legal ul, .legal li {
  color: #34405b;
}

/* ============
   THANK YOU PAGE
   ============ */
.thank-you {
  background: var(--color-accent-light);
  color: var(--color-primary);
  text-align: center;
  align-items: center;
  justify-content: center;
}

/* =============
   CONTACT PAGE
   ============= */
.contact address,
.contact div {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #31435f;
}
.contact strong {
  margin-right: 8px;
}
.contact img {
  width: 20px; height: 20px;
}

/* ========================
   Responsive Layout (Flexbox ONLY!)
   ======================== */
@media (max-width: 768px) {
  .container {
    padding: 0 6px;
  }
  .footer-cols {
    flex-direction: column;
    gap: 12px;
    padding-top: 16px;
  }
  .main-nav {
    display: none !important;
  }
  .section, .features, .step-guides, .category-listing, .contact, .about, .team, .download-cta, .benefits, .cta, .thank-you, .legal, .intro, .testimonials {
    padding: 25px 6px;
    margin-bottom: 38px;
    border-radius: 20px;
  }
  .features-grid {
    flex-direction: column;
    gap: 18px;
  }
  .features-grid > div {
    max-width: 100%;
    min-width: 0;
    width: 100%;
  }
  .hero {
    padding: 28px 0 24px 0;
  }
  .footer-cols > div,
  .footer-nav {
    min-width: 0;
    flex: 1 1 100%;
  }
}

/* Content Alignment for Flex Containers */
.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: 18px;
  }
}

.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  margin-bottom: 20px;
  position: relative;
  background: #fff;
  padding: 24px 18px;
  border-radius: 16px;
  box-shadow: 0 2px 10px var(--color-shadow);
  transition: box-shadow 0.18s, transform 0.14s;
}
.card:hover {
  box-shadow: 0 8px 28px var(--color-shadow);
  transform: translateY(-4px) scale(1.015);
}
.card-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.content-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
}
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}

.testimonial-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
}

/* Ensure minimum spacing between content cards/sections */
.section + .section, .features + .features, .step-guides + .step-guides, .contact + .contact,
.category-listing + .category-listing, .cta + .cta, .testimonials + .testimonials {
  margin-top: 40px;
}

/* ========================
   BUTTONS & INTERACTIVES
   ======================== */
button, .cta, .main-nav a.cta, .mobile-menu-toggle, .mobile-menu-close {
  transition: background 0.2s, color 0.16s, box-shadow 0.18s, transform 0.1s;
}
button:focus, .cta:focus, .main-nav a.cta:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* General Form Styles (should forms be used) */
input, textarea {
  padding: 7px 12px;
  border-radius: 6px;
  border: 1px solid var(--color-border);
  background: #fff;
  font-size: 1rem;
  margin-bottom: 10px;
  transition: border-color 0.16s;
}
input:focus, textarea:focus {
  border-color: var(--color-accent);
}

/* ==============================
   COOKIE CONSENT BANNER & MODAL
   ============================== */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  color: var(--color-heading);
  padding: 24px 16px;
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -4px 36px 0 var(--color-shadow);
  display: flex;
  flex-direction: column;
  gap: 16px;
  z-index: 210;
  width: 100%;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
  align-items: flex-start;
  animation: slideUpFadeIn 0.5s;
}
@keyframes slideUpFadeIn {
  from { opacity: 0; transform: translateY(60px); }
  to { opacity: 1; transform: translateY(0); }
}
.cookie-banner-buttons {
  display: flex;
  flex-direction: row;
  gap: 15px;
}
.cookie-banner button,
.cookie-banner .cookie-settings-btn {
  padding: 9px 20px;
  font-size: 1rem;
  border-radius: 22px;
  font-weight: 600;
  border: none;
  margin: 0;
  background: var(--color-accent);
  color: var(--color-primary);
  transition: background 0.18s, color 0.14s, box-shadow 0.16s;
  box-shadow: 0 1px 6px var(--color-shadow);
}
.cookie-banner button:focus, .cookie-banner .cookie-settings-btn:focus {
  outline: 2px solid var(--color-primary);
}
.cookie-banner button.reject {
  background: #f7d7ab;
  color: var(--color-heading);
}
.cookie-banner button.reject:hover {
  background: #ffe3bb;
  color: var(--color-primary);
}
.cookie-banner button.accept:hover, .cookie-banner button.accept:focus, .cookie-banner .cookie-settings-btn:hover {
  background: #ffd590;
  color: var(--color-primary);
}

/* Cookie Modal */
.cookie-modal-overlay {
  position: fixed;
  top:0; left:0; right:0; bottom:0;
  background: rgba(17,72,122,0.25);
  z-index: 250;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cookie-modal {
  background: #fff;
  color: var(--color-heading);
  border-radius: 28px;
  padding: 32px 24px 26px 24px;
  box-shadow: 0 6px 44px var(--color-shadow);
  max-width: 420px;
  width: 92vw;
  animation: slideDownFadeIn 0.35s;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
@keyframes slideDownFadeIn {
  from { opacity: 0; transform: translateY(-40px); }
  to { opacity: 1; transform: translateY(0); }
}
.cookie-modal h2 {
  margin-bottom: 8px;
}
.cookie-categories {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cookie-category-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 9px;
  font-size: 1rem;
}
.cookie-category-row input[type='checkbox'] {
  width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--color-accent);
  accent-color: var(--color-accent);
}
.cookie-modal-footer {
  display: flex;
  flex-direction: row;
  gap: 14px;
  justify-content: flex-end;
  margin-top: 14px;
}
.cookie-modal .cookie-modal-close {
  background: #f8f8f8;
  color: var(--color-heading);
  border-radius: 50%;
  font-size: 1.3rem;
  width: 34px; height: 34px;
  border: none;
  align-self: flex-end;
  margin-bottom: -8px;
}
.cookie-modal .cookie-modal-close:hover {
  background: var(--color-accent-light);
}

@media (max-width: 540px) {
  .cookie-banner {
    padding: 16px 6px;
    max-width: 98vw;
    border-radius: 16px 16px 0 0;
  }
  .cookie-modal {
    padding: 24px 6px 20px 6px;
    border-radius: 18px;
    max-width: 98vw;
  }
}

/* ==============================
   ADDITIONAL MICRO-INTERACTIONS
   ============================== */
a, .cta, button {
  transition: background 0.18s, color 0.17s, box-shadow 0.16s, transform 0.11s;
}
a:active, .cta:active, button:active {
  transform: scale(0.983);
}

/* ==============================
   UTILITY CLASSES
   ============================== */
.text-center { text-align: center; }
.rounded { border-radius: 18px !important; }
.shadow { box-shadow: 0 2px 14px var(--color-shadow)!important; }

/* Accessibility & Focus states */
a:focus-visible, .cta:focus-visible, button:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Hide visually (utility for menus) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* ==============
   PRINT STYLES
   ============== */
@media print {
  header, .mobile-menu, .cookie-banner, .cookie-modal-overlay, footer {
    display: none !important;
  }
  .container {
    max-width: 100vw;
    padding: 0;
  }
  body {
    background: #fff !important;
    color: #222 !important;
  }
}
