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

h1, h2, h3, h4, h5, h6 {
    color: #000;
}

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

/* ─── Hero ─────────────────────────────────────────────────────────────────── */
.hero {
    display: flex;
    align-items: center;
    gap: 24px;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 24px 10px;
    box-sizing: border-box;
}

.hero-figures {
    display: flex;
    align-items: flex-end;
    flex-shrink: 0;
    align-self: flex-start;
}

.hero-figure-person {
    height: 140px;
    width: auto;
}

.hero-figure-person:first-child {
    margin-right: -18px;
    z-index: 2;
    position: relative;
}

.hero-figure-person:last-child {
    z-index: 1;
}

.hero-text {
    flex: 1;
    min-width: 0;
}

.hero-text h1 {
    font-size: clamp(1.6rem, 4vw, 2.5rem);
    font-weight: bold;
    line-height: 1.2;
    margin: 0 0 0.5rem;
}

.hero-text p {
    margin: 0;
    line-height: 1.5;
    max-width: 700px;
}

@media (max-width: 600px) {
    .hero {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .hero-figure-person {
        height: 100px;
    }
    .hero-figure-person:first-child {
        margin-right: -12px;
    }
}

.dropdown-container {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 40px auto 20px;
    padding: 0 10px;
    box-sizing: border-box;
    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-label {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.3rem;
}

.select-wrap {
    margin-bottom: 1.2rem;
    position: relative;
}

.dropdown-trigger {
    font-family: 'Averta', 'Helvetica Neue', Arial, sans-serif;
    font-size: clamp(20px, 2.5vw, 28px);
    font-weight: 700;
    color: #3250c8;
    background: transparent;
    border: none;
    padding: 4px 32px 4px 0;
    width: 100%;
    text-align: left;
    cursor: pointer;
    outline: none;
    line-height: 1.3;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%23999' stroke-width='2' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 4px top 50%;
}
.dropdown-trigger:hover {
    color: #5573e6;
}

.dropdown-list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 100;
    background: #ffffff;
    border: 1px solid #e8e8e4;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,.1);
    max-height: 400px;
    overflow-y: auto;
    padding: 6px 0;
}
.dropdown-list.open {
    display: block;
}

.dropdown-group {
    border-top: 1px solid #e8e8e4;
}
.dropdown-group:first-child {
    border-top: none;
}

.dropdown-group-label {
    display: flex;
    align-items: center;
    width: 100%;
    font-size: 13px;
    font-weight: 700;
    color: #3250c8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 16px;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    line-height: 1.4;
}
.dropdown-group-label::after {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-right: 2px solid #3250c8;
    border-bottom: 2px solid #3250c8;
    transform: rotate(-45deg);
    margin-left: auto;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}
.dropdown-group.expanded .dropdown-group-label::after {
    transform: rotate(45deg);
}
.dropdown-group-label:hover {
    background: #f0f4fa;
}

.dropdown-group-options {
    display: none;
}
.dropdown-group.expanded .dropdown-group-options {
    display: block;
}

.dropdown-option {
    display: block;
    width: 100%;
    font-family: 'Averta', 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    color: #333;
    background: none;
    border: none;
    padding: 10px 16px;
    text-align: left;
    cursor: pointer;
    line-height: 1.4;
}
.dropdown-option:hover {
    background: #f7f6f3;
}
.dropdown-option.active {
    color: #3250c8;
    font-weight: 600;
}

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

.chart {
    width: 100%;
    max-width: 900px;
    height: auto;
    margin: 10px auto;
    position: relative;
    overflow: visible;
}

/* 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: 10px 16px;
    width: 100%;
    align-self: stretch;
}

.top-banner-content {
    margin: 0;
    text-align: left;
}

.top-banner img {
    max-width: 125px;
    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: 100px;
    }
}

@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;
    }
}