/**
 * Ready4Rescue - Stylesheet
 * Lernportal für Hessen-Algorithmen im Rettungsdienst
 */

/* ========================================
   CSS Reset & Grundeinstellungen
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #c41e3a;
    --primary-dark: #8b0000;
    --secondary-color: #2c3e50;
    --accent-color: #e74c3c;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --error-color: #c0392b;
    --light-bg: #f8f9fa;
    --white: #ffffff;
    --text-color: #333333;
    --text-light: #666666;
    --border-color: #dee2e6;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --radius: 8px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ========================================
   Header & Navigation
   ======================================== */
header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    padding: 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-section img {
    height: 50px;
    width: auto;
}

.logo-section h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

.logo-section a {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: var(--white);
}

/* Navigation */
nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

nav a {
    color: var(--white);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    transition: background 0.3s ease;
}

nav a:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Landkreis Dropdown */
.dropdown {
    position: relative;
}

.dropdown-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dropdown-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    min-width: 280px;
    box-shadow: var(--shadow);
    border-radius: var(--radius);
    z-index: 1001;
    max-height: 400px;
    overflow-y: auto;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-section {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.dropdown-section:last-child {
    border-bottom: none;
}

.dropdown-section h4 {
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dropdown-content a {
    display: block;
    color: var(--text-color);
    padding: 0.5rem 1rem 0.5rem 1.5rem;
    text-decoration: none;
    font-size: 0.95rem;
}

.dropdown-content a:hover {
    background: var(--light-bg);
    color: var(--primary-color);
}

/* User Section */
.user-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.guest-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
}

.btn {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
}

.btn-primary {
    background: var(--white);
    color: var(--primary-color);
}

.btn-primary:hover {
    background: var(--light-bg);
    transform: translateY(-1px);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 1px solid var(--white);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--primary-color);
}

.btn-success {
    background: var(--success-color);
    color: var(--white);
}

.btn-success:hover {
    background: #219a52;
}

.btn-large {
    padding: 0.8rem 2rem;
    font-size: 1.1rem;
}

/* ========================================
   Main Content
   ======================================== */
main {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

/* Hero Section (Startseite) */
.hero {
    text-align: center;
    padding: 3rem 1rem;
}

.hero-image {
    max-width: 500px;
    width: 100%;
    margin: 0 auto 2rem;
}

.hero-image img {
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.hero h2 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-size: 2rem;
}

.hero-info {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    max-width: 700px;
    margin: 2rem auto;
}

.hero-info p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

.hero-info .highlight {
    background: linear-gradient(135deg, var(--success-color), #2ecc71);
    color: var(--white);
    padding: 1rem;
    border-radius: var(--radius);
    margin-top: 1rem;
}

.hero-info .highlight strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

/* ========================================
   Cards & Content Boxes
   ======================================== */
.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--light-bg);
}

/* ========================================
   Forms
   ======================================== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.form-group input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-container {
    max-width: 450px;
    margin: 2rem auto;
}

.form-container h2 {
    text-align: center;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

.form-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.form-footer a {
    color: var(--primary-color);
    text-decoration: none;
}

.form-footer a:hover {
    text-decoration: underline;
}

/* Alert Messages */
.alert {
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

/* ========================================
   Quiz Styles
   ======================================== */
.quiz-container {
    max-width: 800px;
    margin: 0 auto;
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.quiz-progress {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.progress-bar {
    width: 200px;
    height: 10px;
    background: var(--light-bg);
    border-radius: 5px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transition: width 0.3s ease;
}

.quiz-score {
    font-weight: 600;
    color: var(--secondary-color);
}

.question-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.question-number {
    color: var(--primary-color);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.question-text {
    font-size: 1.3rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.answers-list {
    list-style: none;
}

.answer-option {
    margin-bottom: 0.8rem;
}

.answer-option label {
    display: flex;
    align-items: center;
    padding: 1rem 1.2rem;
    background: var(--light-bg);
    border: 2px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s ease;
}

.answer-option label:hover {
    background: #e9ecef;
    border-color: var(--primary-color);
}

.answer-option input[type="radio"] {
    margin-right: 1rem;
    width: 20px;
    height: 20px;
    accent-color: var(--primary-color);
}

.answer-option.correct label {
    background: #d4edda;
    border-color: var(--success-color);
}

.answer-option.incorrect label {
    background: #f8d7da;
    border-color: var(--error-color);
}

.answer-option.selected label {
    border-color: var(--primary-color);
    background: #fff5f5;
}

.quiz-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
}

/* Quiz Results */
.quiz-results {
    text-align: center;
    padding: 3rem;
}

.results-score {
    font-size: 4rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.results-text {
    font-size: 1.3rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.results-details {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin: 2rem 0;
}

.result-item {
    text-align: center;
}

.result-item .number {
    font-size: 2rem;
    font-weight: 700;
}

.result-item .label {
    color: var(--text-light);
    font-size: 0.9rem;
}

.result-item.correct .number {
    color: var(--success-color);
}

.result-item.incorrect .number {
    color: var(--error-color);
}

/* ========================================
   Landkreis Page
   ======================================== */
.landkreis-header {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, var(--secondary-color), #34495e);
    color: var(--white);
    border-radius: var(--radius);
    margin-bottom: 2rem;
}

.landkreis-header h2 {
    margin-bottom: 0.5rem;
}

.no-algorithms {
    text-align: center;
    padding: 3rem;
}

.no-algorithms p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

/* ========================================
   Footer
   ======================================== */
footer {
    background: var(--secondary-color);
    color: var(--white);
    padding: 1.5rem 2rem;
    margin-top: auto;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    margin-right: 2rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--white);
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* ========================================
   Legal Pages (Impressum, Datenschutz)
   ======================================== */
.legal-content {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.legal-content h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--light-bg);
}

.legal-content h3 {
    color: var(--secondary-color);
    margin: 1.5rem 0 0.8rem;
}

.legal-content p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

.legal-content ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.legal-content li {
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }

    nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .user-section {
        flex-wrap: wrap;
        justify-content: center;
    }

    .dropdown-content {
        position: fixed;
        left: 50%;
        transform: translateX(-50%);
        width: 90%;
        max-width: 350px;
    }

    main {
        padding: 1rem;
    }

    .hero h2 {
        font-size: 1.5rem;
    }

    .quiz-header {
        flex-direction: column;
        gap: 1rem;
    }

    .results-details {
        flex-direction: column;
        gap: 1rem;
    }

    .footer-container {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        margin-bottom: 1rem;
    }

    .footer-links a {
        display: block;
        margin: 0.5rem 0;
    }
}

@media (max-width: 480px) {
    .logo-section h1 {
        font-size: 1.2rem;
    }

    .logo-section img {
        height: 40px;
    }

    .question-text {
        font-size: 1.1rem;
    }

    .results-score {
        font-size: 3rem;
    }
}
