/* =========================================================
   FinanzLernKompass — Stylesheet
   Color scheme: deep navy, forest green, white, muted gold
   ========================================================= */

:root {
  --color-navy: #10243e;
  --color-navy-dark: #0a1930;
  --color-green: #1f5c45;
  --color-green-dark: #163f30;
  --color-gold: #b9974a;
  --color-white: #ffffff;
  --color-bg: #f6f7f5;
  --color-text: #1c2530;
  --color-text-muted: #51606f;
  --color-border: #dfe3e6;
  --radius: 8px;
  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
  color: var(--color-text);
  background-color: var(--color-bg);
  background-image: linear-gradient(rgba(246, 247, 245, 0.92), rgba(246, 247, 245, 0.92)),
    url("images/FinanzLernKompass-website-background.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--color-green);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1, h2, h3 {
  color: var(--color-navy);
  margin-top: 0;
  line-height: 1.25;
}

ul {
  padding-left: 1.2rem;
}

.img-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  background-color: #d6d9dd;
  object-fit: cover;
  border-radius: var(--radius);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.75rem 1.6rem;
  border-radius: var(--radius);
  font-weight: 600;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  background-color: var(--color-green);
  color: var(--color-white);
  border-color: var(--color-green);
}

.btn-primary:hover {
  background-color: var(--color-green-dark);
  border-color: var(--color-green-dark);
  text-decoration: none;
}

.btn-outline {
  background-color: transparent;
  color: var(--color-navy);
  border-color: var(--color-navy);
}

.btn-outline:hover {
  background-color: var(--color-navy);
  color: var(--color-white);
  text-decoration: none;
}

.btn-small {
  padding: 0.5rem 1.1rem;
  font-size: 0.9rem;
}

/* ---------- Header ---------- */
.site-header {
  background-color: var(--color-navy);
  position: sticky;
  top: 0;
  z-index: 500;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.5rem;
  position: relative;
}

.logo {
  color: var(--color-white);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 0.3px;
}

.logo:hover {
  text-decoration: none;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 1.6rem;
  margin: 0;
  padding: 0;
}

.main-nav a {
  color: var(--color-white);
  font-weight: 500;
  font-size: 0.97rem;
}

.main-nav a:hover {
  color: var(--color-gold);
  text-decoration: none;
}

.burger-toggle {
  display: none;
}

.burger-label {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 26px;
  height: 20px;
  cursor: pointer;
  z-index: 600;
}

.burger-label span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: var(--color-white);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* ---------- Hero ---------- */
.hero {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 2.5rem;
  padding: 3.5rem 1.5rem;
}

.hero-text {
  flex: 1 1 50%;
}

.hero-media {
  flex: 1 1 50%;
}

.hero-text h1 {
  font-size: 2.3rem;
  margin-bottom: 1rem;
}

.hero-text p {
  color: var(--color-text-muted);
  margin-bottom: 1.6rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ---------- Feature sections ---------- */
.feature-section {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 2.5rem;
  padding: 3.5rem 1.5rem;
}

.feature-section.alt-bg {
  background-color: var(--color-white);
  max-width: 100%;
  justify-content: center;
}

.feature-section .feature-text,
.feature-section .feature-media {
  flex: 1 1 50%;
}

.feature-section.alt-bg .feature-text,
.feature-section.alt-bg .feature-media {
  flex: 0 1 calc(var(--max-width) / 2 - 1.25rem);
  max-width: calc(var(--max-width) / 2 - 1.25rem);
}

.check-list {
  list-style: none;
  padding: 0;
  margin: 1.2rem 0 1.6rem;
}

.check-list li {
  padding-left: 1.6rem;
  position: relative;
  margin-bottom: 0.6rem;
  color: var(--color-text-muted);
}

.check-list li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--color-gold);
  font-weight: 700;
}

/* ---------- Testimonials ---------- */
.testimonials {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3.5rem 1.5rem;
  text-align: center;
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
  margin-top: 2rem;
}

.testimonial-card {
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.8rem 1.4rem;
  text-align: left;
}

.testimonial-text {
  color: var(--color-text-muted);
  font-style: italic;
  margin-bottom: 1rem;
}

.testimonial-author {
  font-weight: 600;
  color: var(--color-navy);
  margin-bottom: 0;
}

/* ---------- Contact form ---------- */
.contact-section {
  max-width: 720px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 4.5rem;
}

.contact-section h2 {
  text-align: center;
}

.contact-intro {
  text-align: center;
  color: var(--color-text-muted);
  margin-bottom: 2rem;
}

.contact-form {
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 2rem;
}

.form-group {
  margin-bottom: 1.2rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 600;
  color: var(--color-navy);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  background-color: var(--color-bg);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: 2px solid var(--color-green);
  outline-offset: 1px;
}

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.form-checkbox input {
  margin-top: 0.3rem;
}

.form-checkbox label {
  font-weight: 400;
  color: var(--color-text-muted);
}

#submit-button {
  width: 100%;
}

.field-error {
  border-color: #b3261e !important;
}

/* ---------- Legal pages ---------- */
.legal-content {
  max-width: 820px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

.legal-content h2 {
  margin-top: 2rem;
  font-size: 1.25rem;
}

.legal-content p,
.legal-content li {
  color: var(--color-text-muted);
}

/* ---------- Footer ---------- */
.site-footer {
  background-color: var(--color-navy-dark);
  color: #c9d2dc;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  padding: 3rem 1.5rem;
}

.footer-logo {
  color: var(--color-white);
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.6rem;
}

.footer-col h3 {
  color: var(--color-white);
  font-size: 1rem;
  margin-bottom: 0.8rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a,
.footer-col a {
  color: #c9d2dc;
}

.footer-links a:hover,
.footer-col a:hover {
  color: var(--color-gold);
}

.footer-bottom {
  border-top: 1px solid #27384d;
  text-align: center;
  padding: 1.2rem 1.5rem;
  font-size: 0.88rem;
  color: #8fa0b2;
}

/* ---------- Cookie banner ---------- */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--color-navy-dark);
  color: var(--color-white);
  z-index: 1000;
  padding: 1.2rem 1.5rem;
  padding-bottom: calc(1.2rem + env(safe-area-inset-bottom, 0px));
  transform: translateY(0);
  transition: transform 0.3s ease;
  max-width: 100vw;
  box-sizing: border-box;
}

.cookie-banner.hidden {
  transform: translateY(110%);
  pointer-events: none;
}

.cookie-banner-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.cookie-banner-inner p {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: #d7dee5;
  overflow-wrap: anywhere;
}

.cookie-banner-inner a {
  color: var(--color-gold);
}

.cookie-actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.cookie-banner .btn-outline {
  color: var(--color-white);
  border-color: rgba(255, 255, 255, 0.85);
}

.cookie-banner .btn-outline:hover {
  background-color: var(--color-white);
  color: var(--color-navy);
  border-color: var(--color-white);
}

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(10, 25, 48, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1100;
  padding: 1rem;
}

.modal-overlay.hidden {
  display: none;
}

.modal-box {
  background-color: var(--color-white);
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 420px;
  width: 100%;
  text-align: center;
}

.modal-box h3 {
  color: var(--color-green);
  margin-bottom: 0.8rem;
}

.modal-box p {
  color: var(--color-text-muted);
  margin-bottom: 1.4rem;
}

/* =========================================================
   Responsive breakpoints
   ========================================================= */

@media (max-width: 900px) {
  .burger-label {
    display: flex;
  }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--color-navy);
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 1.5rem 1rem;
  }

  .main-nav ul li {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .main-nav ul li a {
    display: block;
    padding: 0.8rem 0;
  }

  .burger-toggle:checked ~ .main-nav {
    max-height: 420px;
  }

  .burger-toggle:checked ~ .burger-label span:nth-child(1) {
    transform: translateY(8.5px) rotate(45deg);
  }

  .burger-toggle:checked ~ .burger-label span:nth-child(2) {
    opacity: 0;
  }

  .burger-toggle:checked ~ .burger-label span:nth-child(3) {
    transform: translateY(-8.5px) rotate(-45deg);
  }

  .hero,
  .feature-section,
  .feature-section.alt-bg {
    flex-direction: column;
  }

  .feature-section.alt-bg .feature-text,
  .feature-section.alt-bg .feature-media {
    flex: 1 1 100%;
    max-width: 100%;
  }

  .testimonial-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .cookie-banner {
    padding: 1rem 1.25rem;
    padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  }

  .cookie-banner-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .cookie-banner-inner p {
    flex: none;
    width: 100%;
    font-size: 0.88rem;
  }

  .cookie-actions {
    width: 100%;
    flex-wrap: nowrap;
  }

  .cookie-actions .btn {
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
}

@media (max-width: 600px) {
  .hero-text h1 {
    font-size: 1.8rem;
  }

  .hero,
  .feature-section,
  .testimonials,
  .contact-section {
    padding: 2.4rem 1.2rem;
  }

  .contact-form {
    padding: 1.4rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    text-align: center;
  }

  .cookie-banner {
    padding: 0.85rem 1rem;
    padding-bottom: calc(0.85rem + env(safe-area-inset-bottom, 0px));
  }

  .cookie-banner-inner p {
    font-size: 0.85rem;
  }

  .cookie-actions {
    flex-direction: column;
    gap: 0.65rem;
  }

  .cookie-actions .btn {
    flex: none;
    width: 100%;
  }
}
