/* Moderne Resets & Variablen */
:root {
    --bg-dark: #0b0f19;
    --bg-card: #151d30;
    --border: #222f47;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --accent: #06b6d4;      /* Cyan */
    --success: #10b981;     /* Grün */
    --warning: #f59e0b;     /* Orange */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.5;
}

/* Fluid Layout Grid */
.app-container {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 100vh;
}

/* Desktop-Anpassung ab 768px */
@media (min-width: 768px) {
    .app-container {
        grid-template-columns: 280px 1fr;
    }
}

/* Sidebar Navigation */
.sidebar {
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

@media (min-width: 768px) {
    .sidebar {
        border-bottom: none;
        border-right: 1px solid var(--border);
        position: sticky;
        top: 0;
        height: 100vh;
    }
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

@media (min-width: 768px) {
    .nav-menu {
        flex-direction: column;
    }
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.nav-link:hover, .nav-link.active {
    background-color: var(--border);
    color: var(--text-main);
}

.special-link {
    color: var(--accent);
    font-weight: 600;
}

/* Hauptinhaltsbereich */
.content-area {
    padding: 20px;
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

@media (min-width: 768px) {
    .content-area {
        padding: 40px;
    }
}

.main-header {
    margin-bottom: 20px;
}

.main-header h1 {
    font-size: clamp(2rem, 5vw, 3rem); /* Flüssige Schriftgröße */
    color: #fff;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
}

/* Inhalts-Karten */
.content-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 25px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.content-card:hover {
    border-color: #33476a;
}

.badge {
    display: inline-block;
    padding: 4px 8px;
    background-color: rgba(6, 182, 212, 0.1);
    color: var(--accent);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.badge.warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.content-card h2 {
    font-size: 1.6rem;
    margin-bottom: 15px;
    color: #fff;
}

.lead-text {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* Listen-Styling */
.point-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.point-list li {
    position: relative;
    padding-left: 25px;
}

.point-list li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--accent);
}

.point-list strong {
    color: var(--text-main);
}

/* Quiz-Elemente */
.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

@media (min-width: 576px) {
    .quiz-options {
        flex-direction: row;
    }
}

.quiz-btn {
    flex: 1;
    background-color: var(--border);
    color: var(--text-main);
    border: 1px solid transparent;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.quiz-btn:hover {
    background-color: #2e3f5f;
}

.feedback-box {
    padding: 12px;
    border-radius: 6px;
    font-weight: 600;
    display: none;
}

/* Sidebar-Footer Positionierung */
.sidebar-footer {
    margin-top: auto; /* Schiebt den Footer auf Desktop ganz nach unten */
    padding-top: 20px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 15px;
}

/* Verhalten auf Smartphones und Tablets */
@media (max-width: 767px) {
    .sidebar {
        gap: 15px;
    }
    .sidebar-footer {
        margin-top: 10px;
        padding-top: 10px;
        width: 100%;
        justify-content: center; /* Zentriert die Links auf Mobilgeräten */
    }
}

/* Styling der Links */
.footer-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.8rem;
    transition: color 0.2s ease;
}

.footer-copyright {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.8rem;
    transition: color 0.2s ease;
}


.footer-link:hover {
    color: var(--accent);
}

.point-list a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px dashed rgba(6, 182, 212, 0.4);
    transition: color 0.2s ease, border-color 0.2s ease;
}

.point-list a:hover {
    color: var(--text-main);
    border-bottom-color: var(--text-main);
}

.footer-link.active {
    color: var(--text-main);
    font-weight: 600;
}

.cookie-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 0.9rem;
    background-color: rgba(11, 15, 25, 0.6);
    border-radius: 8px;
    overflow: hidden;
}

.cookie-table th, .cookie-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.cookie-table th {
    background-color: var(--border);
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.cookie-table tr:last-child td {
    border-bottom: none;
}

.cookie-table td {
    color: var(--text-muted);
    vertical-align: top;
    line-height: 1.4;
}

.quiz-next-action {
    display: inline-block;
    margin-top: 20px;
    background-color: var(--border);
    color: var(--text-main);
    border: 1px solid transparent;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.quiz-next-action:hover {
    background-color: #2e3f5f;
    border-color: var(--accent);
}

.quiz-next-action:active {
    transform: scale(0.98);
}

.photo-card-dynamic {
    display: block;
    width: 100%; 
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    border: 1px solid var(--border);
    filter: drop-shadow(0 4px 20px rgba(11, 15, 25, 0.8)) brightness(0.9);
    transition: all 0.3s ease;
}

.photo-card-dynamic:hover {
    filter: drop-shadow(0 8px 30px rgba(6, 182, 212, 0.25)) brightness(1);
    border-color: var(--accent);
}


/* DESKTOP-STEUERUNG (Ab 768px): Sicherer und bewährter Attribut-Abgleich */
@media (min-width: 768px) {
    /* Das CSS prüft die nackte Zahl aus dem HTML und weist die feste Prozentbreite zu */
    .photo-card-dynamic[data-raw-width="20"] { width: 20%; }
    .photo-card-dynamic[data-raw-width="25"] { width: 25%; }
    .photo-card-dynamic[data-raw-width="30"] { width: 30%; }
    .photo-card-dynamic[data-raw-width="40"] { width: 40%; }
    .photo-card-dynamic[data-raw-width="50"] { width: 50%; }
    .photo-card-dynamic[data-raw-width="100"] { width: 100%; }
}
/* DESKTOP-STEUERUNG (Ab 768px): Die rohe Zahl wird nativ in % umgerechnet */
/*@media (min-width: 768px) {
    .photo-card-dynamic[data-raw-width] {
        width: calc(attr(data-raw-width <number>, 100) * 1%);
    }
} klappt erst in Zukunft wahrscheinlich*/

.desc-image-container, .point-image-container {
    width: 100%;
    display: flex;
    justify-content: flex-start;
}

.desc-image-container.top, .point-image-container.top {
    margin-bottom: 1rem;
}

.desc-image-container.bottom, .point-image-container.bottom {
    margin-top: 1rem;
}