/* Ensure that the body and html take up the full height of the viewport */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

/* Flexbox layout for the whole page */
body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #efef9e;
    color: #333;
}

/* General Body Styling */
header {
    background: #052941; 
    color: #fff;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

header h1 {
    margin: 0;
    font-size: 2.5rem;
    letter-spacing: 1.2px;
}

.intro {
    padding: 2rem;
    background-color: #e0e4cc;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Hero Section */
.hero {
    position: relative;
    background-image: url('images/AdobeStock_119949464.jpeg');
    background-size: cover;
    background-position: center;
    padding: 100px 0;
    text-align: center;
    color: white;
}

.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.hero h2,
.hero p,
.hero .button {
    position: relative;
    z-index: 2;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 30px;
}

.hero .button {
    background-color: #9FC131;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    font-size: 1.25rem;
    border-radius: 5px;
}

.hero .button:hover {
    background-color: #88a42a;
}

.button {
    margin-top: 1.5rem;
    padding: 10px 25px;
    background-color: #9FC131;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.3s ease;
}

.button:hover {
    background-color: #85a826;
}

.introduction {
    padding: 2rem;
    background-color: #052941;
    color: #fff;
    text-align: left;
    font-size: 120%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.teams {
    padding: 2rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    text-align: center;
}

.teams h2 {
    font-size: 2rem;
    margin-bottom: 40px; /* Etwa 3 cm Abstand zwischen der h2-Überschrift und der Auflistung der Teams */
    letter-spacing: 1.1px;
    width: 100%;
}

.team-card {
    background-color: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: calc(33% - 2rem);
    max-width: 350px;
}

.team-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.team-card h3 {
    font-size: 1.6rem;
    margin-bottom: 1rem;
}

.team-card p {
    font-size: 1rem;
    margin: 0.4rem 0;
    color: #555;
}

/* Charts Section */
.charts {
    padding: 3rem;
    background-color: #f9f9f9;
    text-align: center;
}

.charts h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    letter-spacing: 1.1px;
}

.chart {
    width: 80%;
    margin: 0 auto;
}

/* Flexbox layout for the filter buttons */
.chart-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    padding: 40px;
}

.chart-filters .button {
    flex-grow: 1;
    margin: 0 10px;
    width: auto;
    max-width: 200px;
}

footer {
    background: #042940;
    color: #fff;
    text-align: center;
    padding: 1rem;
    margin-top: 2rem;
    font-size: 0.9rem;
    position: relative; /* Change from sticky to relative */
    bottom: 0;
}




.chart {
    width: 90%;
    margin: 0 auto;
}

/* Main content area */
.team-details-container {
    flex-grow: 1; /* Ensures the content expands to take available space */
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    /* General text scaling */
    header h1 {
        font-size: 1.8rem;
    }

    .hero h2 {
        font-size: 1.8rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .team-card {
        width: calc(100% - 2rem);
    }

    /* Adjust charts for better readability on mobile */
    .chart canvas {
        height: 300px !important;
        width: 100% !important;
    }

    /* Single chart per row */
    .team-card canvas {
        height: 200px !important;
        width: 100% !important;
    }

    .charts {
        padding: 1.5rem;
    }

    .chart-filters {
        display: flex; /* Add this line to make the buttons next to each other */
        flex-direction: row; /* Add this line to make the buttons next to each other */
        justify-content: center; /* Add this line to center the buttons horizontally */
        padding: 40px;
    }
    
    .chart-filters .button {
        margin: 0 10px; /* Adjust the margin to create spacing between the buttons */
    }
}

@media (max-width: 480px) {
    /* Further reduce font sizes for smaller screens */
    header h1 {
        font-size: 1.5rem;
    }

    .hero h2 {
        font-size: 1.5rem;
    }

    .hero p {
        font-size: 0.9rem;
    }

    .team-card h3 {
        font-size: 1.2rem;
    }

    .team-card p {
        font-size: 0.9rem;
    }

    .charts h2 {
        font-size: 1.5rem;
    }
}
