html,
    body {
        height: 100%;
        margin: 0;
        padding: 0;
    }

    body {
        padding-top: 70px;
        /* Add padding to prevent content from being overlapped by the fixed navbar */
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        font-family: Arial, sans-serif;
        background-color: var(--bg-color);
        color: var(--text-color);
        font-size: 16px;
        transition: background-color 0.3s ease, color 0.3s ease;
    }

    header {
        background: linear-gradient(to bottom, var(--header-bg), var(--bg-color));
        color: var(--text-color);
        text-align: center;
        padding: 1.5rem 1rem;
        margin-top: 0;
    }

    header h1 {
        font-size: clamp(1.5rem, 5vw, 2.5rem);
        margin-bottom: 0.5rem;
        background: linear-gradient(45deg, var(--title-gradient-start), var(--title-gradient-end));
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }

    header p {
        font-size: clamp(0.9rem, 3vw, 1.1rem);
        margin: 0.5rem auto;
        max-width: 800px;
        padding: 0 1rem;
        line-height: 1.4;
    }

    section {
        padding: 1.5rem 1rem;
        max-width: 1200px;
        margin: 0 auto;
        width: 100%;
        box-sizing: border-box;
    }

    section h2 {
        font-size: clamp(1.3rem, 4vw, 1.8rem);
        margin-bottom: 1rem;
        text-align: center;
        color: var(--text-color);
        font-weight: 600;
    }

    .cards-container {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
        gap: 1rem;
        width: 100%;
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 1rem;
        box-sizing: border-box;
    }

    @media (min-width: 600px) {
        .cards-container {
            gap: 1.5rem;
            padding: 0;
        }
    }

    @media (max-width: 600px) {
        .card {
            min-height: 180px;
        }
    }

    @media (max-width: 400px) {
        .card {
            min-height: 120px;
        }
    }

    .card {
        background: transparent;
        border-radius: 12px;
        padding: 1.2rem;
        text-align: center;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        height: 100%;
        transition: all 0.3s ease;
        width: 100%;
        box-sizing: border-box;
    }

    .card:hover {
        transform: translateY(-5px);
    }

    .card h3 {
        font-size: clamp(1.1rem, 3vw, 1.5rem);
        margin-bottom: 0.8rem;
        color: var(--text-color);
        font-weight: 600;
    }

    .card p {
        font-size: clamp(0.85rem, 2vw, 1rem);
        margin-bottom: 0.8rem;
        line-height: 1.4;
    }

    .card a {
        display: block;
        margin: 0.3rem auto;
        padding: 0.6rem 1rem;
        background-color: var(--button-bg);
        color: var(--text-color);
        text-decoration: none;
        border-radius: 6px;
        transition: all 0.3s ease;
        width: 100%;
        max-width: 200px;
        box-sizing: border-box;
        border: 1px solid var(--border-color);
        font-size: clamp(0.85rem, 2vw, 1rem);
    }

    .card a:hover {
        background-color: var(--button-hover);
        transform: scale(1.05);
        border-color: rgba(255, 255, 255, 0.2);
    }

    #footer-container {
        margin-top: auto;
    }

    .theme-switch {
        position: fixed;
        bottom: 20px;
        right: 20px;
        z-index: 100;
        background: var(--button-bg);
        border: 1px solid var(--border-color);
        border-radius: 50%;
        width: 50px;
        height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.3s ease;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
        color: var(--text-color);
        font: inherit;
        padding: 0;
    }

    .theme-switch:hover {
        transform: scale(1.1);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    }

    .theme-switch:focus-visible {
        outline: 2px solid #9ca3ff;
        outline-offset: 3px;
    }

    .theme-switch svg {
        width: 28px;
        height: 28px;
        fill: var(--text-color);
    }

    .theme-switch.rotating svg {
        animation: themeIconRotate 0.5s ease-in-out;
    }

    @keyframes themeIconRotate {
        from {
            transform: rotate(0deg);
        }

        to {
            transform: rotate(360deg);
        }
    }

    /* FAQ Verbesserungen */
    .card details {
        margin-bottom: 1rem;
        border-radius: 8px;
        overflow: hidden;
        transition: all 0.3s ease;
    }

    .card details:hover {
        background-color: var(--button-hover);
        transform: translateX(5px);
    }

    .card details[open] {
        background-color: var(--button-hover);
        border-left: 3px solid var(--text-color);
    }

    .card details summary {
        padding: 1rem;
        cursor: pointer;
        font-weight: 600;
        font-size: 1rem;
        color: var(--text-color);
        position: relative;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .card details summary:hover {
        background-color: var(--button-bg);
    }

    .card details summary::before {
        content: '\f054';
        font-family: 'Font Awesome 6 Free';
        font-weight: 900;
        margin-right: 0.5rem;
        transition: transform 0.3s ease;
        color: var(--text-color);
    }

    .card details[open] summary::before {
        transform: rotate(90deg);
    }

    .card details summary::after {
        content: '\f078';
        font-family: 'Font Awesome 6 Free';
        font-weight: 900;
        font-size: 0.8rem;
        opacity: 0.7;
        transition: all 0.3s ease;
    }

    .card details[open] summary::after {
        transform: rotate(180deg);
        opacity: 1;
    }

    .card details p {
        padding: 0 1rem 1rem 1rem;
        margin: 0;
        line-height: 1.6;
        color: var(--text-color);
        opacity: 0.9;
        animation: fadeIn 0.3s ease-in;
    }

    .card details a {
        color: var(--text-color);
        text-decoration: underline;
        transition: all 0.3s ease;
    }

    .card details a:hover {
        color: var(--button-hover);
        text-decoration: none;
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

        to {
            opacity: 0.9;
            transform: translateY(0);
        }
    }

    /* Verbesserte Card-Styles */
    .card {
        background: transparent;
        border-radius: 12px;
        padding: 1.5rem;
        text-align: left;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        height: auto;
        min-height: 300px;
        transition: all 0.3s ease;
        width: 100%;
        box-sizing: border-box;
    }

    .card:hover {
        transform: translateY(-5px);
    }

    .card h3 {
        font-size: clamp(1.1rem, 3vw, 1.5rem);
        margin-bottom: 1.5rem;
        color: var(--text-color);
        font-weight: 600;
        text-align: center;
        padding-bottom: 0.5rem;
        border-bottom: 2px solid var(--border-color);
    }

    /* Responsive Anpassungen */
    @media (max-width: 600px) {
        .card details summary {
            font-size: 0.9rem;
            padding: 0.8rem;
        }

        .card details p {
            font-size: 0.85rem;
            padding: 0 0.8rem 0.8rem 0.8rem;
        }

        .card {
            padding: 1.2rem;
            min-height: 250px;
        }

        header {
            padding: 1rem 0.5rem;
        }

        section {
            padding: 1rem 0.5rem;
        }

        .cards-container {
            padding: 0;
            gap: 1rem;
        }

        .theme-switch {
            bottom: 80px;
        }
    }

    /* Zusätzliche Optimierung für sehr kleine Bildschirme */
    @media (max-width: 400px) {

        body,
        html {
            font-size: 14px;
        }

        header h1 {
            font-size: 1.1rem;
        }

        section h2 {
            font-size: 1rem;
        }

        .card {
            padding: 0.7rem;
            min-height: 180px;
        }

        .card h3 {
            font-size: 1rem;
            padding-bottom: 0.3rem;
        }

        .theme-switch {
            width: 38px;
            height: 38px;
        }

        .theme-switch svg {
            width: 20px;
            height: 20px;
        }
    }

    /* Verhindere horizontales Scrollen */
    html,
    body {
        max-width: 100vw;
        overflow-x: hidden;
    }

    .page-hero {
        margin: 1rem auto 1.2rem;
        max-width: 1240px;
        width: min(100%, calc(100vw - 2rem));
        padding: 0 1rem;
        box-sizing: border-box;
    }

    .page-hero img {
        display: block;
        width: 100%;
        height: auto;
        border-radius: 12px;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
    }
