html, body {
    box-sizing: border-box;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    font-size: 16px;
}

body {
    min-width: 0;
}

/* Header */
#header {
    width: 100%;
    margin: 0 auto;
    padding: 16px 0 0 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
    /* keep header on top of the featured hero */
    position: relative;
    z-index: 20;
}
#header a.logo {
    width: 80%;
    max-width: 220px;
    display: block;
    margin: 0 auto 12px auto;
}
#header a.logo img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
/* Navigation responsive, zentriert */
#navigation {
    display: flex !important;
    flex-wrap: wrap;
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
    justify-content: center;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    /* ensure nav sits above the hero image and overlays correctly */
    position: relative;
    z-index: 21;
}
    width: 100%;
    box-sizing: border-box;
}

#navigation li {
    display: inline-block;
    margin: 0;
}

#navigation li a {
    /* remove grey boxes / highlights on mobile */
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    color: #25a8a3;
    padding: 9px 16px;
    text-decoration: none;
}

/* ensure hover/active don't add a background */
#navigation li a:hover,
#navigation li a:active {
    background: transparent !important;
    color: #0ba39c;
}

/* keep an accessible focus style but without the grey fill */
#navigation li a:focus,
#navigation li a:focus-visible {
    background: transparent !important;
    outline: 3px solid rgba(11,163,156,0.18);
    outline-offset: 2px;
}

/* if any parent rule forces a background, this will override it */
#header #navigation li a,
#header ul#navigation li a {
    background: transparent !important;
    box-shadow: none !important;
}

#navigation li {
    display: inline-block;
    margin: 0;
}

#navigation li a {
    display: block;
    font-size: 16px;
    color: #25a8a3;
    text-decoration: none;
    padding: 9px 16px;
    border-radius: 4px;
    background: #f6f6f6;
    min-width: 70px;
    text-align: center;
/* Mobile Menü-Button */
#mobile-navigation {
    background: url(../images/mobile-menu.png) no-repeat center center;
    display: block;
    margin: 22px auto 0 auto;
    padding: 0;
    width: 44px;
    height: 44px;
    /* keep the button above the hero and aligned with the header/nav */
    position: relative;
    z-index: 22;
}
    display: block;
    margin: 22px auto 0 auto;
    padding: 0;
    width: 44px;
    height: 44px;
}

#featured {
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
    position: relative;
    margin: 0 0 20px 0;
    /* make sure the featured section sits below header/navigation */
    z-index: 1;
}

/* Featured hero: Bild responsiv, overlay text */
#featured {
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
    position: relative;
    margin: 0 0 20px 0;
}
#featured img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 0;
    max-height: 100%;
    min-height: 120px;
}
#bodytext {
    position: absolute;
    left: 6px; right: 6px; bottom: 15px;
    margin: 0;
    padding: 12px;
    background: rgba(38,44,72,0.80);
    color: #fff;
	/* make featured and gallery images square */
	#featured img,
	.gallery-wrapper ul li img {
		border-radius: 0 !important;
	}

	/* if you want the overlay (#bodytext) square as well */
			border-radius: 0;
    box-shadow: 0 4px 14px rgba(38,44,72,0.13);
    font-size: 15px;
    line-height: 1.3;
    z-index: 2;
    width: auto;
    max-width: calc(100vw - 12px);
    box-sizing: border-box;
}
#bodytext h2 { font-size: 18px; font-weight: bold; margin: 0 0 9px 0; }
#bodytext span { display: block; margin: 4px 0; font-size: 15px; }
#bodytext a.more {
    display: inline-block;
    margin-top: 8px;
    background: #0ba39c;
    color: #fff;
    padding: 8px 14px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    font-size: 15px;
    white-space: nowrap;
}

/* Galerie Container */
.gallery-wrapper {
    width: 100%;
    padding: 0 0;
    margin: 0 auto;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    margin: 0 auto 6px; /* weniger Abstand vor Footer auf kleinen Bildschirmen */
}
.gallery-wrapper ul {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin: 0 auto;
    padding: 16px 6px 6px 6px; /* noch weniger bottom padding auf mobil */
    max-width: 97vw;
    box-sizing: border-box;
    list-style: none;
}
.gallery-wrapper ul li {
    flex: 0 0 45%;
    min-width: 120px;
    max-width: 180px;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    margin: 0;
}
.gallery-wrapper ul li img {
    width: 100%;
    aspect-ratio: 1/1;
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(44,62,80,0.10);
    object-fit: cover;
    object-position: center;
    display: block;
    overflow: hidden;
}

/* Footer */
#footer {
    width: 100%;
    margin: 0 0 0 0;
    padding: 0px 0 0 0;
    box-sizing: border-box;
    background: (0, 4%, 17%)#252525;
    border-top: 1px solid #eee;
}
#footer div {
    width: 100%;
    margin: 0 auto;
}
#footer p {
    margin: 0 0 9px 0;
    text-align: center;
    color: #666;
    font-size: 14px;
}
#footer ul {
    margin: 0 auto;
    width: 100%;
    display: flex;
    gap: 9px;
    justify-content: center;
    padding: 0;
    list-style: none;
}
#footer ul li a {
    display: inline-block;
    padding: 6px 14px;
    background: #25a8a3;
    color: #fff;
    border-radius: 4px;
    font-size: 13px;
    text-decoration: none;
}

/* Medienregel für kleinste Geräte */
@media (max-width: 420px) {
    #header a.logo,
    #header a.logo img { width: 95vw; max-width: 155px; }
    .gallery-wrapper ul li { min-width: 90vw; max-width: 95vw; }
    #featured img { min-height: 90px; }
    #bodytext { font-size: 14px; padding: 8px; }
}

@media (max-width: 568px) {
  /* center contact card and give 20% left/right padding */
  .contact-wrapper {
    max-width: none !important;
    width: auto !important;
    margin: 32px auto 48px !important;
    padding: 24px 20% !important; /* 20% padding left/right */
    box-sizing: border-box !important;
    border-radius: 12px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important; /* form takes full available width */
  }

  /* ensure form controls fill the padded area */
  .contact-wrapper form {
    width: 100% !important;
    align-items: stretch !important;
    gap: 18px;
  }
  .contact-wrapper form input,
  .contact-wrapper form textarea,
  .contact-wrapper form button {
    width: 100% !important;
    box-sizing: border-box;
  }
}

