/* Algemene Styling */
body {
    font-family: -apple-system, 'BlinkMacSystemFont', 'Segoe UI', 'Roboto', 'Inter', 'Helvetica', 'Arial', sans-serif;
    background-color: #f8f9fa;
    color: rgb(32, 33, 34);
    margin: 0;
    padding: 0;
    overflow-x: hidden;  /* Hide horizontal scroll */
}

#content {
    margin: 0 auto;
    max-width: 960px;
    background-color: white;
    padding: 20px;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #a2a9b1;
    line-height: 1.65;
    word-wrap: break-word;
}

#header {
    display: flex;
    align-items: center;
    flex-direction: column;
    margin-bottom: 20px;
}

#header img {
    display: block;
    margin: 5px auto; /* Centers the image */
    max-width: 100%;
    height: auto;
}

#page-title {
    border-bottom: 1px solid #a2a9b1; /* Lijn onder de titel */
    padding-bottom: 5px; /* Wat ruimte onder de titel */
    margin-bottom: 20px; /* Consistente marge onder de titel */
}

h1, h2, h3 {
    font-family: Georgia, 'Times New Roman', serif;
    color: rgb(32, 33, 34);
    font-weight: 400;
    margin-bottom: 10px;
}

h2, h3 {
    border-bottom: 1px solid rgb(218, 221, 227);
    padding-bottom: 5px;
    margin-top: 20px;
}

p, li {
    font-size: 16px;
    line-height: 1.65;
}

/* Links Styling */
a {
    color: #0645ad; /* Wikipedia-style blue */
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Unordered List Styling */
ul {
    padding-left: 20px;
    list-style-type: disc;
}

ul li {
    margin-bottom: 10px;
    font-size: 16px;
    line-height: 1.65;
}

/* Infobox Styling */
.infobox {
    width: 320px;
    float: right;
    margin: 0 0 1em 1em;
    background-color: rgb(248, 249, 250);
    border: 1px solid rgb(218, 221, 227);
    font-size: 14.4px;
    line-height: 1.65;
    display: table; /* Ensure table structure for correct alignment */
}

.infobox-header {
    font-weight: bold;
    text-align: center;
    padding: 5px;
    font-size: 1.1em;
    border-bottom: 1px solid #dadde3;
}

.infobox img {
    width: 100%;  /* Ensure image is responsive */
    max-width: 75%; /* Prevent image from being larger than the container */
    height: auto;  /* Maintain aspect ratio */
    display: block; /* Ensure the image behaves as a block element */
    margin: 5px auto; /* Center the image */
}

.infobox table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed; /* Ensure equal width for <th> and <td> */
}

.infobox table tr:first-child {
    border-top: 1px solid #dadde3;
}

.infobox table tr {
    border-bottom: 1px solid #dadde3;
}

.infobox table tr:last-child {
    border-bottom: none;
}

/* Ensure that the first column is bold and aligned to the top */
.infobox table th {
    font-weight: bold; /* Keep labels bold */
    vertical-align: top; /* Ensure labels are aligned at the top */
    padding: 7px 10px;
    width: 50%; /* Set equal width for th */
    text-align: center;
}

.infobox table td {
    text-align: left; /* Ensure left alignment for all cells */
    vertical-align: top; /* Align content to the top of the cell */
    padding: 7px 10px;
    width: 50%; /* Set equal width for td */
}

/* Taal Selector Styling */
#language-selector {
    text-align: right;
    margin-bottom: 20px;
}

#language-selector button {
    margin: 0 5px;
    padding: 5px 10px;
    border: 1px solid #ddd;
    background-color: #f5f5f5;
    cursor: pointer;
}

#language-selector button:hover {
    background-color: #ddd;
}

/* Responsieve Styling */
@media (max-width: 768px) {
    #content {
        padding: 10px;
    }

    /* Ensure the infobox comes after the biography and page title on mobile */
    #biografie-content, #page-title {
        order: 1;
    }

    .infobox {
        float: none;
        margin: 0 auto 20px auto;
        width: 100%;
        order: 2; /* Infobox will come second on mobile */
    }

    .infobox td, .infobox-header {
        font-size: 1.1em;
    }

    .infobox img {
        max-width: 75%; /* Prevent image from being larger than the container */
    }      
}

@media (max-width: 480px) {
    #header img {
        width: 50%;
        max-width: 120px;
    }

    .infobox-header {
        font-size: 1.2em;
    }

    table.infobox td {
        font-size: 1em;
    }
    
    .infobox img {
        max-width: 50%; /* Prevent image from being larger than the container */
    }      
}

/* Donation Banner Styles */
.donation-banner {
    background-color: #f8f9fa;
    border: 1px solid #a2a9b1;
    padding: 15px;
    margin: 20px 0;
    text-align: center;
}

.donation-banner h3 {
    color: #222;
    margin-bottom: 10px;
}

.donation-banner p {
    margin: 10px 0;
    font-size: 14px;
    color: #333;
}

.donation-button {
    background-color: #36c;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    display: inline-block;
    margin-top: 10px;
    font-size: 14px;
}

.donation-button:hover {
    background-color: #004080;
}