/* =========================
   ROOT / VARIABLES
========================= */
:root {
    --primary: #1e3c72;
    --primary-light: #2a5298;
    --accent: #667eea;

    --text-light: #757575;
    --border: #e5e5e5;
    --background-light: #f8f9fa;

    --radius: 10px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);

    --spacing-sm: 0.8rem;
    --spacing-md: 1rem;
    --spacing-lg: 2rem;
}

/* =========================
   RESET
========================= */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* =========================
   BASE
========================= */
body {
    font-family: system-ui, -apple-system, sans-serif;
    line-height: 1.5;
}

/* =========================
   LAYOUT
========================= */
.table-container {
    margin: 3rem 0;
    overflow-x: auto;
}

/* =========================
   TABLE
========================= */
table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

th {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    padding: 1.2rem;
    text-align: left;
    font-weight: 600;
    font-size: 1.05rem;
}

td {
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

tr:last-child td {
    border-bottom: none;
}

/* Hover nur für Geräte mit Maus */
@media (hover: hover) {
    tr:hover {
        background: var(--background-light);
    }
}

/* =========================
   LINKS
========================= */
a {
    color: var(--primary-light);
    text-decoration: none;
    transition: color 0.25s ease;
}

a:hover {
    color: var(--accent);
    text-decoration: underline;
}

/* =========================
   LISTS IN TABLE
========================= */
td ul {
    margin-left: 1.5rem;
}

/* =========================
   SECTION HEADER (Subheader)
========================= */
.section-header {
    display: table-row;
}

.section-header th {
    background: #e6e6e6;
    color: var(--text-light);
    padding: 0.6rem;
    font-size: 1rem;
    font-weight: 600;
}

/* =========================
   FOOTER
========================= */
footer {
    background: var(--primary);
    color: white;
    text-align: center;
    padding: var(--spacing-lg);
    font-size: 0.9rem;
}

footer a {
    color: #a0b3e8;
}

/* =========================
   OVERLAY
========================= */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;

    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* =========================
   MOBILE TABLE (STACKED)
========================= */
@media (max-width: 768px) {

    table,
    thead,
    tbody,
    tr,
    th,
    td {
        display: block;
        width: 100%;
    }

    thead {
        position: absolute;
        left: -9999px;
        top: -9999px;
    }

    tr {
        margin-bottom: var(--spacing-md);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        overflow: hidden;
        background: white;
    }

    td {
        border: none;
        padding: var(--spacing-sm) var(--spacing-md);
    }

    td::before {
        content: attr(data-label);
        display: block;
        font-weight: 600;
        color: var(--primary);
        margin-bottom: 0.3rem;
    }

    .content {
        padding: var(--spacing-lg) var(--spacing-md);
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.6rem;
    }

    .subtitle {
        font-size: 0.9rem;
    }

    .banner {
        height: 200px;
    }
}

/* =========================
   TABLET OPTIMIZATION
========================= */
@media (max-width: 1024px) {

    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 2rem -1rem;
        padding: 0 1rem;
    }

    th,
    td {
        padding: var(--spacing-sm);
        font-size: 0.9rem;
        overflow-wrap: break-word;
    }
}

/* =========================
   DESKTOP ONLY FIXES
========================= */
@media (min-width: 769px) {
    .overlay {
        display: none !important;
    }
}