* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    overflow-x: hidden;
    text-align: center;
    background: #ffffff;
}

main {
    display: block;
}

section {
    min-height: auto;
    scroll-margin-top: 80px;
}

a {
    text-decoration: none;
}

ul {
    margin: 0;
    padding: 0;
}

li {
    list-style-type: none;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

h1,
h2,
h3,
h5,
header a,
.btn {
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    color: #494949;
    text-transform: uppercase;
}

h1,
h2,
h3 {
    margin-top: 0;
    padding-top: 0;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
    font-size: clamp(1.8rem, 4vw, 2.75rem);
}

h3 {
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
}

h4,
p {
    font-family: 'Roboto Slab', serif;
    color: #494949;
}

p {
    line-height: 1.7;
}

hr {
    width: 42px;
    height: 3px;
    margin: 12px auto 0;
    border: 0;
    background: #494949;
}

#logo,
li,
img,
.btn {
    transition: all 300ms;
    -webkit-transition: all 300ms;
    -moz-transition: all 300ms;
    -o-transition: all 300ms;
}

.clearfix::after {
    display: block;
    clear: both;
    content: '';
}

/* Header */
header {
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 65px;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

#logo {
    float: left;
    width: 120px;
    margin: 10px 0 10px 50px;
}

#logo:hover {
    opacity: 0.5;
}

#logo img {
    width: 45px;
}

.menu-toggle {
    display: none;
    padding: 0;
    border: 0;
    background: transparent;
}

header nav {
    float: right;
    margin: 10px 50px 0 0;
}

header nav ul {
    display: flex;
    align-items: center;
}

header nav ul li {
    margin-left: 25px;
}

header nav ul li a {
    display: block;
    padding: 10px 0;
    font-size: 16px;
}

header nav ul li:hover {
    transform: translateY(3px);
}

/* Gemeinsame Sektionen */
.page-section {
    padding: clamp(70px, 8vw, 110px) clamp(18px, 4vw, 48px);
}

.section-heading {
    width: 100%;
    margin: 0 auto clamp(32px, 5vw, 55px);
    text-align: center;
}

.section-heading h1,
.section-heading h2,
.section-heading h3 {
    margin-bottom: 0;
    text-align: center;
}

/* Dorfkreuz */
.hero-section {
    padding-top: 125px;
    background: #ffffff;
}

.hero-image {
    width: min(100%, 1100px);
    margin: 0 auto;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.13);
}

/* Bilder aus vergangenen Tagen */
.past-images-section {
    background: #f7f7f7;
}

.past-images-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(18px, 3vw, 32px);
    width: min(100%, 1180px);
    margin: 0 auto;
}

.gallery-image-box {
    min-width: 0;
    margin: 0;
    padding: clamp(12px, 2vw, 18px);
    overflow: hidden;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.09);
}

.gallery-image-box img {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 9px;
    object-fit: cover;
}

.gallery-image-box:hover img {
    transform: scale(1.025);
}

/* Umbau und Einweihung */
.umbau-einweihung {
    background: #ffffff;
}

.image-container {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(24px, 4vw, 48px);
    width: min(100%, 1000px);
    margin: 0 auto;
}

.image-box {
    min-width: 0;
    padding: clamp(18px, 3vw, 28px);
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.09);
}

.image-box h3 {
    margin-bottom: 18px;
    text-align: center;
}

.image-box a {
    display: block;
    overflow: hidden;
    border-radius: 10px;
}

.image-box img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    cursor: pointer;
}

.image-box img:hover {
    transform: scale(1.025);
}

.image-box p {
    margin: 16px 0 0;
    font-size: clamp(0.82rem, 1.4vw, 0.95rem);
    font-weight: bold;
    line-height: 1.5;
    text-transform: uppercase;
}

/* NGZ */
.ngz-section {
    background: #f7f7f7;
}

.ngz-wrapper {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(28px, 5vw, 60px);
    align-items: center;
    width: min(100%, 1050px);
    margin: 0 auto;
    padding: clamp(20px, 4vw, 38px);
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.ngz-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 4 / 3;
    padding: clamp(10px, 2vw, 18px);
    overflow: hidden;
    border-radius: 10px;
    background: #f4f4f4;
}

.ngz-image img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
    object-fit: contain;
}

.ngz-content {
    text-align: left;
}

.ngz-content h3 {
    margin-bottom: 18px;
    line-height: 1.3;
}

.ngz-content p {
    margin: 0 0 14px;
    font-size: clamp(1rem, 1.5vw, 1.08rem);
}

.ngz-content .btn {
    margin-top: 10px;
}

/* Historischer Fund */
.historical-section {
    background: #eeeeee;
}

.historical-card {
    display: grid;
    grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.15fr);
    gap: clamp(28px, 5vw, 56px);
    align-items: center;
    width: min(100%, 1100px);
    margin: 0 auto;
    padding: clamp(20px, 4vw, 40px);
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.09);
}

.historical-image {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 12px;
    border-radius: 10px;
    background: #f6f6f6;
}

.historical-image img {
    width: 100%;
    max-height: 680px;
    object-fit: contain;
    border-radius: 6px;
}

.historical-content {
    min-width: 0;
    text-align: left;
}

.historical-content h3 {
    margin-bottom: 20px;
    line-height: 1.3;
}

.historical-content p {
    margin: 0 0 16px;
    font-size: clamp(1rem, 1.5vw, 1.1rem);
    line-height: 1.8;
}

.buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 11px 16px;
    border-radius: 6px;
    background: #007bff;
    color: #ffffff;
    text-align: center;
    white-space: normal;
}

.btn:hover,
.btn:focus {
    background: #0056b3;
    color: #ffffff;
}

/* Footer */
footer {
    width: 100%;
    min-height: 70px;
    padding: 24px 18px;
    background-color: #3f3f3f;
}

footer p {
    margin: 0;
    padding: 0;
    font-size: 12px;
    color: #f0f0f0;
}

footer a {
    font-family: 'Roboto Slab', serif;
    color: #add8e6;
    text-transform: none;
}

/* Navigation für kleinere Bildschirme */
@media (max-width: 1200px) {
    #logo {
        margin-left: 24px;
    }

    .menu-toggle {
        display: block;
        float: right;
        width: 40px;
        height: 40px;
        margin: 12px 18px 10px 10px;
        cursor: pointer;
        color: #494949;
        font-size: 30px;
        text-align: center;
    }

    .menu-toggle::before {
        content: '\f0c9';
        font-family: FontAwesome;
        line-height: 40px;
    }

    .menu-toggle.active::before {
        content: '\f00d';
    }

    header nav {
        display: none;
        float: none;
        clear: both;
        width: 100%;
        margin: 0;
        background: #ffffff;
    }

    header nav.active {
        display: block;
    }

    header nav ul {
        display: block;
        width: 100%;
    }

    header nav ul li {
        width: 100%;
        margin: 0;
        border-top: 1px solid #dddddd;
    }

    header nav ul li:hover {
        transform: none;
        background: #eeeeee;
    }

    header nav ul li a {
        padding: 10px 18px;
        font-size: 16px;
    }
}

/* Tablets */
@media (max-width: 900px) {
    .past-images-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: min(100%, 760px);
    }

    .past-images-grid .gallery-image-box:last-child {
        grid-column: 1 / -1;
        width: min(100%, 372px);
        justify-self: center;
    }

    .ngz-wrapper,
    .historical-card {
        grid-template-columns: 1fr;
    }

    .ngz-content,
    .historical-content {
        text-align: center;
    }

    .buttons {
        justify-content: center;
    }

    .historical-image img {
        width: min(100%, 560px);
    }
}

/* Smartphones */
@media (max-width: 760px) {
    .page-section {
        padding: 58px 16px;
    }

    .hero-section {
        padding-top: 105px;
    }

    .section-heading {
        margin-bottom: 30px;
    }

    .past-images-grid,
    .image-container {
        grid-template-columns: 1fr;
    }

    .past-images-grid .gallery-image-box:last-child {
        grid-column: auto;
        width: 100%;
    }

    .gallery-image-box,
    .image-box,
    .ngz-wrapper,
    .historical-card {
        padding: 18px;
    }

    .ngz-wrapper,
    .historical-card {
        gap: 24px;
    }
}

@media (max-width: 480px) {
    #logo {
        width: 70px;
        margin-left: 16px;
    }

    .buttons {
        flex-direction: column;
    }

    .buttons .btn,
    .ngz-content .btn {
        width: 100%;
    }

    footer p {
        line-height: 1.7;
    }
}