/* Optimierte Schriftarten für maximale Kundenfreundlichkeit */
/* Open Sans von Google Fonts - wissenschaftlich bewiesene beste Wahl für Lesbarkeit */

@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,300;1,400;1,500;1,600;1,700;1,800&display=swap');

/* Basis-Schriftart für den gesamten Body */
body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px; /* Mindestgröße für optimale Lesbarkeit */
    line-height: 1.6; /* Optimaler Zeilenabstand für Lesbarkeit */
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Überschriften-Hierarchie */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-weight: 600; /* Semi-bold für bessere Lesbarkeit */
    line-height: 1.3; /* Engerer Zeilenabstand für Überschriften */
    margin-bottom: 0.5em;
}

h1, .h1 {
    font-size: 2.5rem; /* 40px bei 16px Basis */
    font-weight: 700; /* Bold für H1 */
}

h2, .h2 {
    font-size: 2rem; /* 32px bei 16px Basis */
    font-weight: 600;
}

h3, .h3 {
    font-size: 1.5rem; /* 24px bei 16px Basis */
    font-weight: 600;
}

h4, .h4 {
    font-size: 1.25rem; /* 20px bei 16px Basis */
    font-weight: 600;
}

h5, .h5 {
    font-size: 1.125rem; /* 18px bei 16px Basis */
    font-weight: 500;
}

h6, .h6 {
    font-size: 1rem; /* 16px bei 16px Basis */
    font-weight: 500;
}

/* Paragraph und Text-Elemente */
p, .text-body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    font-weight: 400;
    margin-bottom: 1em;
}

/* Links */
a {
    font-family: inherit;
    font-weight: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    text-decoration: underline;
}

/* Buttons */
.btn, button, input[type="submit"], input[type="button"] {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px; /* Mindestgröße für Touch-Freundlichkeit */
    font-weight: 500;
    line-height: 1.4;
    padding: 12px 24px; /* Mindestens 44px Höhe für Touch */
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Navigation */
.nav, .navbar, .menu {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    font-weight: 500;
}

/* Listen */
ul, ol, li {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

/* Formulare */
input, textarea, select {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px; /* Verhindert Zoom auf iOS */
    line-height: 1.4;
}

/* Tabellen */
table, th, td {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.4;
}

/* Mobile Optimierungen */
@media (max-width: 768px) {
    body {
        font-size: 18px; /* 20% größer für Mobile */
    }
    
    h1, .h1 {
        font-size: 2.25rem; /* Etwas kleiner auf Mobile */
    }
    
    h2, .h2 {
        font-size: 1.875rem;
    }
    
    h3, .h3 {
        font-size: 1.5rem;
    }
    
    p, .text-body {
        font-size: 18px; /* Größer für bessere Lesbarkeit auf Mobile */
    }
    
    .btn, button, input[type="submit"], input[type="button"] {
        font-size: 18px; /* Größer für Touch-Freundlichkeit */
        padding: 14px 28px; /* Größere Touch-Targets */
        min-height: 44px; /* iOS Empfehlung für Touch-Targets */
    }
    
    input, textarea, select {
        font-size: 18px; /* Verhindert Zoom auf iOS */
    }
}

/* Kleine Mobile Geräte */
@media (max-width: 480px) {
    body {
        font-size: 18px;
    }
    
    h1, .h1 {
        font-size: 2rem;
    }
    
    h2, .h2 {
        font-size: 1.75rem;
    }
}

/* Hochauflösende Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Fallback für ältere Browser ohne Google Fonts */
@supports not (font-display: swap) {
    body, h1, h2, h3, h4, h5, h6, p, a, button, input, textarea {
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    }
}

/* Accessibility: Respektiere Nutzer-Präferenzen für reduzierte Bewegung */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print-Styles */
@media print {
    body {
        font-family: 'Open Sans', Georgia, 'Times New Roman', serif;
        font-size: 12pt;
        line-height: 1.4;
        color: #000;
    }
    
    h1, h2, h3, h4, h5, h6 {
        font-family: 'Open Sans', Georgia, 'Times New Roman', serif;
        color: #000;
    }
}

