/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* ensure anchors are offset under the sticky header (no JS) */
    --header-offset: 72px;
    /* blue */
    --content-bg-bright: #fff;
    --primary-color: #2980b9;
    --primary-dark-color: #2c3e50;
    --secondary-color: #3498db;
    --secondary-dark-color: #34495e;
    --footer-color: #bdc3c7;
    --content-text-color: #555;
    /* end blue */
    /* purple */
    --primary-color: #661e44;
    --primary-dark-color: #35202b;
    --secondary-color: #7d164d;
    --secondary-dark-color: #5d345e;
    --secondary-dark-color: rgba(255, 255, 255, 0.1);
    --content-text-color: #333;
    /* end purple */
}

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.zweispalten {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    max-width: 1200px; /* This ensures the container doesn't grow too wide */
}

.zweispalten .spalte {
    width: 100%;
    max-width: 600px;
}

@media (min-width: 701px) {
    .zweispalten {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 2rem; /* Adds space between columns */
    }

    .zweispalten .spalte {
        flex: 1;
        min-width: 300px; /* Adjusted for better responsiveness */
        max-width: max(500px, 49vw); /* Slightly reduced to account for gap */
    }
}

/* Header */
header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}
/* default desktop estimate */
html {
    scroll-padding-top: var(--header-offset);
    scroll-behavior: smooth;
}
[id] {
    scroll-margin-top: calc(var(--header-offset) + 2px);
}

/* adjust the offset for smaller viewports where header is taller */
@media (max-width: 768px) {
    :root {
        --header-offset: 112px;
    }
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-dark-color);
}

nav {
    display: flex;
    flex-flow: row wrap;
}

nav a {
    flex-grow: 1;
    padding: 0.4rem 12.5px;
    text-decoration: none;
    color: var(--primary-dark-color);
    font-weight: 500;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--secondary-color);
}

/* Hero section */
.hero {
    background: linear-gradient(
        135deg,
        var(--primary-dark-color) 0%,
        var(--secondary-color) 100%
    );
    color: var(--content-bg-bright);
    padding: 80px 0;
    text-align: center;
}

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

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
}

/* Candidates section */
.candidates-section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    color: var(--primary-dark-color);
}

.candidates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.candidate-card {
    background: var(--content-bg-bright);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition:
        transform 0.3s,
        box-shadow 0.3s;
}

.candidate-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.candidate-image {
    height: 250px;
    background-color: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #777;
    font-size: 1rem;
}
.candidate-image img {
    max-width: 100%;
    max-height: 100%;
}

.candidate-info {
    padding: 25px;
}

.candidate-name {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--primary-dark-color);
}

.candidate-role {
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 15px;
}

.candidate-bio {
    margin-bottom: 20px;
    color: var(--content-text-color);
}

.btn {
    display: inline-block;
    background-color: var(--secondary-color);
    color: var(--content-bg-bright);
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: var(--primary-color);
}

body > section {
    padding: 80px 0;
}
body > section:nth-child(even) {
    background-color: var(--content-bg-bright);
}

.content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.content h2,
.content h3 {
    margin-bottom: 20px;
    color: var(--primary-dark-color);
}

.content p,
.content ul {
    margin-bottom: 20px;
    color: var(--content-text-color);
}

#blog .content article {
    text-align: left;
}
#blog .content article bloghead {
    display: flex;
    flex-flow: row wrap;
    justify-content: space-between;
}
#blog .content article bloghead metadata {
    display: flex;
    flex-flow: column;
    align-self: end;
}
#blog .content article hr {
    clear: both;
    border: 1px var(--primary-color) solid;
    margin-bottom: 1rem;
}
#blog .content article h1,
#blog .content article h2,
#blog .content article h3 {
    min-width: min(15rem, 55vw);
    max-width: 37rem;
}
#blog .content article h1 {
    font-size: 1.5rem;
    margin: 0.2rem 0;
    padding: 0.2rem 0;
}
#blog .content article h2 {
    font-size: 1.35rem;
}
#blog .content article h3 {
    font-size: 1.25rem;
}

/* Footer */
footer {
    background-color: var(--primary-dark-color);
    color: var(--content-bg-bright);
    padding: 50px 0 20px;
}

footer img {
    filter: drop-shadow(0px 0px 4px #fff);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-column h3 {
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column ul li a {
    color: var(--footer-color);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-column ul li a:hover {
    color: var(--content-bg-bright);
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--secondary-dark-color);
    color: var(--footer-color);
    font-size: 0.9rem;
}

.img-box {
    display: flex;
    justify-content: center;
}
img {
    margin: 20px;
    max-width: calc(100% - 40px);
    max-height: 70vh;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }

    nav {
        margin-top: 2px;
        justify-content: center;
    }

    nav a {
        margin: 0 10px;
    }

    .hero h1 {
        font-size: 2rem;
    }

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