/* Shared styles for all pages */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Bundessans Web', -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background: #f5f5f5;
    min-height: 100vh;
}

/* Header & Navigation */
.site-header {
    background: #003057;
    color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-top {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-top {
        max-width: 1200px;
        margin: 0 auto;
        padding: 25px 30px;
        display: flex;
        justify-content: flex-start;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .header-logo {
        height: 150px;
        width: auto;
        background: white;
        padding: 15px;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }

    .logo-container .subtitle {
        font-size: 0.9rem;
        color: #b8dae9;
        font-weight: 500;
        text-align: left;
}

.main-nav {
    background: #004d7a;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
}

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

.main-nav li a {
    display: block;
    padding: 15px 25px;
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: background 0.2s;
    border-bottom: 3px solid transparent;
}

.main-nav li a:hover,
.main-nav li a.active {
    background: rgba(255,255,255,0.1);
    border-bottom-color: #00a8e1;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    padding: 10px;
    cursor: pointer;
    z-index: 1000;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Main Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 30px;
}

.page-header {
    background: white;
    border-left: 5px solid #003057;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.page-header h2 {
    color: #003057;
    margin-bottom: 10px;
    font-size: 1.8rem;
    font-weight: 600;
}

.card {
    background: white;
    padding: 40px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.card h3 {
    color: #003057;
    font-weight: 600;
    margin-bottom: 15px;
}

.card p {
    margin-bottom: 0;
}

.card p + p {
    margin-top: 15px;
}

/* Form Styles */
form {
    display: grid;
    gap: 20px;
}

/* Custom Autocomplete */
.autocomplete-wrapper {
    position: relative;
    width: 100%;
}

.autocomplete-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 250px;
    overflow-y: auto;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 1000;
    display: none;
}

.autocomplete-suggestions.active {
    display: block;
}

.autocomplete-suggestion {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.95rem;
}

.autocomplete-suggestion:hover,
.autocomplete-suggestion.selected {
    background: #f0f8ff;
    color: #003057;
}

.autocomplete-suggestion:last-child {
    border-bottom: none;
}

.form-group {
    display: flex;
    flex-direction: column;
}

label {
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95rem;
}

label .required {
    color: #e74c3c;
}

input[type="text"],
select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s, box-shadow 0.3s;
}

input[type="text"]:focus,
select:focus {
    outline: none;
    border-color: #004d7a;
    box-shadow: 0 0 0 3px rgba(0, 77, 122, 0.1);
}

button[type="submit"] {
    background: linear-gradient(135deg, #003057 0%, #004d7a 100%);
    color: white;
    border: none;
    padding: 16px 32px;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 10px rgba(0,48,87,0.2);
}

button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,48,87,0.3);
}

button[type="submit"]:active {
    transform: translateY(0);
}

button[type="submit"]:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Loading Spinner */
.loading {
    display: none;
    text-align: center;
    padding: 40px;
}

.loading.active {
    display: block;
}

.spinner {
    border: 4px solid rgba(0,48,87,0.1);
    border-top: 4px solid #003057;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Result Section */
#result {
    display: none;
}

.risk-meters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 30px;
}

.risk-meter {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.risk-meter h3 {
    font-size: 1rem;
    margin-bottom: 15px;
    color: #003057;
}

.risk-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #003057;
    margin-bottom: 10px;
}

.risk-bar {
    height: 12px;
    background: #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
}

.risk-bar-fill {
    height: 100%;
    transition: width 1s ease;
    border-radius: 6px;
}

.risk-bar-fill.risk-low {
    background: linear-gradient(90deg, #28a745, #85c440, #ffc107);
}

.risk-bar-fill.risk-medium {
    background: linear-gradient(90deg, #ffc107, #ffb347, #ff8c00);
}

.risk-bar-fill.risk-high {
    background: linear-gradient(90deg, #ff8c00, #e74c3c, #dc3545);
}

.explanation {
    background: #f0f8ff;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #004d7a;
    margin-bottom: 25px;
}

.explanation strong {
    color: #003057;
    font-size: 1.05rem;
}

.suggestions {
    margin-top: 25px;
}

.suggestions ul {
    list-style: none;
    padding: 0;
}

.suggestions li {
    background: #f8f9fa;
    padding: 12px 18px;
    margin-bottom: 10px;
    border-radius: 6px;
    border-left: 4px solid #00a8e1;
}

.cache-info {
    font-size: 0.85rem;
    color: #666;
    background: #fff9e6;
    padding: 12px;
    border-radius: 6px;
    margin-top: 20px;
    border: 1px solid #ffe69c;
}

.error {
    background: #fee;
    color: #c33;
    padding: 15px 20px;
    border-radius: 6px;
    border-left: 4px solid #c33;
    margin-top: 20px;
}

.disclaimer {
    background: #fff3cd;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #ffc107;
    font-size: 0.9rem;
    color: #856404;
    margin-top: 30px;
}

.intro {
    background: #e8f4f8;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    border-left: 4px solid #00a8e1;
}

/* Mode Switch */
.mode-switch-container {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.mode-btn {
    flex: 1;
    padding: 15px 25px;
    background: #f5f5f5;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
}

.mode-btn:hover {
    background: #e8f4f8;
    border-color: #00a8e1;
    color: #003057;
}

.mode-btn.active {
    background: linear-gradient(135deg, #003057 0%, #004d7a 100%);
    border-color: #003057;
    color: white;
    box-shadow: 0 4px 10px rgba(0,48,87,0.2);
}

/* Footer */
.site-footer {
    background: #1a1a1a;
    color: #ccc;
    margin-top: 60px;
    padding: 40px 0 20px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h4 {
    color: white;
    font-size: 1rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.footer-section p {
    font-size: 0.9rem;
    line-height: 1.7;
    color: #aaa;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 20px;
    text-align: center;
    font-size: 0.85rem;
    color: #888;
}

/* Responsive */
@media (max-width: 768px) {
    .risk-meters {
        grid-template-columns: 1fr;
    }

    .header-top {
        padding: 15px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        position: relative;
    }

    .logo-container {
        flex: 1;
    }

    .header-logo {
        height: 60px;
        padding: 10px;
    }

    .logo-container .subtitle {
        font-size: 0.75rem;
    }

    /* Burger Menu anzeigen */
    .mobile-menu-toggle {
        display: flex;
        position: fixed;
        top: 20px;
        right: 20px;
        z-index: 1001;
        background: rgba(0, 48, 87, 0.9);
        padding: 12px;
        border-radius: 6px;
    }

    /* Navigation verstecken bis Toggle */
    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: #003057;
        transition: right 0.3s ease;
        z-index: 999;
        box-shadow: -2px 0 10px rgba(0,0,0,0.3);
    }

    .main-nav.mobile-open {
        right: 0;
    }

    .nav-container {
        padding: 80px 20px 20px;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0;
    }

    .main-nav li a {
        padding: 15px 20px;
        border-left: 3px solid transparent;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        display: block;
    }

    .main-nav li a:hover,
    .main-nav li a.active {
        border-left-color: #00a8e1;
        background: rgba(255,255,255,0.1);
    }

    /* Mode Switch Buttons */
    .mode-switch-container {
        flex-direction: column;
        gap: 10px;
    }

    .mode-btn {
        width: 100%;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .card {
        padding: 25px;
    }

    .container {
        padding: 20px 15px;
    }

    .nav-container,
    .header-top,
    .footer-content {
        padding-left: 15px;
        padding-right: 15px;
    }
}
