/* Mobile Optimierung – Desktop-Layout bleibt ab 769px unverändert */
.mobileMenuButton { display: none; }

@media screen and (max-width: 768px) {
    html, body { width: 100%; min-width: 0; overflow-x: hidden; }
    body { -webkit-text-size-adjust: 100%; }
    * { box-sizing: border-box; }

    .fix_back {
        position: relative;
        top: auto; right: auto; bottom: auto; left: auto;
        width: 100%;
        min-height: 100vh;
        padding-left: 0;
        overflow: visible;
    }

    .wrapper {
        width: 100%;
        max-width: 100%;
        padding-left: 16px;
        padding-right: 16px;
    }

    #header {
        min-height: 150px;
        background-color: #ffffff;
    }

    #header .wrapper { min-height: 150px; padding-top: 1px; }

    #logo {
        top: 50px;
        left: 16px;
        max-width: calc(100% - 90px);
    }
    #logo .logoImage {
        width: auto;
        max-width: 100%;
        height: auto;
        max-height: 62px;
        margin-top: 0;
    }

    #topIcons {
        height: 46px;
        padding-top: 12px;
        padding-right: 0;
    }
    #topIcons li { margin-right: 8px; }
    #topIcons .home1, #topIcons .home { display: none; }

    .mobileMenuButton {
        display: block;
        position: absolute;
        top: 62px;
        right: 16px;
        z-index: 30;
        width: 48px;
        height: 44px;
        padding: 9px 10px;
        border: 0;
        border-radius: 3px;
        background: #92b152;
        color: #fff;
        cursor: pointer;
        text-indent: -9999px;
        overflow: hidden;
    }
    .mobileMenuButton span,
    .mobileMenuButton:before,
    .mobileMenuButton:after {
        content: "";
        display: block;
        height: 3px;
        margin: 5px 0;
        background: #fff;
        transition: transform .2s ease, opacity .2s ease;
    }
    .mobileMenuButton[aria-expanded="true"] span { opacity: 0; }
    .mobileMenuButton[aria-expanded="true"]:before { transform: translateY(8px) rotate(45deg); }
    .mobileMenuButton[aria-expanded="true"]:after { transform: translateY(-8px) rotate(-45deg); }

    #mainNav {
        display: none;
        position: absolute;
        top: 150px;
        left: 0;
        z-index: 25;
        width: 100%;
        height: auto;
        margin: 0;
        padding: 0 16px 14px;
        background: #ffffff;
        box-shadow: 0 8px 14px rgba(0,0,0,.18);
    }
    #mainNav.mobileOpen { display: block; }
    #mainNav > li {
        float: none;
        width: 100%;
        border-top: 1px solid rgba(0,0,0,.10);
    }
    #mainNav > li > a {
        height: auto;
        min-height: 48px;
        padding: 14px 10px;
        line-height: 20px;
        text-align: left;
        font-size: 14px;
    }
    #mainNav li .sub { display: block !important; position: static; }
    #mainNav li .arrow { display: none !important; }
    #mainNav li ul {
        position: static;
        min-width: 0;
        padding: 0 0 8px 16px;
        background: transparent;
        border: 0;
    }
    #mainNav li ul a {
        height: auto;
        min-height: 42px;
        padding: 11px 12px;
        line-height: 20px;
        color: #374b4b;
        font-size: 13px;
        border-top: 1px dashed rgba(0,0,0,.14);
    }
    #mainNav li ul a:hover { background: rgba(146,177,82,.08); }


    #mainNav > li > a { color: #374b4b; }
    #mainNav > .active > a, #mainNav > li > a:hover { color: #ffffff; }
    #topIcons { filter: none; }
    .footerGoogleReviews .googleRating { font-size: 18px; }

    #breadcrumbs { display: none; }
    #innerGraphic, #hpGraphic { display: none !important; }

    #content,
    .home #content {
        float: none;
        width: 100%;
        margin-top: 24px;
    }
    #sidebar { display: none; }

    .post {
        width: 100%;
        margin-bottom: 24px;
        padding: 20px 0 12px;
        background: rgba(255,255,255,.92);
    }
    .post .content,
    .post .content.full {
        float: none;
        width: 100% !important;
        padding: 0 18px 10px !important;
    }
    .post .content h1 { font-size: 28px; line-height: 1.15; }
    .post .content h2 { font-size: 25px; line-height: 1.2; }
    .post .content h3 { font-size: 22px; line-height: 1.25; }
    .post .content h4 { font-size: 19px; line-height: 1.3; }
    .post .content p,
    .post .content li,
    .post .content td,
    .post .content th { font-size: 16px; line-height: 1.5; }
    .post .content a { overflow-wrap: anywhere; }

    .button, .btn, .btn-primary, .btn-orange,
    button[type="submit"], input[type="submit"] {
        display: block;
        width: 100%;
        max-width: 100%;
        min-height: 48px;
        margin: 8px 0;
        padding: 13px 16px;
        text-align: center;
        white-space: normal;
    }

    img, iframe, video { max-width: 100%; height: auto; }
    .imgLeft, .imgRight, .postImage,
    .post .content .columnHalf,
    .post .content .columnHalf.first {
        float: none !important;
        width: 100% !important;
        margin: 0 0 16px !important;
    }

    .post .content table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .post .content table td,
    .post .content table th { padding: 9px 10px; min-width: 115px; }

    input[type="text"], input[type="email"], input[type="tel"], input[type="number"],
    input[type="date"], input[type="time"], input[type="datetime-local"], select, textarea {
        width: 100% !important;
        max-width: 100%;
        min-height: 48px;
        margin: 7px 0 16px !important;
        padding: 12px 14px;
        font-size: 16px !important;
        line-height: 1.35;
    }
    textarea { min-height: 120px; }
    label { font-size: 16px; line-height: 1.4; }

    .reservation-form .reservation-grid { display: block !important; }
    .reservation-form .reservation-field,
    .reservation-form .reservation-field--full { width: 100% !important; margin-bottom: 16px; }
    .reservation-form .reservation-menu label {
        display: flex;
        align-items: flex-start;
        gap: 10px;
        min-height: 44px;
        padding: 9px 0;
    }
    .reservation-form .reservation-menu input[type="radio"] {
        flex: 0 0 auto;
        width: 22px !important;
        height: 22px;
        margin: 0 !important;
    }
    .reservation-submit { padding-bottom: 0 !important; }

    /* Einladungskarten: Vorschau und Formular sauber untereinander */
    .content .customcontent,
    .content .customsidebar {
        float: none !important;
        width: 100% !important;
        min-height: 0 !important;
    }
    .content .customcontent { margin-bottom: 22px; }
    .content .customsidebar { text-align: left !important; }
    .content .customsidebar input,
    .content .customsidebar button { width: 100% !important; margin-left: 0 !important; margin-right: 0 !important; }
    .flyerimg { display: block; width: 100% !important; height: auto !important; margin: 0 auto; }
    #download { display: block !important; width: 100%; padding: 14px 16px !important; }

    #footer {
        width: calc(100% - 32px);
        margin: 34px 16px 0;
        padding: 24px 20px 18px;
    }
    #footer .col,
    #footer .wide,
    #footer .narrow {
        float: none;
        width: 100%;
        margin: 0 0 26px;
    }
    #footer .col:last-of-type { margin-bottom: 0; }
    #footer .gotoTop { display: none; }
    #footer h2 { font-size: 22px; }
    #credits { width: calc(100% - 32px); margin: 0 16px; padding: 16px 20px; }
    #credits .left, #credits .right { float: none; display: block; margin: 4px 0; }
}
@media screen and (max-width: 768px) {
    .content .customsidebar label {
        display: block;
        margin-top: 4px;
        color: #374b4b;
        font-weight: bold;
    }
}

/* Präzisierung: Facebook-Grün und sauberer mobiler Footer */
@media screen and (max-width: 768px) {
    .mobileMenuButton { background-color: #92b152; }
    #mainNav > .active > a,
    #mainNav > li > a:hover { background-color: #92b152; }
    #mainNav li ul a:hover { background-color: rgba(146,177,82,.12); }

    #footer .socialIcons {
        display: block;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }
    #footer .socialIcons li {
        display: block;
        width: fit-content;
        max-width: 100%;
        overflow: hidden;
    }
    #footer .socialIcons a {
        display: inline-block !important;
        width: auto !important;
        max-width: 100%;
        padding-right: 0;
        background-repeat: no-repeat !important;
    }
    #footer .socialIcons li::before,
    #footer .socialIcons li::after,
    #footer .socialIcons a::before,
    #footer .socialIcons a::after { content: none !important; display: none !important; }
}


/* Mobile Navigation: nur Logo und Burger im Kopfbereich */
@media screen and (max-width: 768px) {
    #topIcons { display: none !important; }

    #header,
    #header .wrapper { min-height: 124px; }

    #logo { top: 31px; }

    .mobileMenuButton { top: 40px; }

    #mainNav { top: 124px; padding-bottom: 20px; }

    #mainNav .mobileHomeLink,
    #mainNav .mobileMenuExtras { display: block; }

    #mainNav .mobileMenuExtras {
        padding: 16px 10px 4px;
        border-top: 1px solid rgba(0,0,0,.12);
    }

    #mainNav .mobileMenuExtras a {
        text-decoration: none;
    }

    #mainNav .mobileMenuActions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        margin-bottom: 18px;
    }

    #mainNav .mobileMenuAction {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        min-height: 50px;
        padding: 13px 16px;
        border-radius: 4px;
        font-size: 16px;
        font-weight: 700;
        line-height: 1.25;
        text-align: center;
    }

    #mainNav .mobileMenuActionPrimary {
        background: #92b152;
        color: #fff;
    }

    #mainNav .mobileMenuActionSecondary {
        border: 2px solid #92b152;
        background: #fff;
        color: #637a31;
    }

    #mainNav .mobileMenuSocial {
        display: flex;
        flex-wrap: wrap;
        gap: 10px 18px;
        align-items: center;
        padding: 2px 2px 12px;
    }

    #mainNav .mobileMenuSocial a {
        display: inline-flex;
        align-items: center;
        min-height: 40px;
        padding: 6px 0;
        color: #374b4b;
        font-size: 15px;
        font-weight: 700;
    }

    #mainNav .mobileMenuSocial a:before {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 28px;
        margin-right: 8px;
        border-radius: 50%;
        background: #92b152;
        color: #fff;
        font-family: Arial, sans-serif;
        font-size: 16px;
        font-weight: 700;
    }

    #mainNav .mobileFacebook:before { content: "f"; }
    #mainNav .mobileInstagram:before { content: "◎"; }

    #mainNav .mobileMenuRating {
        padding: 12px 2px 2px;
        border-top: 1px solid rgba(0,0,0,.10);
        color: #374b4b;
        font-size: 15px;
        line-height: 1.4;
    }

    #mainNav .mobileMenuRating a { color: #374b4b; }
    #mainNav .mobileMenuRating strong { color: #637a31; }
    #mainNav .mobileMenuRating .mobileStars {
        margin: 0 4px;
        color: #f5b400;
        letter-spacing: 1px;
        white-space: nowrap;
    }
}

@media screen and (min-width: 769px) {
    #mainNav .mobileHomeLink,
    #mainNav .mobileMenuExtras { display: none !important; }
}

/* Saubere SVG-Icons im mobilen Menü */
@media screen and (max-width: 768px) {
    #mainNav .mobileMenuAction {
        gap: 10px;
    }
    #mainNav .mobileSvgIcon {
        flex: 0 0 22px;
        width: 22px;
        height: 22px;
        fill: currentColor;
    }
    #mainNav .mobileMenuSocial a:before,
    #mainNav .mobileFacebook:before,
    #mainNav .mobileInstagram:before {
        content: none !important;
        display: none !important;
    }
    #mainNav .mobileMenuSocial a {
        gap: 8px;
    }
    #mainNav .mobileSocialSvg {
        flex: 0 0 30px;
        width: 30px;
        height: 30px;
        padding: 5px;
        border-radius: 50%;
        background: #92b152;
        fill: #fff;
    }
    #mainNav .mobileStars {
        display: inline-flex;
        align-items: center;
        gap: 1px;
        vertical-align: middle;
    }
    #mainNav .mobileStarSvg {
        width: 17px;
        height: 17px;
        color: #f5b400;
        fill: currentColor;
    }

    /* Breite Tabellen auf kleinen Displays vollständig lesbar */
    .post .content .mobileTableHint {
        display: flex;
        align-items: center;
        margin: 4px 0 8px;
        color: #637a31;
        font-size: 14px;
        font-weight: 700;
        line-height: 1.3;
    }
    .post .content .mobileTableHint:before {
        content: "↔";
        margin-right: 7px;
        font-size: 19px;
    }
    .post .content .mobileTableScroll {
        position: relative;
        display: block;
        width: calc(100% + 6px);
        max-width: calc(100% + 6px);
        margin-right: -6px;
        padding: 0 6px 8px 0;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scroll-padding-left: 0;
    }
    .post .content .mobileTableScroll:after {
        content: "";
        position: sticky;
        right: 0;
        display: block;
        float: right;
        width: 18px;
        height: 1px;
    }
    .post .content .mobileTableScroll table {
        display: table;
        width: auto !important;
        min-width: 680px;
        margin: 0;
        overflow: visible;
        table-layout: auto;
    }
    .post .content .mobileTableScroll table th,
    .post .content .mobileTableScroll table td {
        min-width: 135px;
        padding: 11px 12px;
        font-size: 15px;
        line-height: 1.4;
        vertical-align: top;
        white-space: normal;
    }
    .post .content .mobileTableScroll table th:first-child,
    .post .content .mobileTableScroll table td:first-child {
        position: sticky;
        left: 0;
        z-index: 2;
        min-width: 145px;
        box-shadow: 5px 0 7px rgba(0,0,0,.08);
    }
    .post .content .mobileTableScroll table tr:nth-child(odd) th:first-child,
    .post .content .mobileTableScroll table tr:nth-child(odd) td:first-child,
    .post .content .mobileTableScroll table .odd th:first-child,
    .post .content .mobileTableScroll table .odd td:first-child {
        background: #f4f4f4;
    }
    .post .content .mobileTableScroll table tr:nth-child(even) th:first-child,
    .post .content .mobileTableScroll table tr:nth-child(even) td:first-child {
        background: #fff;
    }

    /* Geburtstagstabelle benötigt etwas weniger Breite als die Preistabelle */
    .post .content .mobileTableScroll.mobileBirthdayTable table {
        min-width: 610px;
    }
}

@media screen and (max-width: 768px) {
    form[action="einladungskarten.php"] {
        display: block !important;
        margin-top: 18px;
    }
    form[action="einladungskarten.php"] .customcontent {
        width: 100% !important;
        margin: 0 0 20px !important;
    }
    form[action="einladungskarten.php"] .invitationForm {
        display: block !important;
        width: 100% !important;
        padding: 18px 16px !important;
        box-sizing: border-box;
    }
    form[action="einladungskarten.php"] .invitationField,
    form[action="einladungskarten.php"] .invitationFieldHalf {
        width: 100% !important;
        margin: 0 0 15px !important;
    }
    form[action="einladungskarten.php"] .invitationField label {
        display: block !important;
        margin: 0 0 7px !important;
        font-size: 16px !important;
        line-height: 1.3;
    }
    form[action="einladungskarten.php"] .invitationField input {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        height: 52px !important;
        min-height: 52px !important;
        margin: 0 !important;
        padding: 12px 13px !important;
        font-size: 16px !important;
        opacity: 1;
        -webkit-appearance: none;
        appearance: none;
    }
    form[action="einladungskarten.php"] input[type="date"],
    form[action="einladungskarten.php"] input[type="time"] {
        color: #263126 !important;
        background-color: #fff !important;
        -webkit-text-fill-color: #263126;
    }
    form[action="einladungskarten.php"] input[type="date"]::-webkit-date-and-time-value,
    form[action="einladungskarten.php"] input[type="time"]::-webkit-date-and-time-value {
        text-align: left;
        min-height: 24px;
    }
    form[action="einladungskarten.php"] .invitationSubmit {
        display: block !important;
        width: 100% !important;
        min-height: 52px !important;
        margin: 4px 0 0 !important;
        font-size: 17px !important;
    }
}
