/* 1. Farbvariablen */
:root {
  --color-primary: #015799;
  --color-accent: #018ABE;
  --color-bg: #F9FBFD;           /* Bläulicher Hintergrund */
  --color-bg-accent: #E6EEF3;
  --color-bg-light: #fff;        /* Kacheln weiß */
  --color-text: #1A1A1A;
  --color-error: #D32F2F;
  --color-success: #388E3C;
}

/* Darkmode-Varianten */
body.darkmode {
  --color-primary: #4CA7D4;
  --color-accent: #66C3E1;
  --color-bg: #0D1117;
  --color-bg-accent: #1E2A36;
  --color-bg-light: #23272f;     /* Kacheln dunkelgrau im Darkmode */
  --color-text: #E6F1F6;
  --color-error: #EF5350;
  --color-success: #81C784;
}

/* Optional: Automatisch Darkmode nach System */
@media (prefers-color-scheme: dark) {
  :root:not(.darkmode) {
  --color-primary: #4CA7D4;
  --color-accent: #66C3E1;
  --color-bg: #0D1117;
  --color-bg-accent: #1E2A36;
  --color-bg-light: #23272f;
  --color-text: #E6F1F6;
  --color-error: #EF5350;
  --color-success: #81C784;
  }
}

/* In allgemein.css ergänzen */
html.darkmode body,
body.darkmode {
  /* ...Darkmode-Variablen... */
}

/* 2. Schriftarten */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/css/fonts/inter-v18-latin-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/css/fonts/inter-v18-latin-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/css/fonts/inter-v18-latin-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/css/fonts/inter-v18-latin-700.woff2') format('woff2');
}

body {
  font-family: 'Inter', Arial, sans-serif;
  font-size: 1rem;
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

/* Füge diese Zeile direkt nach den :root Variablen hinzu */
html {
  background: var(--color-bg);
}

/* 3. Box-Sizing & Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* 4. Überschriften */
h1, h2, h3, h4, h5, h6 {
  color: var(--color-primary);
  font-family: inherit;
  font-weight: 700;
  margin-bottom: 1rem;
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.18s;
}
a:hover, a:focus {
  color: var(--color-accent);
  text-decoration: underline;
}

/* 5. Buttons (Basis) */
button, .btn {
  font-family: inherit;
  font-size: 1rem;
  border-radius: 8px;
  border: none;
  padding: 0.7rem 1.2rem;
  background: var(--color-primary);
  color: #fff;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
  text-decoration: none; /* Keine Unterstreichung */
}
button:hover, .btn:hover {
  background: #1976b3; /* etwas heller als --color-primary, aber immer noch blau */
  color: #fff;
}
button i, .btn i {
  color: inherit;
  transition: color 0.18s;
}

/* 6. Utility-Klassen */
.text-center { text-align: center; }
.hidden { display: none !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }

/* Mobile Layout Fixes - hinzufügen am Ende der Datei */
@media (max-width: 900px) {
  /* Grundlegendes Layout-Fix für mobile Ansicht */
  html, body {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    /* Anti-Zoom-Eigenschaften */
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    touch-action: manipulation;
    position: relative;
  }
  
  body {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    touch-action: manipulation;
  }
  
  /* Allow text selection for content areas */
  p, .card-desc, .dashboard-card, .services-card, 
  input, textarea, [contenteditable], .news-description {
    -webkit-user-select: text;
    -khtml-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
  }
  
  /* Verbesserte Container-Ausrichtung */
  .main-content {
    padding-left: 0 !important;
    padding-right: 0 !important;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
  }
  
  /* Karten und andere Elemente an die volle Breite anpassen */
  [class*="-card"],
  .card,
  .container,
  .content-section {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
    overflow-x: hidden;
  }
  
  /* Verbesserte Textumbruch-Eigenschaften */
  * {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }
}

/* Desktop-only elements */
@media (min-width: 901px) {
    .desktop-only {
        display: block !important;
    }
}

@media (max-width: 900px) {
    .desktop-only {
        display: none !important;
    }
}