html {
    box-sizing: border-box;
}
*, *::before, *::after {
    box-sizing: inherit;
}

html, body {
    background-color: #ffffff !important;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    min-height: 100vh;
    font-family: 'Averta', sans-serif;
    width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
}

.heading-figure {
    position: absolute; /* Position the image relative to the container */
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1200px;
    height: auto;
    opacity: 1.0; /* Adjust transparency */
    z-index: 1; /* Ensure it is behind the text */
}

.heading-container {
    position: relative;
    overflow: visible; /* Ensures elements within aren't clipped */
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
    background-color: #deebe4;
}

.paragraph-container {
    background-color: #deebe4;
    padding: 2rem;
    border-radius: 01px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin: 2rem auto;  /* Changed from 2rem 0 to 2rem auto */
    width: 100%;
    max-width: 900px;
    box-sizing: border-box;
    display: block;  /* Ensure block display */
    position: relative;  /* Add relative positioning */
    left: 50%;  /* Move to the center */
    transform: translateX(-50%);  /* Pull back by half width */
}

.heading-text, .heading-content {
    position: relative; /* Position these elements above the image */
    z-index: 2;
    text-align: center;
}

.heading-text h1 {
    font-size: clamp(2rem, 5vw, 2.5rem);
    font-weight: bold;
    line-height: 1.2;
    margin: 0;
}

.heading-content {
    position: relative;
    z-index: 3;
    margin: 2rem auto;
    max-width: 800px;
    padding: 0 2rem;
    text-align: left;
}

.dropdown-container {
    position: relative;
    width: 100%; /* Make it responsive */
    max-width: 600px; /* Prevent it from being too wide */
    margin: 40px auto 20px; /* Center it horizontally */
    text-align: center;
    padding: 0 10px; /* Add horizontal padding */
    box-sizing: border-box; /* Include padding and border in width */
    z-index: 3;
}

.dropdown-select-container {
    text-align: center; /* Center-align the text */
    margin: 40px auto; /* Add spacing around the container and center it */
}

#selectedQuestionHeader {
    display: block; /* Ensure it's treated as a block-level element */
    margin-top: 20px; /* Add space above the header */
    font-size: 1.5rem; /* Adjust font size */
}

select {
    position: relative; /* Keeps it within the normal flow */
    z-index: 4; /* Ensures the dropdown is above other elements */
    width: 100%; /* Ensures the dropdown fills its container */
    max-width: 100%; /* Prevents it from exceeding its container width */
    padding: 12px; /* Maintains comfortable spacing inside the dropdown */
    font-size: 16px; /* Adjust font size for readability */
    border-radius: 10px; /* Rounded corners */
    border: 2px solid #b0c4de; /* Border color */
    background-color: #f0f8ff; /* Light background for dropdown */
    color: #333; /* Dark text color for good contrast */
    outline: none; /* Removes the default outline when focused */
    cursor: pointer; /* Ensures it appears interactive */
    box-sizing: border-box; /* Includes padding and border in the width */
    transition: box-shadow 0.3s ease; /* Smooth transition effect on focus or hover */
    margin: 0 auto; /* Centers the dropdown horizontally */
}
select:hover {
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
}

select:focus {
    box-shadow: 0px 0px 10px rgba(0, 128, 255, 0.5);
}

.chart-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    gap: 20px;
    margin-top: 20px;
    padding: 0 10px;
}

.chart {
    width: 100%;
    max-width: 900px;
    height: auto;           /* Let charts determine their own height */
    min-height: 450px;      /* Minimum height for smaller charts */
    margin: 10px auto;
}

/* Specific styling for the parties chart that needs extra height */
#partierChartContainer {
    min-height: 700px;      /* Extra height for parties chart with legend */
}

.share-buttons {
    text-align: center;
    margin-top: 20px;
    padding-bottom: 60px;
    width: 100%;
}

.footer {
    background-color: #f9f9f9; /* Optional: add a background color for the footer */
    padding: 20px;
    width: 100%; /* Ensure the background spans the full width */
    text-align: center; /* Centers the text horizontally */
    display: flex;
    justify-content: center; /* Centers the content horizontally */
    align-items: center; /* Centers the content vertically */
    flex-direction: column; /* Ensures the footer items are stacked vertically */
}

.footer-content {
    max-width: 800px; /* Optional: limit the width of the footer content */
    margin: 0 auto; /* Centers the content within the footer */
    font-size: 1rem; /* Adjust font size as needed */
}

@font-face {
    font-family: 'Averta';
    src: url('../fonts/Averta-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Top banner styles */
.top-banner {
    background-color: white;
    padding: 15px 20px;
    width: 100%;
    align-self: stretch;
}

.top-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: left;
}

.top-banner img {
    max-width: 250px;
    height: auto;
    display: block;
    margin-left: 0;
    margin-right: auto;
}

@media (max-width: 1024px) {
    .chart {
        min-height: 400px;
    }
    
    #partierChartContainer {
        min-height: 650px;
    }
}

@media (max-width: 768px) {
    .top-banner {
        padding: 10px 15px;
    }
    
    .top-banner img {
        max-width: 180px;
    }
}

@media (max-width: 600px) {
    .heading-content p {
        font-size: 14px;
    }
    .chart {
        min-height: 350px;
    }
    
    #partierChartContainer {
        min-height: 600px;
    }
    
    select {
        font-size: 14px;
        padding: 10px;
        width: 100%;
    }
    .dropdown-container {
        max-width: 100%; /* Use the full screen width */
        padding: 0 5px; /* Reduce padding for smaller screens */
    }
    .paragraph-container {
        padding: 1.5rem;
        margin: 1rem auto;
    }
    
    .paragraph-container p {
        font-size: 14px; /* Matching your responsive text size */
    }
}

@media (max-width: 480px) {
    .top-banner {
        padding: 8px 10px;
    }
    
    .top-banner img {
        max-width: 140px;
    }
}