html {
    box-sizing: border-box;
    -webkit-text-size-adjust: 100%;
    width: 100%;
    overflow-x: hidden;
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    margin: 0;
    background-color: #f5f7fb;
    color: #333;
    overflow-wrap: break-word;
    word-wrap: break-word;
    line-height: 1.5;
    width: 100%;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    border: 0;
}

header {
    background: #4CAF50;
    background: linear-gradient(90deg, #4CAF50, #6ec6ff);
    padding: 15px 20px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.logo {
    display: block;
    width: 160px;
    height: 90px;
    background-image: url("bilder/logo/logo.png");
    background-repeat: no-repeat;
    background-position: left center;
    background-size: contain;
    text-decoration: none;
    font-size: 0;
    line-height: 0;
    color: transparent;
    overflow: hidden;
    -ms-flex-negative: 0;
    flex-shrink: 0;
    margin-right: 16px;
    margin-bottom: 6px;
}

nav {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
}

nav a {
    display: inline-block;
    color: white;
    text-decoration: none;
    font-weight: bold;
    margin-right: 15px;
    margin-bottom: 8px;
    line-height: 1.4;
}

nav a:last-child {
    margin-right: 0;
}

nav a:hover,
nav a:focus {
    text-decoration: underline;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 30px 20px;
    width: 100%;
}

h1 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 20px;
    line-height: 1.25;
    color: #1f2d3d;
}

h2,
h3,
h4 {
    line-height: 1.3;
    overflow-wrap: break-word;
    word-wrap: break-word;
    color: #1f2d3d;
}

.hero-box,
.content-box,
.calendar-box,
.form-box,
.info-box,
.request-box,
.price-box,
.selected-box {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    padding: 24px;
    margin-bottom: 24px;
}

.intro-text {
    text-align: center;
    margin-bottom: 18px;
    line-height: 1.7;
    font-size: 19px;
}

/* SEO-Textblöcke auf Startseite */

.seo-text-box {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    padding: 24px;
    margin-bottom: 24px;
}

.seo-text-box h2 {
    margin-top: 0;
    margin-bottom: 14px;
}

.seo-text-box p {
    margin-top: 0;
    margin-bottom: 14px;
    font-size: 17px;
    line-height: 1.7;
}

.seo-text-box p:last-child {
    margin-bottom: 0;
}

/* Startseite Karten */

.cards {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    -webkit-box-align: stretch;
    -ms-flex-align: stretch;
    align-items: stretch;
    max-width: 1000px;
    margin: 30px auto 0 auto;
    gap: 30px;
}

.card {
    background: white;
    width: 100%;
    max-width: 480px;
    -webkit-box-flex: 1;
    -ms-flex: 1 1 420px;
    flex: 1 1 420px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    text-align: center;
    margin: 0 0 24px 0;
}

.card-image-link {
    display: block;
    background: #ffffff;
}

.card-image {
    display: block;
    width: 100%;
    height: 260px;
    object-fit: cover;
}

.card-content {
    padding: 20px 18px 12px 18px;
}

.card-content h2 {
    margin-top: 0;
    margin-bottom: 12px;
}

.card-content p {
    margin-top: 0;
    margin-bottom: 14px;
    line-height: 1.6;
}

.card-buttons {
    padding: 0 15px 18px 15px;
}

.button {
    display: inline-block;
    padding: 10px 18px;
    margin: 5px;
    border-radius: 8px;
    background: #4CAF50;
    color: white;
    text-decoration: none;
    font-weight: bold;
    border: none;
    cursor: pointer;
    line-height: 1.35;
    text-align: center;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.button.secondary {
    background: #2196F3;
}

.button:hover,
.button:focus {
    opacity: 0.9;
}

.hero-image {
    max-width: 980px;
    margin: 0 auto 24px auto;
    background: white;
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.hero-image.small {
    max-width: 500px;
}

.hero-image img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 10px;
}

/* Galerie */

.gallery {
    margin-top: 30px;
}

.gallery-item {
    display: inline-block;
    vertical-align: top;
    width: 31%;
    margin: 0 1% 20px 1%;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.gallery-item img {
    display: block;
    width: 100%;
    height: auto;
}

.gallery-feature {
    max-width: 900px;
    margin: 0 auto 24px auto;
    background: white;
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.gallery-feature .gallery-open-button {
    display: block;
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    cursor: pointer;
}

.gallery-feature .gallery-open-button img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 12px;
}

.gallery-thumbs .gallery-item {
    width: 23%;
    margin: 0 1% 18px 1%;
}

.gallery-open-button {
    display: block;
    width: 100%;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    cursor: pointer;
}

.gallery-open-button img {
    display: block;
    width: 100%;
    height: auto;
}

/* Kalender */

.calendar {
    width: 100%;
    max-width: 980px;
    margin: 0 auto 30px auto;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.month-header {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    margin-bottom: 20px;
    gap: 12px;
}

.month-header > * {
    margin-bottom: 8px;
}

.calendar-grid {
    font-size: 0;
    width: 100%;
    max-width: 100%;
}

.weekday,
.day,
.weekend-block,
.outside {
    display: inline-block;
    vertical-align: top;
    width: 13.4%;
    margin: 0.4%;
    font-size: 16px;
    min-width: 0;
    max-width: 100%;
}

.weekday {
    padding: 12px 6px;
    border-radius: 8px;
    font-weight: bold;
    background: #e5e5e5;
    text-align: center;
    line-height: 1.25;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.day,
.weekend-block {
    padding: 10px 6px;
    border-radius: 8px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    min-height: 72px;
    line-height: 1.2;
    text-align: center;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.day-number {
    display: block;
    font-size: 16px;
    margin-bottom: 4px;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.price-label {
    display: block;
    font-size: 13px;
    opacity: 0.95;
    line-height: 1.2;
    max-width: 100%;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.weekend-title {
    display: block;
    font-size: 15px;
    margin-bottom: 4px;
    line-height: 1.15;
    max-width: 100%;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.weekend-dates {
    display: block;
    font-size: 14px;
    opacity: 0.95;
    line-height: 1.15;
    max-width: 100%;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.free {
    background: #6BCB77;
    color: white;
}

.request {
    background: #cccccc;
    color: #222;
}

.booked {
    background: #FF6B6B;
    color: white;
}

.past {
    background: #bdbdbd !important;
    color: #333 !important;
    cursor: not-allowed !important;
}

.outside {
    background: #efefef;
    color: #999;
    cursor: default;
    min-height: 72px;
    border-radius: 8px;
    padding: 10px 6px;
}

button.day:disabled,
button.weekend-block:disabled {
    opacity: 1;
    cursor: not-allowed;
}

/* Formulare */

input,
textarea,
select {
    padding: 10px;
    margin: 5px;
    border-radius: 6px;
    border: 1px solid #aaa;
    width: 220px;
    max-width: 90%;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
}

textarea {
    width: 460px;
    max-width: 90%;
    min-height: 100px;
    resize: vertical;
}

.remarks-label {
    display: block;
    margin-top: 12px;
    font-weight: bold;
}

.form-row,
.submit-wrap {
    text-align: center;
}

.price-form {
    text-align: center;
    margin-top: 20px;
}

.price-field {
    display: inline-block;
    vertical-align: top;
    text-align: left;
    min-width: 220px;
    max-width: 100%;
    margin: 0 10px 15px 10px;
}

.price-field label {
    display: block;
    margin-bottom: 6px;
    font-weight: bold;
    line-height: 1.3;
}

/* Verwaltung */

.request-box ul {
    padding-left: 18px;
    margin: 0;
}

.request-box li {
    margin-bottom: 10px;
}

.detail-group {
    margin-top: 18px;
}

.detail-card {
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 12px;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.request-card {
    background: #efefef;
}

.booked-card {
    background: #ffe0e0;
}

.detail-actions {
    margin-top: 10px;
}

.detail-actions .button {
    margin-right: 8px;
    margin-bottom: 8px;
}

/* Impressum / Datenschutz */

.info-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    padding: 24px;
    margin-bottom: 24px;
}

.info-section h2 {
    margin-top: 0;
    margin-bottom: 14px;
    color: #1f4f7a;
}

.info-section p,
.info-section li {
    font-size: 17px;
    line-height: 1.7;
    color: #333;
}

.info-section ul {
    padding-left: 22px;
    margin-top: 10px;
}

/* Lightbox */

body.lightbox-open {
    overflow: hidden;
}

.lightbox {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    display: none;
    z-index: 9999;
}

.lightbox.active {
    display: block;
}

.lightbox-backdrop {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.82);
}

.lightbox-content {
    position: relative;
    z-index: 2;
    width: 92%;
    max-width: 1200px;
    height: 88vh;
    max-height: 900px;
    margin: 4vh auto;
    text-align: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 100%;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    background: white;
}

.lightbox-close {
    position: absolute;
    top: -8px;
    right: 0;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    color: #222;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    margin-top: -27px;
    width: 54px;
    height: 54px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: #222;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.lightbox-prev {
    left: 12px;
}

.lightbox-next {
    right: 12px;
}

.lightbox-caption {
    position: absolute;
    left: 50%;
    bottom: -10px;
    margin: 0;
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.72);
    color: white;
    font-size: 15px;
    text-align: center;
    -webkit-transform: translateX(-50%);
    transform: translateX(-50%);
    max-width: 90%;
    line-height: 1.35;
}

/* Footer */

footer {
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    background: #eee;
}

.footer-links {
    text-align: center;
    margin-bottom: 10px;
}

.footer-links a {
    display: inline-block;
    color: #1f4f7a;
    text-decoration: none;
    font-weight: 600;
    margin: 0 10px 8px 10px;
}

.footer-links a:hover,
.footer-links a:focus {
    text-decoration: underline;
}

/* Grid-Unterstützung */

@supports (display: grid) {
    .gallery {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        grid-gap: 20px;
    }

    .gallery-item {
        width: auto;
        margin: 0;
    }

    .gallery-thumbs {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        grid-gap: 18px;
    }

    .gallery-thumbs .gallery-item {
        width: auto;
        margin: 0;
    }

    .calendar-grid {
        display: grid;
        grid-template-columns: repeat(7, minmax(0, 1fr));
        grid-gap: 6px;
        font-size: 16px;
        width: 100%;
        max-width: 100%;
    }

    .weekday,
    .day,
    .weekend-block,
    .outside {
        width: auto;
        margin: 0;
        min-width: 0;
        max-width: 100%;
    }
}

@media (max-width: 900px) {
    .gallery-item {
        width: 48%;
    }

    .gallery-thumbs .gallery-item {
        width: 48%;
    }

    .gallery-feature {
        max-width: 760px;
    }
}

@media (max-width: 700px) {
    header {
        -webkit-box-pack: center;
        -ms-flex-pack: center;
        justify-content: center;
        text-align: center;
    }

    .logo {
        width: 140px;
        height: 80px;
        background-position: center;
        margin-right: 0;
    }

    nav {
        -webkit-box-pack: center;
        -ms-flex-pack: center;
        justify-content: center;
    }

    nav a {
        margin-right: 10px;
        margin-left: 10px;
    }

    .container {
        padding: 24px 16px;
    }

    .cards {
        margin-top: 24px;
        gap: 24px;
    }

    .card {
        display: block;
        width: 100%;
        max-width: 100%;
        -webkit-box-flex: 1;
        -ms-flex: 1 1 100%;
        flex: 1 1 100%;
        margin: 0 auto 24px auto;
    }

    .card-image {
        height: auto;
    }

    .month-header {
        display: grid;
        grid-template-columns: 52px 1fr 52px;
        gap: 10px;
        align-items: center;
        text-align: center;
    }

    .month-header > * {
        margin-bottom: 0;
    }

    .month-header .button,
    .month-header button {
        width: 52px;
        min-width: 52px;
        max-width: 52px;
        padding: 10px 0;
        margin: 0;
        -ms-flex-negative: 0;
        flex-shrink: 0;
    }

    .calendar {
        padding: 16px 10px;
    }

    .calendar-grid {
        font-size: 0;
    }

    .weekday,
    .day,
    .weekend-block,
    .outside {
        min-height: 60px;
        padding: 8px 4px;
    }

    .weekday {
        font-size: 12px;
        line-height: 1.15;
    }

    .day,
    .weekend-block,
    .outside {
        font-size: 12px;
    }

    .day-number {
        font-size: 14px;
        margin-bottom: 3px;
    }

    .price-label {
        font-size: 11px;
        line-height: 1.15;
    }

    .weekend-title {
        font-size: 12px;
        line-height: 1.1;
        margin-bottom: 3px;
    }

    .weekend-dates {
        font-size: 11px;
        line-height: 1.1;
    }

    input,
    textarea,
    select {
        width: 100%;
        max-width: 100%;
        margin: 5px 0;
    }

    textarea {
        width: 100%;
        max-width: 100%;
    }

    .price-field {
        display: block;
        width: 100%;
        min-width: 0;
        margin: 0 0 15px 0;
    }

    .gallery-item,
    .gallery-thumbs .gallery-item {
        width: 100%;
        margin: 0 0 16px 0;
    }

    .gallery-feature {
        max-width: 100%;
        padding: 12px;
    }

    .lightbox-content {
        width: 96%;
        height: 82vh;
        margin: 6vh auto;
    }

    .lightbox-nav {
        width: 46px;
        height: 46px;
        font-size: 24px;
        margin-top: -23px;
    }

    .lightbox-prev {
        left: 6px;
    }

    .lightbox-next {
        right: 6px;
    }

    .lightbox-close {
        top: -4px;
        right: 4px;
        width: 42px;
        height: 42px;
        font-size: 28px;
    }

    .lightbox-caption {
        width: 92%;
        bottom: -4px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 20px 12px;
    }

    .hero-box,
    .content-box,
    .calendar-box,
    .form-box,
    .info-box,
    .request-box,
    .price-box,
    .selected-box,
    .info-section,
    .calendar,
    .gallery-feature,
    .seo-text-box {
        padding: 16px 12px;
    }

    .logo {
        width: 120px;
        height: 70px;
    }

    nav a {
        font-size: 14px;
        margin-right: 8px;
        margin-left: 8px;
    }

    .button {
        width: 100%;
        max-width: 100%;
        margin: 5px 0;
        padding: 12px 14px;
    }

    .month-header .button,
    .month-header button {
        width: 48px;
        min-width: 48px;
        max-width: 48px;
        padding: 10px 0;
        margin: 0;
    }

    .calendar {
        padding: 14px 8px;
    }

    .calendar-grid {
        grid-gap: 4px;
    }

    .weekday,
    .day,
    .weekend-block,
    .outside {
        min-width: 0;
        min-height: 54px;
        padding: 6px 3px;
        border-radius: 7px;
    }

    .weekday {
        font-size: 10px;
        line-height: 1.1;
    }

    .day-number {
        font-size: 12px;
        margin-bottom: 2px;
    }

    .price-label {
        font-size: 9px;
        line-height: 1.05;
    }

    .weekend-title {
        font-size: 10px;
        line-height: 1.05;
        margin-bottom: 2px;
    }

    .weekend-dates {
        font-size: 9px;
        line-height: 1.05;
    }

    .info-section p,
    .info-section li,
    .seo-text-box p {
        font-size: 16px;
    }
}