html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

:root {
    --site-bg: #f7f7f7;
    --site-text: #222;
    --site-heading: #111;
    --site-muted: #555;
    --site-surface: #ffffff;
    --site-surface-soft: #f2f3f5;
    --site-border: #e0e0e0;
    --accent-yellow: #ffc107;
    --accent-yellow-hover: #e0a800;
}

html[data-theme="dark"] {
    --site-bg: #121417;
    --site-text: #e7ebef;
    --site-heading: #f3f5f7;
    --site-muted: #c2c8cf;
    --site-surface: #1b2027;
    --site-surface-soft: #232a33;
    --site-border: #313b49;
    --accent-yellow: #ffc107;
    --accent-yellow-hover: #ffd24a;
    color-scheme: dark;
}

html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] h5,
html[data-theme="dark"] h6 {
    color: var(--site-heading) !important;
}

header {
    height: 70px;
    margin-bottom: 0;
}

main {
    padding-top: 0px;
}

main> :first-child {
    padding-top: 40px;
}

body {
    font-family: 'Poppins', system-ui, sans-serif;
    font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 1.65;
    color: var(--site-text);
    margin: 0;
    padding: 0;
    background-color: var(--site-bg);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 1rem;
    padding-top: 70px;
}

h1,
h2,
h3 {
    font-family: 'Poppins', sans-serif;
    color: var(--site-heading);
    line-height: 1.2;
    margin-bottom: 1rem;
    margin-top: 2rem
}

a {
    color: var(--accent-yellow);
    text-decoration: none;
    transition: color 0.3s ease-in-out;
}

a:hover {
    color: var(--accent-yellow-hover);
}

@media (max-width: 768px) {
    main {
        padding-top: 0px;
    }

    .container {
        flex-direction: column;
        align-items: stretch;
    }

    #news-container {
        grid-template-columns: 1fr;
    }

    .news-container {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1.5rem;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.gelber-button {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: linear-gradient(135deg, #ffc107, #f5b301);
    color: #1a1a1a;
    padding: 0.65rem 1.2rem;
    font-weight: 600;
    border-radius: 999px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    box-shadow: 0 6px 16px rgba(245, 179, 1, 0.35);
}

.gelber-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(245, 179, 1, 0.45);
}

a.gelber-button {
    color: #111;
}

.news-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem 1rem;
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
}


footer {
    background-color: #343a40;
    color: #fff;
    text-align: center;
    padding: 1rem 0;
    font-size: 0.9rem;
    margin-top: 2rem;
}

.fa-regular {
    margin-right: 0.5rem;
}

footer p,
footer a {
    font-size: 0.9rem;
    color: #666;
    margin: 0.2rem;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    margin-top: 1rem;
}

.social-icons a {
    font-size: 1.8rem;
    transition: color 0.3s ease;
}

.social-icon-left {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.social-icon-right {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.social-icons-left:hover {
    transform: scale(1.1);
    transform: rotate(-10deg)
}

.social-icons-right:hover {
    transform: scale(1.1);
    transform: rotate(10deg)
}

html[data-theme="dark"] p,
html[data-theme="dark"] li,
html[data-theme="dark"] label,
html[data-theme="dark"] .news-meta,
html[data-theme="dark"] .event-name,
html[data-theme="dark"] .event-date {
    color: var(--site-text);
}

html[data-theme="dark"] .card,
html[data-theme="dark"] .news-card,
html[data-theme="dark"] .event-card,
html[data-theme="dark"] .fakt,
html[data-theme="dark"] .news-item,
html[data-theme="dark"] .gemeinschaft-item,
html[data-theme="dark"] .verein-vorstellung {
    background: var(--site-surface-soft) !important;
    border: 1px solid var(--site-border);
}

/* Footer Theme Toggle Styling */
footer .theme-toggle {
    display: inline;
    padding: 0;
    border: none;
    background: transparent;
    color: #666;
    cursor: pointer;
    font-weight: normal;
    font-size: 0.9rem;
    transition: color 0.3s ease;
    margin: 0;
    opacity: 1;
    white-space: nowrap;
    vertical-align: baseline;
}

footer .theme-toggle:hover {
    color: var(--second-color, #ffc107);
}

footer .theme-toggle-icon {
    font-size: 1rem;
    letter-spacing: 0;
    margin-right: 0.25rem;
}

footer .theme-toggle-label {
    display: inline;
    font-size: 0.9rem;
}

html[data-theme="dark"] footer .theme-toggle {
    color: #b0b8c1;
}

html[data-theme="dark"] footer .theme-toggle:hover {
    color: var(--accent-yellow);
}

html[data-theme="dark"] .fakt,
html[data-theme="dark"] .news-item,
html[data-theme="dark"] .logos,
html[data-theme="dark"] .event-card,
html[data-theme="dark"] .gemeinschaft-item {
    background: var(--site-surface-soft);
    border: 1px solid var(--site-border);
}

html[data-theme="dark"] .gemeinschaft-item {
    background: var(--site-bg);
    border-color: transparent;
    box-shadow: none;
}

html[data-theme="dark"] .fakt h3,
html[data-theme="dark"] .news-content h3,
html[data-theme="dark"] .gemeinschaft h2,
html[data-theme="dark"] .fakten h2,
html[data-theme="dark"] .cta-mitglied h2 {
    color: var(--site-heading);
}

html[data-theme="dark"] .gemeinschaft .gemeinschaft-teaser,
html[data-theme="dark"] .fakt p {
    color: var(--site-text);
}

html[data-theme="dark"] .logos:before {
    background: linear-gradient(to left, rgba(35, 42, 51, 0), var(--site-surface-soft));
}

html[data-theme="dark"] .logos:after {
    background: linear-gradient(to right, rgba(35, 42, 51, 0), var(--site-surface-soft));
}