/* =============================================
   GLOBAL CSS - Finanzaufsteiger Müller
   Design System, Reset, Typografie, Utilities
   ============================================= */

/* --- CSS Custom Properties (Design Tokens) --- */
:root {
  /* Brand Colors */
  --green-dark: #1a4636;
  --green-mid: #245e48;
  --green-light: #2d7a5e;
  --green-pale: #e8f0ed;
  --copper: #d49a4e;
  --copper-light: #e0b474;
  --copper-dark: #9a5c24;

  /* Neutrals */
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-tertiary: #f0f2f1;
  --text-primary: #1a1a1a;
  --text-secondary: #555555;
  --text-light: #888888;
  --border-color: #e5e7eb;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(26, 70, 54, 0.04);
  --shadow-md: 0 2px 20px rgba(26, 70, 54, 0.06);
  --shadow-lg: 0 8px 40px rgba(26, 70, 54, 0.1);
  --shadow-hover: 0 12px 48px rgba(26, 70, 54, 0.12);

  /* Layout */
  --container-max: 1200px;
  --container-padding: 2rem;
  --nav-height: 72px;
  --footer-height: 64px;
  --border-radius: 12px;
  --border-radius-sm: 8px;
  --border-radius-lg: 16px;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* Typography */
  --font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-size-xs: clamp(0.75rem, 1.2vw, 0.8rem);
  --font-size-sm: clamp(0.85rem, 1.4vw, 0.9rem);
  --font-size-base: clamp(0.95rem, 1.6vw, 1rem);
  --font-size-lg: clamp(1.1rem, 2vw, 1.25rem);
  --font-size-xl: clamp(1.4rem, 2.5vw, 1.75rem);
  --font-size-2xl: clamp(1.8rem, 3.5vw, 2.5rem);
  --font-size-3xl: clamp(2.2rem, 4.5vw, 3.25rem);
}

/* --- Reset --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: var(--footer-height);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-wrap: break-word;
}

main {
  flex: 1;
}

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

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

a:hover {
  color: var(--copper);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 2px;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
}

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--green-dark);
  line-height: 1.2;
  font-weight: 700;
}

h1 { font-size: var(--font-size-3xl); }
h2 { font-size: var(--font-size-2xl); }
h3 { font-size: var(--font-size-xl); }
h4 { font-size: var(--font-size-lg); }

p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

p:last-child {
  margin-bottom: 0;
}

/* --- Utility Classes --- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.section {
  padding: 5rem 0;
}

.section-alt {
  background-color: var(--bg-secondary);
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  margin-bottom: 0.75rem;
}

.section-header p {
  font-size: var(--font-size-lg);
  max-width: 600px;
  margin: 0 auto;
}

.text-center { text-align: center; }
.text-copper { color: var(--copper); }
.text-green { color: var(--green-dark); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: var(--border-radius-sm);
  font-weight: 600;
  font-size: var(--font-size-base);
  text-decoration: none;
  transition: all var(--transition-base);
  white-space: nowrap;
}

.btn-primary {
  background: var(--copper);
  color: #fff;
}

.btn-primary:hover {
  background: var(--copper-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: var(--green-dark);
  color: #fff;
}

.btn-secondary:hover {
  background: var(--green-mid);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-outline {
  border: 2px solid var(--green-dark);
  color: var(--green-dark);
  background: transparent;
}

.btn-outline:hover {
  background: var(--green-dark);
  color: #fff;
  transform: translateY(-2px);
}

/* Cards */
.card {
  background: var(--bg-primary);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  padding: 2rem;
  transition: all var(--transition-base);
}

.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --- Responsive --- */
@media (max-width: 767px) {
  :root {
    --container-padding: 1rem;
    --nav-height: 60px;
  }

  .section {
    padding: 3rem 0;
  }

  .section-header {
    margin-bottom: 2rem;
  }
}

@media (min-width: 768px) and (max-width: 1199px) {
  :root {
    --container-padding: 1.5rem;
  }
}

/* --- Page Header (Unterseiten) --- */
.page-header {
  margin-top: var(--nav-height);
  padding: 3.5rem 0 3rem;
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-mid) 100%);
  color: #fff;
}
.page-header h1 {
  color: #fff;
  margin-bottom: 0.5rem;
}
.page-header__sub {
  color: rgba(255, 255, 255, 0.8);
  font-size: var(--font-size-lg);
}

/* Page Header mit CTA (Beratungsleistungen) */
.page-header--cta .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
}
.page-header__left {
  flex: 1;
}
.page-header__right {
  flex: 0 0 auto;
  max-width: 380px;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--border-radius);
  padding: 2rem;
}
.page-header__right h2 {
  color: #fff;
  font-size: var(--font-size-lg);
  margin-bottom: 0.5rem;
}
.page-header__right p {
  color: rgba(255, 255, 255, 0.8);
  font-size: var(--font-size-sm);
  margin-bottom: 1.25rem;
  line-height: 1.6;
}
.page-header__right .btn-primary {
  width: 100%;
  text-align: center;
}
/* Page Header mit Hintergrundbild */
.page-header--hero {
  padding: 5rem 0 4rem;
  background-size: cover;
  background-position: center;
}

@media (max-width: 767px) {
  .page-header--cta .container {
    flex-direction: column;
    gap: 1.5rem;
  }
  .page-header__right {
    max-width: 100%;
    width: 100%;
  }
}
@media (min-width: 768px) and (max-width: 1199px) {
  .page-header__right {
    max-width: 320px;
    padding: 1.5rem;
  }
}

/* --- FAQ Accordion --- */
.faq-item {
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  margin-bottom: 1rem;
  overflow: hidden;
  transition: box-shadow var(--transition-base);
}
.faq-item:hover {
  box-shadow: var(--shadow-md);
}
.faq-item summary {
  padding: 1.25rem 1.5rem;
  font-weight: 600;
  font-size: var(--font-size-lg);
  color: var(--green-dark);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: background var(--transition-fast);
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary::after {
  content: '+';
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--copper);
  transition: transform var(--transition-base);
  flex-shrink: 0;
}
.faq-item[open] summary::after {
  content: '\2212';
}
.faq-item summary:hover {
  background: var(--green-pale);
}
.faq-item .faq-answer {
  padding: 0 1.5rem 1.25rem;
  color: var(--text-secondary);
  line-height: 1.7;
}
.faq-item .faq-answer p {
  margin-bottom: 0.75rem;
}

/* --- Legal Pages (Impressum, AGB) --- */
.legal-content h2 {
  font-size: var(--font-size-xl);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}
.legal-content h2:first-child {
  margin-top: 0;
}
.legal-content h3 {
  font-size: var(--font-size-lg);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}
.legal-content p {
  margin-bottom: 1rem;
  line-height: 1.7;
}
.legal-content ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}
.legal-content ul li {
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  line-height: 1.6;
}
.legal-content a {
  text-decoration: underline;
}
.legal-content .placeholder-notice {
  background: var(--bg-tertiary);
  border-left: 4px solid var(--copper);
  padding: 1rem 1.5rem;
  margin-bottom: 2rem;
  border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
  color: var(--text-secondary);
  font-style: italic;
}

/* --- About Page --- */
.about-intro {
  font-size: var(--font-size-lg);
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}
.about-values {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}
.about-value-card {
  background: var(--bg-primary);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  padding: 2rem;
  border-top: 3px solid var(--copper);
}
.about-value-card h3 {
  margin-bottom: 0.75rem;
}
.about-qualifications ul {
  list-style: none;
  padding: 0;
}
.about-qualifications li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding-left: 1.5rem;
  position: relative;
}
.about-qualifications li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: var(--copper);
  font-weight: 700;
}

/* --- Service Pages (Beratungsleistungen) --- */
.service-intro {
  font-size: var(--font-size-lg);
  line-height: 1.8;
  color: var(--text-secondary);
  max-width: 800px;
  margin-bottom: 3rem;
}
.service-benefits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}
.service-benefit {
  background: var(--bg-primary);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  padding: 2rem;
  border-top: 3px solid var(--copper);
  transition: all var(--transition-base);
}
.service-benefit:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}
.service-benefit h3 {
  margin-bottom: 0.75rem;
  font-size: var(--font-size-lg);
}
.service-benefit p {
  color: var(--text-secondary);
  line-height: 1.7;
}
.service-why {
  background: var(--bg-secondary);
  border-radius: var(--border-radius);
  padding: 2.5rem;
  margin-bottom: 3rem;
}
.service-why h2 {
  margin-bottom: 1rem;
}
.service-why ul {
  list-style: none;
  padding: 0;
}
.service-why li {
  padding: 0.6rem 0;
  padding-left: 1.5rem;
  position: relative;
  color: var(--text-secondary);
  line-height: 1.7;
}
.service-why li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: var(--copper);
  font-weight: 700;
}
.service-cta {
  text-align: center;
  padding: 3rem;
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-mid) 100%);
  border-radius: var(--border-radius-lg);
  color: #fff;
}
.service-cta h2 {
  color: #fff;
  margin-bottom: 1rem;
}
.service-cta p {
  color: rgba(255, 255, 255, 0.85);
  font-size: var(--font-size-lg);
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
.service-cta .btn-primary {
  font-size: var(--font-size-lg);
  padding: 1rem 2.5rem;
}

/* --- 404 Page --- */
.error-page {
  margin-top: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--nav-height) - var(--footer-height));
  text-align: center;
  padding: 2rem;
}
.error-page__code {
  font-size: clamp(5rem, 15vw, 10rem);
  font-weight: 800;
  color: var(--green-pale);
  line-height: 1;
  margin-bottom: 1rem;
}
.error-page h1 {
  margin-bottom: 1rem;
}
.error-page p {
  font-size: var(--font-size-lg);
  margin-bottom: 2rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}
