/* ======================== 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, main, menu, nav, output, ruby, section, summary, time, mark, audio, video {
  margin: 0;
  padding: 0;
  border: 0;
  font: inherit;
  vertical-align: baseline;
  box-sizing: border-box;
}
html {
  height: 100%;
  font-size: 16px;
  background: #F7F7F7;
  box-sizing: border-box;
}
body {
  min-height: 100%;
  font-family: "Roboto", Arial, sans-serif;
  line-height: 1.7;
  color: #2E3B55;
  background: #F7F7F7;
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
}
article, aside, details, figcaption, figure, footer, header, hgroup, main, menu, nav, section {
  display: block;
}
ul, ol {
  list-style: none;
}
a {
  text-decoration: none;
  color: #2E3B55;
  transition: color .2s;
}
a:hover, a:focus {
  color: #F5C843;
}
img {
  max-width: 100%;
  border: 0;
  vertical-align: middle;
}
button {
  font: inherit;
  background: none;
  border: none;
  cursor: pointer;
  outline: none;
  transition: background .2s, color .2s, border-color .2s;
}
input, textarea, select {
  font: inherit;
  outline: none;
  background: #fff;
}

/* ======================== BRAND VARIABLES ======================== */
:root {
  --primary: #2E3B55;
  --secondary: #F5C843;
  --accent: #F7F7F7;
  --dark-text: #2E3B55;
  --light-bg: #fff;
  --gray: #E5E9F0;
  --mid-gray: #C2C7D3;
  --focus: #1996e1;
}

/* ======================== TYPOGRAPHY ======================== */
h1, h2, h3, h4, h5, h6 {
  font-family: "Montserrat", "Roboto", Arial, sans-serif;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 20px;
  line-height: 1.15;
}
h1 { font-size: 2.5rem; margin-bottom: 24px; }
h2 { font-size: 2rem; margin-bottom: 20px; }
h3 { font-size: 1.25rem; margin-bottom: 16px; }
h4 { font-size: 1.125rem; margin-bottom: 12px; }

p, li, ul, ol {
  font-size: 1rem;
}
p {
  color: var(--primary);
  margin-bottom: 16px;
}
strong, b {
  font-weight: 700;
  color: var(--primary);
}
.small-print {
  font-size: 0.95rem;
  color: var(--mid-gray);
  margin-top: 10px;
}

/* ======================== LAYOUT UTILITIES ======================== */
.container {
  width: 100%;
  max-width: 1152px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}
.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 32px;
  width: 100%;
}
.text-section {
  max-width: 700px;
}
.section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: inherit;
}
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  background: var(--light-bg);
  border-radius: 16px;
  box-shadow: 0 2px 8px 0 rgba(39,54,85,0.08);
  margin-bottom: 20px;
  position: relative;
  padding: 24px;
  min-width: 250px;
  flex: 1 1 250px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.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;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  padding: 20px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(30,37,52,0.08);
  min-width: 220px;
  margin-bottom: 20px;
  width: 100%;
  max-width: 370px;
}
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}

.testimonials {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 12px;
}

@media (max-width: 992px) {
  .container { padding: 0 12px; }
  .testimonials { gap: 20px; }
  .content-wrapper { gap: 24px; }
}
@media (max-width: 768px) {
  .content-wrapper { gap: 20px; }
  .testimonial-card { max-width: 100%; }
}

/* ======================== HEADER & NAVIGATION ======================== */
header {
  background: var(--light-bg);
  box-shadow: 0 1px 6px 0 rgba(30,37,52,0.05);
  position: sticky;
  top: 0;
  z-index: 30;
}
.header-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 70px;
  padding-top: 14px;
  padding-bottom: 14px;
}
header img[alt*="VortexFlame Lernen"] {
  height: 40px;
  margin-right: 20px;
}

.main-nav {
  display: flex;
  gap: 28px;
  align-items: center;
}
.main-nav a {
  font-family: "Montserrat", Arial, sans-serif;
  font-weight: 500;
  font-size: 1rem;
  color: var(--primary);
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  transition: border-color .2s, color .2s;
  letter-spacing: .01em;
}
.main-nav a:hover, .main-nav a:focus {
  border-bottom: 2px solid var(--secondary);
  color: var(--secondary);
}
.primary-cta {
  background: var(--primary);
  color: #fff!important;
  font-family: "Montserrat", Arial, sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  border-radius: 7px;
  padding: 10px 26px;
  margin-left: 24px;
  box-shadow:  0 2px 16px 0 rgba(46, 59, 85, 0.08);
  border: 2px solid var(--primary);
  transition: background .2s, color .2s, box-shadow .2s, border-color .2s;
  display: inline-block;
}
.primary-cta:hover, .primary-cta:focus {
  background: var(--secondary);
  color: var(--primary)!important;
  border-color: var(--secondary);
  box-shadow: 0 2px 16px 0 rgba(245, 200, 67, 0.10);
}

.mobile-menu-toggle {
  display: none;
  font-size: 2rem;
  color: var(--primary);
  background: transparent;
  border: none;
  padding: 6px 13px;
  border-radius: 7px;
  transition: background .2s, color .2s;
}
.mobile-menu-toggle:focus, .mobile-menu-toggle:hover {
  background: var(--gray);
  color: var(--secondary);
}

/* Hamburger: show on mobile */
@media (max-width: 1060px) {
  .main-nav,
  .primary-cta {
    display: none !important;
  }
  .mobile-menu-toggle {
    display: block;
  }
}

/* ======================== MOBILE MENU ======================== */
.mobile-menu {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(46, 59, 85, 0.98);
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-start;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.6,.1,.5,1);
  pointer-events: none;
  opacity: 0;
}
.mobile-menu.active {
  transform: translateX(0);
  pointer-events: auto;
  opacity: 1;
}
.mobile-menu-close {
  font-size: 2rem;
  background: transparent;
  color: #fff;
  border: none;
  margin: 28px 24px 10px 0;
  align-self: flex-end;
  padding: 4px 12px;
  border-radius: 7px;
  transition: background .2s;
}
.mobile-menu-close:hover, .mobile-menu-close:focus {
  background: var(--secondary);
  color: var(--primary);
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
  padding: 8px 32px;
  margin-top: 16px;
}
.mobile-nav a {
  color: #fff;
  font-family: "Montserrat", Arial, sans-serif;
  font-weight: 500;
  font-size: 1.35rem;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  width: 100%;
  transition: background .2s, color .2s, border-bottom .2s;
  display: block;
}
.mobile-nav a:hover, .mobile-nav a:focus {
  color: var(--secondary);
  background: rgba(245, 200, 67, 0.10);
  border-bottom: 2px solid var(--secondary);
}

/* ======================== HERO ======================== */
.hero {
  background: linear-gradient(90deg, #f7f7f7 55%, #E5E9F0 100%);
  padding: 54px 0 50px 0;
  border-bottom: 1px solid var(--gray);
  margin-bottom: 52px;
}
.hero .content-wrapper {
  align-items: flex-start;
  gap: 18px;
}
.hero h1,
.hero h2 {
  color: var(--primary);
}
.hero p {
  font-size: 1.25rem;
  color: var(--primary);
  margin-bottom: 14px;
}
.hero .primary-cta {
  margin-top: 12px;
  box-shadow: 0 2px 8px 0 rgba(245, 200, 67, 0.09);
}
@media (max-width: 700px) {
  .hero { padding: 38px 0 36px 0; margin-bottom: 34px; }
}

/* ======================== FEATURES ======================== */
.feature-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  justify-content: space-between;
  margin-top: 18px;
  margin-bottom: 14px;
}
.feature-grid > div {
  background: #fff;
  border-radius: 14px;
  flex: 1 1 240px;
  min-width: 210px;
  box-shadow: 0px 2px 14px 0px rgba(46,59,85,0.07);
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  transition: box-shadow .2s, transform .2s;
}
.feature-grid > div:hover, .feature-grid > div:focus-within {
  box-shadow: 0 6px 32px 0 rgba(46,59,85,0.12);
  transform: translateY(-3px) scale(1.025);
}
.feature-grid img {
  width: 40px;
  height: 40px;
  margin-bottom: 4px;
}

/* ======================== SERVICES ======================== */
.service-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 16px;
}
.service-list li {
  background: #fff;
  border-radius: 9px;
  padding: 16px 20px;
  box-shadow: 0 1px 4px 0 rgba(46,59,85,0.05);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-size: 1.09rem;
}
.service-list span {
  color: var(--secondary);
  font-weight: 700;
  font-size: 1.01rem;
  margin-left: 12px;
}

/* ======================== TESTIMONIALS ======================== */
.testimonial-card {
  border-left: 5px solid var(--secondary);
  background: #fff;
  color: var(--dark-text);
}
.testimonial-card p {
  font-size: 1.12rem;
  font-style: italic;
  color: var(--dark-text);
  margin-bottom: 8px;
}
.client-name {
  font-size: 1rem;
  color: var(--primary);
  font-family: "Montserrat", Arial, sans-serif;
  font-weight: 600;
  margin-top: 4px;
}
.star-ratings {
  color: var(--secondary);
  font-size: 1.21rem;
  letter-spacing: 2px;
  margin-bottom: 0;
}

/* ======================== FOOTER ======================== */
footer {
  background: var(--primary);
  color: #fff;
  padding: 40px 0 24px 0;
  margin-top: 60px;
  font-size: 1rem;
  border-top: 3px solid var(--secondary);
}
.footer-flex {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: space-between;
  align-items: center;
}
footer img {
  height: 38px;
  margin-right: 12px;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
}
.footer-nav a {
  color: #fff;
  opacity: .95;
  font-family: "Montserrat", Arial, sans-serif;
  letter-spacing: .01em;
  transition: color .2s, opacity .2s;
}
.footer-nav a:hover, .footer-nav a:focus {
  color: var(--secondary);
  opacity: 1;
}

@media (max-width: 720px) {
  .footer-flex {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }
  .footer-nav {
    gap: 10px;
  }
}

/* ======================== FORMS & BUTTONS ======================== */
input, textarea, select {
  background: #fff;
  border: 1.5px solid var(--mid-gray);
  border-radius: 7px;
  padding: 10px 14px;
  font-size: 1rem;
  margin-bottom: 12px;
  transition: border-color .2s;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--secondary);
}
button, .button {
  background: var(--primary);
  color: #fff;
  font-family: "Montserrat", Arial, sans-serif;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  border-radius: 7px;
  padding: 10px 22px;
  margin: 8px 8px 8px 0;
  cursor: pointer;
  transition: background .2s, color .2s;
  display: inline-block;
  box-shadow:  0 0 0 0 rgba(46,59,85,0.04);
}
button:hover, button:focus, .button:hover, .button:focus {
  background: var(--secondary);
  color: var(--primary);
}

/* Additional outline for focus accessibility */
button:focus, a:focus, input:focus, textarea:focus {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* ======================== RESPONSIVE UTILITIES & FLEX DIRECTION ======================== */
@media (max-width: 900px) {
  .feature-grid {
    flex-direction: column;
    gap: 20px;
  }
  .footer-flex {
    flex-direction: column;
    gap: 20px;
  }
  .card-container { flex-direction: column; gap: 16px; }
}
@media (max-width: 768px) {
  .content-grid, .feature-grid, .footer-flex {
    flex-direction: column;
    gap: 18px;
  }
  .testimonials { flex-direction: column; gap: 14px; }
  .hero { margin-bottom: 24px; }
  .section { padding: 28px 8px; margin-bottom: 32px; }
  .card { min-width: unset; }
  .container { padding: 0 8px; }
  .text-image-section { flex-direction: column; gap: 16px; }
}
@media (max-width: 500px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.37rem; }
  .primary-cta, button {
    font-size: 1rem;
    padding: 10px 14px;
  }
}

/* ======================== COOKIE CONSENT BANNER ======================== */
.cookie-banner {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  z-index: 300;
  background: #fff;
  color: var(--primary);
  box-shadow: 0 -2px 16px 0 rgba(46,59,85,0.11);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 18px;
  padding: 24px 14px;
  animation: showCookieBanner 0.7s cubic-bezier(.55, .14, .55, .98);
}
@keyframes showCookieBanner {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.cookie-banner-text {
  flex: 1 1 240px;
  font-size: 1rem;
}
.cookie-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.cookie-btn {
  background: var(--primary);
  color: #fff;
  border-radius: 6px;
  padding: 8px 18px;
  font-family: "Montserrat", Arial, sans-serif;
  font-weight: 600;
  border: 1.5px solid var(--primary);
  transition: background .2s, color .2s, border-color .2s;
  margin-right: 4px;
}
.cookie-btn:hover, .cookie-btn:focus {
  background: var(--secondary);
  color: var(--primary);
  border-color: var(--secondary);
}
.cookie-btn.settings {
  background: #fff;
  color: var(--primary);
  border: 1.5px solid var(--mid-gray);
  transition: border-color .2s, color .2s, background .2s;
}
.cookie-btn.settings:hover, .cookie-btn.settings:focus {
  border-color: var(--secondary);
  color: var(--secondary);
}

@media (max-width: 650px) {
  .cookie-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 5px;
  }
}

/* ======================== COOKIE CONSENT MODAL ======================== */
.cookie-modal {
  position: fixed;
  left: 0; right: 0; top: 0; bottom: 0;
  background: rgba(46,59,85,0.28);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeModalBg 0.3s cubic-bezier(.43,.91,.45,.95);
}
@keyframes fadeModalBg {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.cookie-modal-content {
  background: #fff;
  border-radius: 15px;
  box-shadow: 0 8px 32px rgba(46,59,85,0.19);
  padding: 38px 24px 20px 24px;
  min-width: 300px;
  width: 95%;
  max-width: 400px;
  position: relative;
  animation: showModal 0.33s cubic-bezier(.6,.12,.44,.98);
}
@keyframes showModal {
  from { transform: translateY(30px) scale(0.99); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}
.cookie-modal-content h2 {
  font-size: 1.35rem;
  margin-bottom: 12px;
  color: var(--primary);
}
.cookie-category {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 13px;
}
.cookie-category label {
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary);
  margin-right: 8px;
  user-select: none;
}
.cookie-category input[type="checkbox"] {
  accent-color: var(--secondary);
  width: 18px;
  height: 18px;
  margin-right: 3px;
}
.cookie-modal-close {
  position: absolute;
  top: 18px; right: 18px;
  font-size: 1.3rem;
  background: transparent;
  color: var(--primary);
  border: none;
  padding: 2px;
  border-radius: 6px;
  transition: background .15s;
}
.cookie-modal-close:hover, .cookie-modal-close:focus {
  background: var(--gray);
}
.cookie-modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  justify-content: flex-end;
}

/* ======================== MISC ELEMENTS ======================== */
ul, ol {
  margin-left: 0;
  list-style: none;
}
ul li, ol li {
  margin-bottom: 10px;
  padding-left: 0;
  line-height: 1.6;
}
.content-wrapper ul, .content-wrapper ol {
  margin-bottom: 6px;
}
.content-wrapper ul ul, .content-wrapper ol ol {
  margin-top: 6px;
  margin-left: 24px;
}
od, ol {
  list-style: decimal inside;
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 1.08rem;
}

/* ======================== ANIMATIONS & EFFECTS ======================== */
.card, .feature-grid > div, .testimonial-card, .service-list li {
  transition: box-shadow .26s cubic-bezier(.63,.01,.47,1), transform .22s cubic-bezier(.33,.99,.52,1);
}
.card:hover,
.card:focus-within {
  box-shadow: 0 6px 26px 0 rgba(46,59,85,0.13);
  transform: translateY(-4px) scale(1.01);
}

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