body {
    font-family: 'Courier New', serif;
    height: 100%;
}

* {
    margin: 0px auto;
}

a, img {
    border: 0px;
}

a {
    text-decoration: none;
    color: black;
}

a:hover, .uppercase {
    text-transform: uppercase;
}

a:visited {
    text-decoration: none;
    color: black;
}

.bar {
    text-transform: uppercase;
    font-size: 10pt;
    font-family: 'Courier New', serif;
    line-height: 1.6;
}

.bar a {
    color: black;
    font-family: 'Courier New', serif;
    font-weight: bold;
    font-size: 10pt;
    text-decoration: none;
    transition: all 0.2s;
    display: inline-block;
    padding: 2px 0;
    border-bottom: 1px solid transparent;
}

.bar a:hover {
    border-bottom-color: black;
    text-decoration: none;
}

/* Breadcrumb separator styling */
.breadcrumb-sep {
    color: #666;
    margin: 0 6px;
    font-weight: normal;
}

#logo {
    display: block;
    left: 10px;
    top: 10px;
    position: absolute;
}

#logo img {
    width: 240px;
}

#footer {
    margin-top: 30px;
    margin-bottom: 40px;
    padding-top: 20px;
    padding-bottom: 20px;
    position: relative;
}

/* Search box in header (desktop) - positioned after last menu item */
#topheader #ontop {
    position: absolute;
    left: 1100px; /* After Instagram (980px) with spacing */
    top: 30px; /* Align with nav items */
    z-index: 11;
    margin-top: 0;
}

#topheader #ontop form {
    display: inline-flex;
    align-items: center;
    gap: 0;
}

/* Search input wrapper with icon */
.search-input-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 7px;
    color: #999;
    pointer-events: none;
    z-index: 1;
    transition: color 0.2s ease;
}

/* Search input styling for desktop - clean, borderless, minimal */
#topheader #ontop form input[type="text"],
#topheader #ontop form input[type="search"],
#topheader #ontop form #suche {
    padding: 8px 16px 8px 40px;
    font-size: 12pt;
    font-family: 'Courier New', serif;
    font-weight: normal;
    border: none;
    border-bottom: 1px solid transparent;
    border-radius: 0;
    background: transparent;
    color: black;
    min-width: 200px;
    transition: all 0.2s ease;
    box-sizing: border-box;
    outline: none;
}

/* Search icon turns black on focus */
.search-input-wrapper:has(input:focus) .search-icon {
    color: black;
}

/* Placeholder text turns black on focus */
#topheader #ontop form input[type="text"]:focus::placeholder,
#topheader #ontop form input[type="search"]:focus::placeholder,
#topheader #ontop form #suche:focus::placeholder {
    color: black;
    opacity: 1;
}

#topheader #ontop form input[type="text"]::placeholder,
#topheader #ontop form input[type="search"]::placeholder,
#topheader #ontop form #suche::placeholder {
    color: #999;
    opacity: 1;
    transition: color 0.2s ease;
}

#ontop a, #footer a {
    color: black;
}

#ontop a:hover, #footer a:hover {
    text-decoration: underline;
}

/* Footer link separators */
#footer .footer-separator {
    color: #999;
    margin: 0 8px;
    user-select: none;
}

.navi {
    position: absolute;
    top: 40px;
    font-family: 'Courier New', serif;
    font-size: 12pt;
    color: black;
    text-decoration: none;
    font-weight: bold;
}

.fundus {
    left: 270px;
}

.merkliste {
    left: 400px;
}

.anfahrt {
    left: 560px;
}

.wir {
    left: 700px;
}

.links {
    left: 860px;
}

.instagram {
    left: 980px;
}

.wir:hover, .fundus:hover, .merkliste:hover, .instagram:hover, .anfahrt:hover, .fundus:hover {
    text-transform: uppercase;
}

#line {
    top: 65px;
    position: absolute;
    width: 99.9%;
    color: transparent;
    border: 1px solid #666;
}

#topheader {
    z-index: 10;
    background: white;
    position: fixed;
    width: 100%;
    height: 65px;
}

#content-right {
    padding-top: 85px;
    padding-left: 250px;
    /* width: 80%; */
    /* width:775px;*/

    min-height: 300px;
    bottom: 50px;
    padding-right: 25px;
    z-index: 0;
    max-width: 1000px;
    float: left;
}

/* Paragraph and line break styles for TinyMCE content */
/* Exclude .border and .border_s paragraphs (they have their own styling) */
#content-right p:not(.border p):not(.border_s p):not(.bar) {
    margin: 1.5em 0 !important;
}

#content-right p:first-child:not(.border p):not(.border_s p) {
    margin-top: 0 !important;
}

#content-right p:last-child:not(.border p):not(.border_s p) {
    margin-bottom: 0 !important;
}

/* Headings should have bottom margin to create space before following content */
#content-right h1,
#content-right h2,
#content-right h3,
#content-right h4,
#content-right h5,
#content-right h6 {
    margin-bottom: 1.5em !important;
    margin-top: 1.5em !important;
}

#content-right h1:first-child,
#content-right h2:first-child,
#content-right h3:first-child,
#content-right h4:first-child,
#content-right h5:first-child,
#content-right h6:first-child {
    margin-top: 0 !important;
}

/* Divs that come directly after headlines should have top margin */
/* Use both + (adjacent) and ~ (general sibling) selectors to catch all cases */
#content-right h1 + div:not(.anfahrtLeft):not(.border):not(.border_s):not(.border2):not(.borderParent):not(.borderChild):not(.borderNew):not(.popup-gallery):not(.fundusbox):not(.related-items-container):not(.related-items-preview):not(.detailImages):not(.detailContent),
#content-right h1 ~ div:not(.anfahrtLeft):not(.border):not(.border_s):not(.border2):not(.borderParent):not(.borderChild):not(.borderNew):not(.popup-gallery):not(.fundusbox):not(.related-items-container):not(.related-items-preview):not(.detailImages):not(.detailContent),
#content-right h2 + div:not(.anfahrtLeft):not(.border):not(.border_s):not(.border2):not(.borderParent):not(.borderChild):not(.borderNew):not(.popup-gallery):not(.fundusbox):not(.related-items-container):not(.related-items-preview):not(.detailImages):not(.detailContent),
#content-right h2 ~ div:not(.anfahrtLeft):not(.border):not(.border_s):not(.border2):not(.borderParent):not(.borderChild):not(.borderNew):not(.popup-gallery):not(.fundusbox):not(.related-items-container):not(.related-items-preview):not(.detailImages):not(.detailContent),
#content-right h3 + div:not(.anfahrtLeft):not(.border):not(.border_s):not(.border2):not(.borderParent):not(.borderChild):not(.borderNew):not(.popup-gallery):not(.fundusbox):not(.related-items-container):not(.related-items-preview):not(.detailImages):not(.detailContent),
#content-right h3 ~ div:not(.anfahrtLeft):not(.border):not(.border_s):not(.border2):not(.borderParent):not(.borderChild):not(.borderNew):not(.popup-gallery):not(.fundusbox):not(.related-items-container):not(.related-items-preview):not(.detailImages):not(.detailContent),
#content-right h4 + div:not(.anfahrtLeft):not(.border):not(.border_s):not(.border2):not(.borderParent):not(.borderChild):not(.borderNew):not(.popup-gallery):not(.fundusbox):not(.related-items-container):not(.related-items-preview):not(.detailImages):not(.detailContent),
#content-right h4 ~ div:not(.anfahrtLeft):not(.border):not(.border_s):not(.border2):not(.borderParent):not(.borderChild):not(.borderNew):not(.popup-gallery):not(.fundusbox):not(.related-items-container):not(.related-items-preview):not(.detailImages):not(.detailContent),
#content-right h5 + div:not(.anfahrtLeft):not(.border):not(.border_s):not(.border2):not(.borderParent):not(.borderChild):not(.borderNew):not(.popup-gallery):not(.fundusbox):not(.related-items-container):not(.related-items-preview):not(.detailImages):not(.detailContent),
#content-right h5 ~ div:not(.anfahrtLeft):not(.border):not(.border_s):not(.border2):not(.borderParent):not(.borderChild):not(.borderNew):not(.popup-gallery):not(.fundusbox):not(.related-items-container):not(.related-items-preview):not(.detailImages):not(.detailContent),
#content-right h6 + div:not(.anfahrtLeft):not(.border):not(.border_s):not(.border2):not(.borderParent):not(.borderChild):not(.borderNew):not(.popup-gallery):not(.fundusbox):not(.related-items-container):not(.related-items-preview):not(.detailImages):not(.detailContent),
#content-right h6 ~ div:not(.anfahrtLeft):not(.border):not(.border_s):not(.border2):not(.borderParent):not(.borderChild):not(.borderNew):not(.popup-gallery):not(.fundusbox):not(.related-items-container):not(.related-items-preview):not(.detailImages):not(.detailContent) {
    margin-top: 1.5em !important;
}

/* Ensure br tags don't add extra spacing - they should just create a line break */
/* br tags are inline and create minimal line breaks */
#content-right br {
    line-height: 1;
    display: inline;
    margin: 0;
    padding: 0;
}

/* If br is inside a p or div, it should only create a minimal line break */
#content-right p br,
#content-right div br {
    line-height: 1;
}

#content-left {
    top: 125px;
    margin-left: 10px;
    width: 175px;
    /* width: 15%; */
    position: absolute;
    z-index: 0;
}

.startseite {
    min-height: 600px;
}

li.active {
    list-style: circle;
}

#content-left ul {
    list-style: none;
    margin-left: -30px;
}

#content-left li {
    padding: 1px;
}

#content-left a {
    color: black;
}

.anfahrtLeft {
    float: left;
    width: 368px;
    margin-right: 20px;
}

.borderParent {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 2;
    text-align: center;
    overflow: hidden;
    /* Ensure container is always square */
    min-width: 100%;
    min-height: 100%;
}

.borderParent img {
    /* Use object-fit: cover to fill container and crop excess - this eliminates white bars */
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.borderChild {
    background: url("../img/border.png");
    width: 100%;
    height: 100%;
    text-align: center;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 4;
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
}

.borderNew {
    background: url("../img/new.png");
    width: 100%;
    height: 100%;
    text-align: center;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 3;
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
}

.bordernew {
    width: 155px;
    margin-top: -190px;
    position: relative;
}

.border, .border2, .border_s {
    display: block;
    margin: 0px;
    width: 150px;
    height: 150px;
    float: left;
    margin-bottom: 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
    /* Force square aspect ratio */
    min-width: 150px;
    min-height: 150px;
    max-width: 150px;
    max-height: 150px;
}

.border *, .border2 *, .border_s *, .borderParent * {
    vertical-align: middle;
}

.borderParent span, .border span, .border_s span {
    display: inline-block;
    height: 100%;
    width: 1px;
}

.border p, .border_s p {
    display: none;
    color: black;
    font-family: 'Courier New', serif;
    font-size: 12pt;
    position: absolute;
    width: 300px;
    z-index: 5;
    top: 150px;
    left: -75px;
    margin: 0;
    padding: 4px;
    box-sizing: border-box;
}

/* White background for border paragraphs ONLY on startpage */
body.startpage .border p,
body.startpage .border_s p {
    background: white;
}

/* Show paragraph on hover for .hover class */
.border.hover:hover p,
.border.hover p.show {
    display: block !important;
}

/* Show paragraph on hover for .border_s (used on startpage) */
.border_s:hover p {
    display: block !important;
}

/* Allow paragraph to be visible on hover - override overflow: hidden */
.border.hover:hover,
.border_s:hover {
    overflow: visible !important;
}

.border_s p {
    text-transform: none;
}

.border2 p {
    color: black;
    font-family: 'Courier New', serif;
    font-size: 10pt;
    position: absolute;
    width: 170px;
    margin-top: -25px;
}


center.pages a {
    padding: 3px;
    color: black;
}

center.pages a:hover {
    font-weight: bold;
}

fieldset.merke {
    width: 900px;
    min-height: 50px;
    margin: 5px;
}

fieldset.merke a:hover {
    text-decoration: underline;
}

/* Base button styles - consistent across all frontend buttons */
button,
input[type="submit"],
input[type="button"],
button.ui-state-default,
button.ui-corner-all {
    font-family: 'Courier New', serif;
    font-weight: bold;
    cursor: pointer;
    border: 1px solid black;
    background: white;
    color: black;
    transition: all 0.2s;
    padding: 10px 20px;
    font-size: 12pt;
    vertical-align: middle;
    box-sizing: border-box;
    border-radius: 0;
}

button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
button.ui-state-hover,
button.ui-state-default:hover {
    background: black;
    color: white;
    text-transform: uppercase;
    cursor: pointer;
    border-color: black;
}

.hidden, .preloadHover {
    display: none;
}

#warenkorbcount {
    right: 20px;
    top: 80px;
    font-size: 10pt;
    z-index: 12;
    position: fixed;
}

ol {
    margin: 10px;
}

ol li {
    margin: 10px;
}

ul > ul li {
    font-size: 10pt;
}

ul > ul > ul li {
    font-size: 10pt;
}

li[category="zu Verkaufen"] {
    margin-top: 10pt;
}

.login {
    padding: 15px;
    text-align: center;
}

.login form input {
    width: 250px;
    height: 25px;
    margin: 2px;
    border: 1px solid #666;
}

.uploadxls {
    text-align: left;
}

.uploadxls form input {
    width: 250px;
    height: 25px;
    margin: 2px;
    border: 1px solid #666;
}

div.admin {
    margin-left: -250px;
    padding: 10px;
}

div.changes {
    margin: 15px;
    padding: 5px;
    overflow: auto;
    height: 450px;
}

#showold {
    cursor: pointer;
}

#oldxls {
    display: none;
}

#oldxls a:hover {
    text-decoration: underline;
}

ul#adminnavi {
    padding: 1px;
}

ul#adminnavi li {
    list-style: none;
    display: inline;
}

ul#adminnavi li:before {
    content: '\00B7 \0020'
}

.cpw_error {
    color: red;
    font-weight: bold;
}

/* AnythingZoomer */
.az-wrap, .az-small, .az-large {
    position: relative;
}

.az-wrap-inner {
    display: block;
}

/* This wraps the large image and hides it */
.az-zoom {
    background: #fff;
    border: #333 1px solid;
    position: absolute;
    top: 0;
    left: 0;
    width: 200px;
    height: 200px;
    overflow: hidden;
    z-index: 100;
    display: none;
    -moz-box-shadow: inset 0px 0px 4px #000;
    -webkit-box-shadow: inset 0px 0px 4px #000;
    box-shadow: inset 0px 0px 4px #000;
}

/* Class applied to az-mover when large image is windowed */
.az-windowed {
    overflow: hidden;
    position: absolute;
}

/* Class applied to az-mover when large image is fully shown */
.az-expanded {
    height: auto;
    width: auto;
    position: static;
    overflow: visible;
}

.zoom {
    width: 300px;
}

.small img {
    width: 300px;
}

.large img {
    background: white;
}

.clear {
    clear: both;
}

/* Fundus category headers - reduce spacing for better visual grouping */
#content-right h3.fundus-category-header {
    margin-bottom: 0 !important;
}

/* Mobile: fundus headers need more top spacing and larger font */
@media screen and (max-width: 768px) {
    #content-right h3.fundus-category-header {
        padding-top: 20px !important;
        margin-bottom: 5px !important;
        font-size: 16px !important;
        font-weight: bold;
    }
}

.popup textarea {
    width: 550px;
    border: 1px solid grey;
    height: 400px;
}

.popup form input {
    width: 350px;
}

#mlisteform form input {
    margin-bottom: 5px;
}

.popup label, .popup small {
    font-size: 8pt;
}

.popup input, .popup textarea {
    display: block;
}

.popup {
    margin: 0px;
    padding: 0px;
    display: none;
}

/* Merkliste form - inline container */
.merkliste-form-container {
    margin: 30px 0;
    padding: 30px;
    background: white;
    border: 1px solid #666;
    border-radius: 0;
    font-family: 'Courier New', serif;
}

.merkliste-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #666;
}

.merkliste-form-header h3 {
    margin: 0;
    font-size: 16pt;
    font-weight: bold;
    color: black;
    font-family: 'Courier New', serif;
}

.close-button {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    font-family: 'Courier New', serif;
}

.close-button:hover {
    color: #000;
}

.merkliste-form-column {
    display: inline-block;
    vertical-align: top;
    width: 48%;
    margin-right: 2%;
}

.merkliste-form-column:last-child {
    margin-right: 0;
}

/* Form inputs styling */
#mlisteform input,
#mlisteform textarea,
#mlisteform select {
    width: 100%;
    font-size: 12pt;
    border: 1px solid black;
    font-family: 'Courier New', serif;
    margin: 3px 0 15px 0;
    padding: 8px;
    box-sizing: border-box;
    background: white;
}

#mlisteform textarea {
    height: 319px;
    resize: vertical;
}

#mlisteform label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 12pt;
    color: black;
    font-family: 'Courier New', serif;
}

#mlisteform label p.error {
    color: #ED4337;
    font-size: 10pt;
    margin-left: 8px;
    display: inline;
}

.merkliste-form-buttons {
    margin-top: 25px;
    display: flex;
    gap: 15px;
    align-items: center;
}

.merkliste-submit-btn,
.merkliste-cancel-btn {
    /* Override any conflicting styles and use base button styles */
    height: auto;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Courier New', serif !important;
    font-weight: bold !important;
    cursor: pointer !important;
    border: 1px solid black !important;
    background: white !important;
    color: black !important;
    transition: all 0.2s !important;
    padding: 10px 20px !important;
    font-size: 12pt !important;
    vertical-align: middle !important;
    box-sizing: border-box !important;
    border-radius: 0 !important;
    margin: 0 !important;
}

.merkliste-submit-btn {
    flex: 1;
}

.merkliste-submit-btn:hover {
    background: black !important;
    color: white !important;
    text-transform: uppercase !important;
    border-color: black !important;
}

.merkliste-cancel-btn {
    flex: 0 0 auto;
}

.merkliste-cancel-btn:hover {
    background: black !important;
    color: white !important;
    text-transform: uppercase !important;
    border-color: black !important;
}

/* reCAPTCHA styling */
#mlisteform .g-recaptcha {
    margin: 15px 0 20px 0;
    float: none;
}

/* Error states */
#mlisteform input.error,
#mlisteform textarea.error {
    border-color: #ED4337;
    background: #FFEEEE;
}

.mlistebuttons {
    margin: 20px 0;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.mlistebuttons button,
.mlistebuttons button.ui-state-default,
.mlistebuttons button.ui-corner-all {
    /* Override jQuery UI styles and use base button styles */
    min-width: 150px;
    height: auto;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Courier New', serif !important;
    font-weight: bold !important;
    cursor: pointer !important;
    border: 1px solid black !important;
    background: white !important;
    color: black !important;
    transition: all 0.2s !important;
    padding: 10px 20px !important;
    font-size: 12pt !important;
    vertical-align: middle !important;
    box-sizing: border-box !important;
    border-radius: 0 !important;
    margin: 0 !important;
}

.mlistebuttons button:hover,
.mlistebuttons button.ui-state-hover,
.mlistebuttons button.ui-state-default:hover {
    background: black !important;
    color: white !important;
    text-transform: uppercase !important;
    border-color: black !important;
}

.mlistebuttons a {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.mlistebuttons a:hover {
    text-transform: none;
}

.mlistebuttons a button {
    width: 100%;
}

#kontakt form input {
    margin-bottom: 5px;
}

#kontaktform div {
    float: left;
}

.hidden {
    display: none;
}

.merkepic {
    float: left;
    margin-right: 10px;
    width: 150px;
    min-width: 150px;
    max-width: 150px;
}

.merkepic img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    object-position: center;
    display: block;
}

.merkedet {
    float: left;
    width: 700px;
}

label.error {
    display: none;
    background-color: white;
    color: #ED4337;
}

label p {
    display: inline;
}

.error {
    background: #FFEEEE; /*#ED4337;*/
    border-color: #ED4337;
}

textarea.error {
    border: 1px solid #ED4337;
}

#content {
    width: 100%;
}

.pfeil {
    display: none;
    position: absolute;
    z-index: 3;
}

.r90 {
    transform: rotate(90deg);
}

.r180 {
    transform: rotate(180deg);
}

.r270 {
    transform: rotate(270deg);
}

#Fundus_Pfeil {
    top: 60px;
    left: 285px;
}

#Merkliste_Pfeil {
    top: 60px;
    left: 430px;
}

#Instagram_Pfeil {
    top: 60px;
    left: 1010px;
}

#Suche_Pfeil {
    position: absolute;
    top: 60px;
    left: 1200px;
    transform: translateX(-50%) rotate(180deg);
    z-index: 12;
}

#Kontakt_Pfeil {
    position: absolute;
    top: -75px;
    left: 0;
    transform: translateX(70%);
    z-index: 12;
}

img.req-thumb {
    border-bottom: 4px solid transparent;
    cursor: pointer;
    margin: 0px !important;
    padding: 0px !important;
}

img.active {
    opacity: 0.3;
    filter: alpha(opacity=30); /* For IE8 and earlier */
    cursor: default;
}

#kontaktformular input {
    width: 350px;
    font-size: 16pt;
    border: 1px solid black;
    font-family: 'Courier New', serif;
    margin: 3px;
}

#kontaktformular textarea {
    width: 550px;
    height: 319px;
    font-size: 16pt;
    border: 1px solid black;
    font-family: 'Courier New', serif;
}

/* Kontaktformular submit button - align with base button styles */
#kontaktformular input[type="submit"],
#kontaktformular .submit {
    /* Inherit base button styles */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}

#kontaktformular input[type="submit"]:hover,
#kontaktformular .submit:hover {
    background: black;
    color: white;
    text-transform: uppercase;
}

input.error, textarea.error {
    border-color: #f99 !important;
    box-shadow: 0 0 3px #CC0000;
}

#skizze {
    border: 3px solid white;
}

.skizze {
    font-weight: bold;
}

.detailImages {
    float: left;
    margin-right: 15px;
    width: 300px;
}

.detailImages .detail-gallery {
    width: 100%;
}

.detailImages .detail-gallery img {
    max-width: 300px;
    width: 100%;
    height: auto;
    display: block;
}

/* Hide mobile slider controls on desktop */
.mobile-slider-controls {
    display: none;
}

.g-recaptcha {
    float: left;
}

/* ========================================
   RESPONSIVE / MOBILE STYLES
   ======================================== */

/* Burger Menu Styles (hidden on desktop) */
.mobile-menu-toggle {
    display: none;
}

/* Prevent scrolling when mobile menu is open */
body.menu-open {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
}

@media screen and (max-width: 768px) {
    /* Prevent horizontal scrolling but allow vertical */
    html, body {
        overflow-x: hidden !important;
        overflow-y: auto !important;
        width: 100vw !important;
        max-width: 100vw !important;
        position: relative !important;
        height: auto !important;
        min-height: 100vh !important;
    }
    
    body {
        font-size: 14px;
        position: relative;
        padding-top: 0 !important;
        margin-top: 0 !important;
    }
    
    /* All containers must not exceed viewport */
    * {
        max-width: 100vw !important;
    }
    
    /* Ensure content is not hidden behind fixed elements */
    #content,
    #content-right {
        position: relative !important;
        z-index: 1;
    }
    
    /* Burger Menu Button - Always white background with black border and lines */
    .mobile-menu-toggle {
        display: flex;
        justify-content: center;
        align-items: center;
        position: absolute;
        top: 87px;
        right: 15px;
        z-index: 1000;
        background: transparent !important;
        border: 0 !important;
        padding: 0;
        cursor: pointer;
        width: 44px;
        height: 44px;
        transition: transform 0.2s ease;
    }
    
    .mobile-menu-toggle:active {
        transform: scale(0.95);
    }
    
    /* Burger icon image */
    #burgerIcon {
        width: 44px;
        height: 44px;
        display: block;
        object-fit: contain;
    }
    
    /* Navigation container */
    .mobile-nav-container {
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        max-width: 85vw;
        height: 100vh;
        background: white;
        box-shadow: -4px 0 20px rgba(0,0,0,0.3);
        z-index: 999;
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
        overflow-x: hidden;
        padding: 80px 0 20px;
    }
    
    .mobile-nav-container.active {
        right: 0;
    }
    
    /* Add logo/header to mobile menu */
    .mobile-nav-container::before {
        content: '';
        display: block;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 60px;
        background: #333;
        border-bottom: 3px solid #000;
    }
    
    /* Overlay */
    .mobile-menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0,0,0,0.5);
        z-index: 998;
        transition: opacity 0.3s;
        touch-action: none;
        overflow: hidden;
    }
    
    .mobile-menu-overlay.active {
        display: block;
    }
    
    /* Logo - full width with max height */
    #logo {
        position: static !important;
        left: auto !important;
        top: auto !important;
        text-align: center;
        display: block;
        margin: 15px auto;
        width: 100%;
        padding: 0 20px;
        box-sizing: border-box;
    }
    
    #logo img {
        width: 100%;
        max-width: 100%;
        max-height: 80px;
        height: auto;
        object-fit: contain;
    }
    
    /* Navigation - hide by default, show in burger menu */
    .mobile-nav-container .navi {
        position: static !important;
        top: auto !important;
        left: auto !important;
        display: flex;
        align-items: center;
        text-align: left;
        padding: 18px 25px;
        margin: 0;
        background: white;
        border-bottom: 1px solid #e5e7eb;
        font-size: 17px;
        font-weight: 500;
        width: 100%;
        max-width: 100%;
        color: #333;
        box-sizing: border-box;
        transition: all 0.2s ease;
        text-decoration: none;
    }
    
    .mobile-nav-container .navi:first-of-type {
        border-top: 1px solid #e5e7eb;
    }
    
    .mobile-nav-container .navi:hover,
    .mobile-nav-container .navi:active {
        background: #f8f8f8;
        color: #000;
        padding-left: 30px;
    }
    
    .mobile-nav-container .navi:active {
        background: #f0f0f0;
    }
    
    /* Hide arrows on mobile */
    .pfeil {
        display: none !important;
    }
    
    /* Top header - make it static instead of fixed */
    #topheader {
        position: static !important;
        width: 100vw !important;
        max-width: 100vw !important;
        height: auto !important;
        min-height: 150px !important;
        padding: 0 0 0 0;
        background: white;
        overflow: visible !important;
        box-sizing: border-box;
    }
    
    /* Hide desktop navigation on mobile */
    #topheader .navi {
        display: none !important;
    }
    
    /* Hide the line separator */
    #line {
        display: none;
    }
    
    /* Top right menu - compact on mobile */
    #ontop {
        position: static !important;
        right: auto !important;
        top: auto !important;
        left: auto !important;
        text-align: center;
        padding: 0px 10px 15px 10px !important;
        margin-top: -5px !important;
        background: transparent;
        margin-bottom: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        z-index: 10 !important;
    }
    
    /* Ensure search form is always visible on mobile */
    #ontop form {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    #ontop a {
        display: inline-block;
        margin: 5px;
        padding: 8px 12px;
        min-height: 36px;
        line-height: 20px;
        font-size: 13px;
    }
    
    #ontop button,
    #ontop input[type="submit"] {
        background: #333;
        color: white;
        border: none;
        border-radius: 6px;
        padding: 10px 16px;
        min-height: 44px;
        cursor: pointer;
        font-size: 15px;
        font-weight: 500;
    }
    
    #ontop button:active {
        background: #000;
    }
    
    /* Sidebar - hide on mobile (breadcrumbs are sufficient) */
    #content-left {
        display: none !important;
    }
    
    /* Main content area */
    #content-right {
        position: static !important;
        padding: 10px 15px !important;
        margin: 0 auto !important;
        width: 100% !important;
        max-width: 100% !important;
        float: none !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }
    
    /* Content wrapper */
    #content {
        padding: 0 !important;
        margin: 0 !important;
        width: 100vw !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }
    
    /* Fundus grid - 3 columns on mobile */
    #content-right {
        display: block;
        text-align: center;
        padding: 0 15px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Override center alignment for text content - keep left-aligned */
    #content-right .merkedet,
    #content-right .merkedet *,
    #content-right p:not(.border p):not(.border_s p),
    #content-right ul,
    #content-right ol,
    #content-right li,
    #content-right fieldset.merke,
    #content-right fieldset.merke *,
    #content-right h1,
    #content-right h2,
    #content-right h3,
    #content-right h4,
    #content-right h5,
    #content-right h6,
    #content-right div:not(.fundusbox):not(.border):not(.border_s):not(.borderChild):not(.borderParent):not(.instagram-button-container) {
        text-align: left !important;
    }
    
    /* Keep fundus grid boxes centered */
    #content-right .fundusbox,
    #content-right .border,
    #content-right .border_s {
        text-align: center;
    }
    
    .fundusbox {
        width: 32.5% !important;
        min-width: 0 !important;
        max-width: none !important;
        margin: 0.3% !important;
        float: none !important;
        display: inline-block !important;
        vertical-align: top !important;
        box-sizing: border-box !important;
        padding: 0 !important;
        background: none !important;
        border: none !important;
    }
    
    .fundusbox img {
        width: 100% !important;
        height: auto !important;
        display: block !important;
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
    
    /* Use higher resolution images for mobile by loading medium instead of thumbnails */
    /* This is handled via JavaScript that replaces src attributes */
    .fundusbox img[data-mobile-src] {
        content: attr(data-mobile-src);
    }
    
    .fundusbox a {
        display: block !important;
        padding: 4px 2px !important;
        min-height: 32px !important;
        font-size: 11px !important;
        text-align: center !important;
        line-height: 1.2 !important;
    }
    
    /* Make description always visible on mobile - must override all desktop rules */
    /* For .border (not startpage): no line break, centered, overflow hidden */
    .border p,
    .border.hover p,
    .border.hover:hover p,
    .border.hover p.show,
    a.border p,
    a.border.hover p,
    a.border.hover:hover p,
    a.border.hover p.show,
    a.border.hover p {
        display: block !important;
        position: static !important;
        width: 100% !important;
        background: none !important;
        margin-top: -12px !important;
        margin-bottom: 0 !important;
        padding: 0 4px !important;
        text-align: center !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        line-height: 1.4;
        opacity: 1 !important;
        visibility: visible !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        z-index: auto !important;
    }
    
    /* Ensure border containers allow overflow on mobile for text */
    .border,
    .border.hover,
    a.border {
        overflow: visible !important;
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
    }
    
    /* Grid layout for category boxes (fundus, about) - 3 columns */
    .border,
    a.border {
        width: 32.5% !important;
        min-width: 0 !important;
        max-width: none !important;
        height: auto !important;
        margin: 0.3% !important;
        display: inline-block !important;
        vertical-align: top !important;
        box-sizing: border-box !important;
        padding: 0 !important;
        background: none !important;
        border: none !important;
        position: relative !important; /* Positioning context for borderChild */
        overflow: visible !important;
        aspect-ratio: none !important;
    }
    
    /* Startpage (.border_s) - special layout: tile left, text right, each in new row */
    body.startpage .border_s,
    body.startpage a.border_s {
        width: 100% !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: flex-start !important;
        margin: 0 0 20px 0 !important;
        padding: 0 !important;
        background: none !important;
        border: none !important;
        position: relative !important;
        overflow: visible !important;
        box-sizing: border-box !important;
    }
    
    /* Startpage tile image container - fixed width on left */
    body.startpage .border_s .borderParent,
    body.startpage a.border_s .borderParent {
        width: 120px !important;
        min-width: 120px !important;
        max-width: 120px !important;
        aspect-ratio: 1 / 1 !important;
        height: auto !important;
        display: block !important;
        margin: 0 15px 0 0 !important;
        flex-shrink: 0 !important;
        position: relative !important;
        z-index: 1 !important;
        overflow: hidden !important;
    }
    
    /* Ensure borderChild is only positioned relative to borderParent, not the whole container */
    /* borderChild is a sibling of borderParent, so we position it to match borderParent's position */
    body.startpage .border_s .borderChild,
    body.startpage a.border_s .borderChild {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 120px !important;
        height: 120px !important;
        z-index: 4 !important;
        pointer-events: none !important;
        background-size: 100% 100% !important;
        background-position: center !important;
        background-repeat: no-repeat !important;
    }
    
    /* Startpage tile text - takes remaining space on right */
    body.startpage .border_s p,
    body.startpage a.border_s p {
        display: block !important;
        position: static !important;
        width: auto !important;
        flex: 1 !important;
        background: none !important;
        font-size: 14px !important;
        margin: 0 !important;
        padding: 0 !important;
        text-align: left !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        line-height: 1.5 !important;
        opacity: 1 !important;
        visibility: visible !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        z-index: auto !important;
    }
    
    /* Ensure border_s containers allow overflow on mobile for text */
    body.startpage .border_s,
    body.startpage a.border_s {
        overflow: visible !important;
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
    }
    
    /* Hide span element on startpage mobile layout */
    body.startpage .border_s span,
    body.startpage a.border_s span {
        display: none !important;
    }
    
    .border .borderParent {
        width: 100% !important;
        aspect-ratio: 1 / 1 !important;
        height: auto !important;
        display: block !important;
        margin-bottom: 0 !important;
        position: relative !important;
        z-index: 1 !important;
        overflow: hidden !important;
    }
    
    /* Startpage borderParent already styled above */
    
    .border .borderParent img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        object-position: center !important;
        display: block !important;
    }
    
    /* Startpage borderParent img */
    body.startpage .border_s .borderParent img,
    body.startpage a.border_s .borderParent img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        object-position: center !important;
        display: block !important;
    }
    
    /* Keep border frame on mobile - only over image */
    .border .borderChild {
        width: 100% !important;
        aspect-ratio: 1 / 1 !important;
        height: auto !important;
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        z-index: 4 !important;
        background-size: 100% 100% !important;
        background-position: center !important;
        background-repeat: no-repeat !important;
        pointer-events: none !important;
    }
    
    /* Startpage borderChild - already styled above with fixed dimensions */
    
    /* Hide NEW badge on mobile to save space */
    .border .borderNew,
    .border_s .borderNew {
        display: none !important;
    }
    
    /* Container for boxes needs to be centered */
    #content-right {
        text-align: center !important;
    }
    
    #content-right > a {
        display: inline-block !important;
        vertical-align: top !important;
        text-decoration: none !important;
    }
    
    /* Detail view */
    .detailImages {
        float: none;
        width: 100%;
        max-width: 100%;
        margin: 0 0 20px 0;
        box-sizing: border-box;
        padding: 0 15px;
    }
    
    /* Hide desktop thumbnails on mobile */
    .detailImages .desktop-thumbs {
        display: none !important;
    }
    
    /* Mobile: Show gallery as slider (reuse existing detail-gallery) */
    .detailImages .detail-gallery {
        position: relative;
        width: 100%;
        overflow: hidden;
        border-radius: 8px;
    }
    
    .detailImages .detail-gallery a {
        display: block;
        width: 100%;
    }
    
    .detailImages .detail-gallery a.hidden {
        display: none;
    }
    
    .detailImages .detail-gallery img {
        width: 100%;
        height: auto;
        display: block;
        border-radius: 8px;
    }
    
    /* Mobile slider controls */
    .mobile-slider-controls {
        display: flex;
        align-items: center;
        justify-content: center;
        margin-top: 15px;
        gap: 10px;
    }
    
    .slider-btn {
        background: #333;
        color: white;
        border: none;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        font-size: 24px;
        line-height: 1;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background 0.3s;
        padding: 0;
    }
    
    .slider-btn:hover,
    .slider-btn:active {
        background: #555;
    }
    
    .slider-dots {
        display: flex;
        gap: 8px;
        align-items: center;
    }
    
    .slider-dot {
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background: #ccc;
        cursor: pointer;
        transition: background 0.3s;
    }
    
    .slider-dot.active {
        background: #333;
    }
    
    .detailImages img {
        width: 100%;
        max-width: 100%;
        height: auto;
        border-radius: 8px;
    }
    
    /* Detail content */
    .detailContent {
        padding: 0 15px;
        font-size: 16px;
    }
    
    /* Override inline styles for item details div */
    div[style*="float:left"][style*="width: 450px"],
    div[style*="float:left"][style*="width:450px"] {
        float: none !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 0 15px !important;
        margin: 0 !important;
    }
    
    .detailContent strong {
        display: block;
        margin-top: 15px;
        margin-bottom: 5px;
        font-size: 14px;
        color: #666;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    /* Images in general */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Tables */
    table {
        width: 100%;
        max-width: 100%;
        font-size: 12px;
        table-layout: auto;
        overflow-x: auto;
        display: block;
    }
    
    table td, table th {
        padding: 5px;
        word-wrap: break-word;
        word-break: break-word;
        min-width: 50px;
    }
    
    /* Forms - optimized for mobile */
    /* Contact form - mobile improvements */
    #kontaktformular {
        padding: 0;
        margin: 0;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
    }
    
    #kontaktform {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* Remove float layout on mobile - stack vertically */
    #kontaktform div {
        float: none !important;
        width: 100% !important;
        margin-left: 0 !important;
        margin-bottom: 12px;
    }
    
    #kontaktformular input,
    #kontaktformular textarea,
    #kontaktformular select {
        width: 100% !important;
        max-width: 100% !important;
        font-size: 16px; /* Prevents iOS zoom on focus */
        padding: 10px 12px;
        margin: 0 0 12px 0 !important;
        box-sizing: border-box !important;
        border: 1px solid black;
        border-radius: 0;
        -webkit-appearance: none;
        appearance: none;
        font-family: 'Courier New', serif;
        background: white;
        transition: border-color 0.2s;
    }
    
    #kontaktformular input:focus,
    #kontaktformular textarea:focus,
    #kontaktformular select:focus {
        border-color: black;
        outline: none;
    }
    
    #kontaktformular textarea {
        height: 150px !important;
        resize: vertical;
        min-height: 120px;
    }
    
    #kontaktformular label {
        display: block;
        margin-bottom: 5px;
        font-weight: bold;
        font-size: 12pt;
        color: black;
        font-family: 'Courier New', serif;
    }
    
    #kontaktformular button,
    #kontaktformular input[type="submit"] {
        width: 100%;
        padding: 10px 20px;
        font-size: 12pt;
        min-height: 40px;
        background: white;
        color: black;
        border: 1px solid black;
        border-radius: 0;
        cursor: pointer;
        font-weight: bold;
        margin-top: 10px;
        margin-bottom: 10px;
        font-family: 'Courier New', serif;
        transition: all 0.2s;
    }
    
    #kontaktformular button:hover,
    #kontaktformular input[type="submit"]:hover {
        background: black;
        color: white;
        text-transform: uppercase;
    }
    
    #kontaktformular button:active,
    #kontaktformular input[type="submit"]:active {
        background: black;
        color: white;
    }
    
    /* reCAPTCHA styling for mobile */
    #kontaktformular .g-recaptcha {
        margin: 15px 0;
        display: flex;
        justify-content: center;
        overflow-x: auto;
    }
    
    /* Error state styling */
    #kontaktformular input.error,
    #kontaktformular textarea.error {
        border-color: #d32f2f;
        background-color: #fff5f5;
    }
    
    #kontaktformular input.error:focus,
    #kontaktformular textarea.error:focus {
        border-color: #d32f2f;
        box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.2);
    }
    
    /* Merkliste form - mobile improvements */
    .merkliste-form-container {
        padding: 15px 12px !important;
        margin: 15px 0 !important;
        border-radius: 0;
    }
    
    .merkliste-form-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        position: relative;
    }
    
    .merkliste-form-header h3 {
        font-size: 18px;
        padding-right: 40px;
    }
    
    .close-button {
        position: absolute;
        top: 0;
        right: 0;
    }
    
    #mlisteform {
        padding: 0;
        margin: 0;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
    }
    
    #mliste {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* Remove float layout on mobile - stack vertically */
    .merkliste-form-column {
        display: block !important;
        width: 100% !important;
        margin-right: 0 !important;
        margin-bottom: 12px;
    }
    
    .merkliste-form-buttons {
        flex-direction: column;
        gap: 10px;
        margin-top: 10px;
    }
    
    .merkliste-submit-btn,
    .merkliste-cancel-btn {
        width: 100%;
        margin: 0 !important;
    }
    
    #mlisteform input,
    #mlisteform textarea,
    #mlisteform select {
        width: 100% !important;
        max-width: 100% !important;
        font-size: 16px; /* Prevents iOS zoom on focus */
        padding: 10px 12px;
        margin: 0 0 12px 0 !important;
        box-sizing: border-box !important;
        border: 1px solid black;
        border-radius: 0;
        -webkit-appearance: none;
        appearance: none;
        font-family: 'Courier New', serif;
        background: white;
        transition: border-color 0.2s;
    }
    
    #mlisteform input:focus,
    #mlisteform textarea:focus,
    #mlisteform select:focus {
        border-color: black;
        outline: none;
    }
    
    #mlisteform textarea {
        height: 150px !important;
        resize: vertical;
        min-height: 120px;
        width: 100% !important;
    }
    
    #mlisteform label {
        display: block;
        margin-bottom: 5px;
        font-weight: bold;
        font-size: 12pt;
        color: black;
        font-family: 'Courier New', serif;
    }
    
    #mlisteform label p.error {
        color: #d32f2f;
        font-size: 11px;
        margin-left: 5px;
    }
    
    /* reCAPTCHA styling for mobile in merkliste form */
    #mlisteform .g-recaptcha {
        margin: 15px 0;
        display: flex;
        justify-content: center;
        overflow-x: auto;
        float: none !important;
    }
    
    /* Error state styling for merkliste form */
    #mlisteform input.error,
    #mlisteform textarea.error {
        border-color: #d32f2f;
        background-color: #fff5f5;
    }
    
    #mlisteform input.error:focus,
    #mlisteform textarea.error:focus {
        border-color: #d32f2f;
        outline: none;
    }
    
    /* Fieldsets */
    fieldset {
        width: calc(100% - 30px);
        max-width: 100%;
        box-sizing: border-box;
        margin: 15px;
        padding: 15px;
        border: 2px solid #ddd;
        border-radius: 8px;
    }
    
    fieldset legend {
        padding: 0 10px;
        font-weight: 600;
        font-size: 16px;
    }
    
    /* Merkliste/Wishlist boxes */
    .merke {
        width: calc(100% - 30px) !important;
        max-width: 100% !important;
        margin: 15px !important;
        padding: 15px !important;
        box-sizing: border-box;
        border-radius: 8px;
        background: #fafafa;
    }
    
    .merke legend {
        font-size: 16px;
        padding: 8px 12px;
        margin-bottom: 10px;
    }
    
    .merke legend a {
        min-height: 44px;
        display: inline-block;
        line-height: 44px;
    }
    
    .merkepic {
        width: 100% !important;
        max-width: 100% !important;
        float: none !important;
        box-sizing: border-box;
        margin-bottom: 15px;
    }
    
    .merkepic img {
        width: 100%;
        height: auto;
        border-radius: 8px;
    }
    
    .merkedet {
        width: 100% !important;
        max-width: 100% !important;
        float: none !important;
        box-sizing: border-box;
        font-size: 14px;
        line-height: 1.8;
    }
    
    .merkedet strong {
        display: inline-block;
        min-width: 90px;
        color: #666;
    }
    
    /* Breadcrumb bar - horizontal scrollable on mobile */
    .bar {
        width: 100%;
        max-width: 100%;
        padding: 12px 15px;
        box-sizing: border-box;
        font-size: 13px;
        line-height: 1.5;
        background: #f8f8f8;
        border-bottom: 1px solid #e0e0e0;
        margin-bottom: 10px;
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        gap: 4px;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }
    
    .bar::-webkit-scrollbar {
        height: 6px;
    }
    
    .bar::-webkit-scrollbar-track {
        background: #f1f1f1;
    }
    
    .bar::-webkit-scrollbar-thumb {
        background: #888;
        border-radius: 3px;
    }
    
    .bar::-webkit-scrollbar-thumb:hover {
        background: #555;
    }
    
    .bar a {
        display: inline-block;
        padding: 2px 0;
        margin: 0;
        background: transparent;
        border: none;
        border-bottom: 1px solid transparent;
        line-height: 1.6;
        text-decoration: none;
        color: black;
        transition: all 0.2s;
        font-size: 10pt;
        font-family: 'Courier New', serif;
        font-weight: bold;
        white-space: nowrap;
        flex-shrink: 0;
        box-sizing: border-box;
    }
    
    .bar a:hover {
        background: transparent;
        color: black;
        border-bottom-color: black;
        text-transform: uppercase;
        text-decoration: none;
    }
    
    /* Style the » separator */
    .breadcrumb-sep {
        color: #666;
        margin: 0 6px;
        font-size: 10pt;
        font-weight: normal;
    }
    
    /* Pre and code blocks */
    pre, code {
        max-width: 100%;
        overflow-x: auto;
        white-space: pre-wrap;
        word-wrap: break-word;
    }
    
    /* Search form - compact and modern */
    #ontop form {
        width: calc(100% - 20px);
        max-width: 500px;
        display: flex !important;
        flex-direction: row;
        align-items: center;
        gap: 8px;
        margin: 10px auto 0 auto;
        padding: 0;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* Search input wrapper for mobile */
    #ontop .search-input-wrapper {
        flex: 1;
        position: relative;
        display: flex;
        align-items: center;
    }
    
    /* Search icon for mobile */
    #ontop .search-icon {
        position: absolute;
        left: 12px;
        top: 7px;
        color: #999;
        pointer-events: none;
        z-index: 1;
        transition: color 0.2s ease;
    }
    
    #ontop form input[type="text"],
    #ontop form input[type="search"],
    #ontop form #suche {
        flex: 1;
        padding: 10px 20px 10px 40px;
        font-size: 12pt;
        font-family: 'Courier New', serif;
        font-weight: normal;
        border: 1px solid black;
        border-radius: 0;
        box-sizing: border-box;
        margin: 0;
        background: white;
        color: black;
        transition: all 0.2s;
        -webkit-appearance: none;
        appearance: none;
    }
    
    /* Search icon turns black on focus (mobile) */
    #ontop .search-input-wrapper:has(input:focus) .search-icon {
        color: black;
    }
    
    /* Placeholder text turns black on focus (mobile) */
    #ontop form input[type="text"]:focus::placeholder,
    #ontop form input[type="search"]:focus::placeholder,
    #ontop form #suche:focus::placeholder {
        color: black;
        opacity: 1;
    }
    
    #ontop form input[type="text"]:focus,
    #ontop form input[type="search"]:focus,
    #ontop form #suche:focus {
        border-color: black;
        outline: none;
        background: #fafafa;
    }
    
    #ontop form input[type="text"]:hover,
    #ontop form input[type="search"]:hover,
    #ontop form #suche:hover {
        border-color: black;
    }
    
    #ontop form button,
    #ontop form input[type="submit"] {
        flex-shrink: 0;
        padding: 12px 18px;
        font-size: 15px;
        min-height: 44px;
        white-space: nowrap;
    }
    
    /* Footer - hide on mobile (links are in menu) */
    #footer {
        display: none !important;
    }
    
    #footer a {
        display: inline-block;
        margin: 5px 10px;
        padding: 8px;
        min-height: 36px;
        line-height: 20px;
    }
    
    /* General links - better touch targets */
    a {
        -webkit-tap-highlight-color: rgba(0,0,0,0.1);
    }
    
    /* Buttons and interactive elements */
    button,
    input[type="submit"],
    input[type="button"],
    .button {
        -webkit-tap-highlight-color: rgba(0,0,0,0.1);
        touch-action: manipulation;
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Merkliste */
    .merkepic {
        float: none !important;
        width: 100%;
        text-align: center;
        margin-bottom: 10px;
    }
    
    .merkepic img {
        max-width: 200px;
        height: auto;
    }
    
    .merkedet {
        float: none !important;
        width: 100%;
    }
    
    fieldset.merke {
        margin: 10px 0;
        padding: 10px;
    }
    
    /* Merkliste buttons - consistent alignment on mobile */
    .mlistebuttons {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        justify-content: flex-start !important;
        gap: 15px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 0 !important;
        margin: 20px 0 !important;
    }
    
    .mlistebuttons button,
    .mlistebuttons a {
        width: 100% !important;
        max-width: 100% !important;
        text-align: center !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        box-sizing: border-box !important;
        margin: 0 !important;
    }
    
    .mlistebuttons a button {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        margin: 0 !important;
    }
    
    /* Footer - hide on mobile (links are in menu) */
    #footer {
        display: none !important;
    }
    
    /* Recaptcha */
    .g-recaptcha {
        float: none;
        margin: 10px auto;
        transform: scale(0.85);
        transform-origin: 0 0;
    }
    
    /* Pagination */
    .pages {
        padding: 20px 15px;
        text-align: center;
        font-size: 16px;
    }
    
    .pages a,
    .pages span {
        display: inline-block;
        margin: 5px;
        padding: 10px 15px;
        min-height: 44px;
        min-width: 44px;
        line-height: 24px;
        background: #f0f0f0;
        border-radius: 6px;
        box-sizing: border-box;
    }
    
    .pages a:active {
        background: #ddd;
    }
    
    .pages strong {
        background: #333;
        color: white;
        padding: 10px 15px;
        border-radius: 6px;
        min-height: 44px;
        min-width: 44px;
        display: inline-block;
        line-height: 24px;
    }
    
    /* Headings */
    h1, h2, h3 {
        padding: 0 15px;
        margin: 20px 0 15px 0;
        line-height: 1.4;
    }
    
    h1 { font-size: 24px; }
    h2 { font-size: 20px; }
    h3 { font-size: 18px; }
    
    /* Paragraphs - make sure #content-right paragraphs have more spacing than br tags */
    /* Exclude .border and .border_s paragraphs (they have their own styling) */
    #content-right p:not(.border p):not(.border_s p) {
        padding: 0 15px;
        margin: 1.5em 0 !important;
        font-size: 16px;
        text-align: left;
    }
    
    #content-right p:first-child:not(.border p):not(.border_s p) {
        margin-top: 0 !important;
    }
    
    #content-right p:last-child:not(.border p):not(.border_s p) {
        margin-bottom: 0 !important;
    }
    
    /* Style divs that contain text content (after headlines) with same spacing as paragraphs */
    /* Exclude structural divs like .anfahrtLeft, .border, .popup-gallery, etc. */
    #content-right > div:not(.anfahrtLeft):not(.border):not(.border_s):not(.border2):not(.popup-gallery):not(.fundusbox):not(.related-items-container):not(.related-items-preview) {
        padding: 0 15px;
        margin: 1.5em 0 !important;
        font-size: 16px;
        text-align: left;
    }
    
    #content-right > div:first-child:not(.anfahrtLeft):not(.border):not(.border_s):not(.border2):not(.popup-gallery):not(.fundusbox):not(.related-items-container):not(.related-items-preview) {
        margin-top: 0 !important;
    }
    
    #content-right > div:last-child:not(.anfahrtLeft):not(.border):not(.border_s):not(.border2):not(.popup-gallery):not(.fundusbox):not(.related-items-container):not(.related-items-preview) {
        margin-bottom: 0 !important;
    }
    
    /* Divs that come directly after headlines should have top margin */
    #content-right h1 + div:not(.anfahrtLeft):not(.border):not(.border_s):not(.border2):not(.popup-gallery):not(.fundusbox):not(.related-items-container):not(.related-items-preview),
    #content-right h2 + div:not(.anfahrtLeft):not(.border):not(.border_s):not(.border2):not(.popup-gallery):not(.fundusbox):not(.related-items-container):not(.related-items-preview),
    #content-right h3 + div:not(.anfahrtLeft):not(.border):not(.border_s):not(.border2):not(.popup-gallery):not(.fundusbox):not(.related-items-container):not(.related-items-preview),
    #content-right h4 + div:not(.anfahrtLeft):not(.border):not(.border_s):not(.border2):not(.popup-gallery):not(.fundusbox):not(.related-items-container):not(.related-items-preview),
    #content-right h5 + div:not(.anfahrtLeft):not(.border):not(.border_s):not(.border2):not(.popup-gallery):not(.fundusbox):not(.related-items-container):not(.related-items-preview),
    #content-right h6 + div:not(.anfahrtLeft):not(.border):not(.border_s):not(.border2):not(.popup-gallery):not(.fundusbox):not(.related-items-container):not(.related-items-preview) {
        margin-top: 1.5em !important;
    }
    
    /* Ensure br tags don't add extra spacing on mobile */
    #content-right br {
        line-height: 1;
        display: inline;
        margin: 0;
        padding: 0;
    }
    
    /* If br is inside a p or div, it should only create a minimal line break */
    #content-right p br,
    #content-right div br {
        line-height: 1;
    }
    
    /* Detail content text alignment */
    .detailContent {
        text-align: left;
    }
    
    /* Related items preview section */
    .related-items-preview {
        margin-top: 40px;
        padding: 0 15px;
        clear: both;
    }
    
    .related-items-preview h3 {
        margin-bottom: 20px;
        font-size: 20px;
        text-align: left;
    }
    
    .related-items-container {
        display: block;
        text-align: center;
        padding: 0;
        margin: 0;
        width: 100%;
    }
    
    .related-items-container > a {
        display: inline-block;
        vertical-align: top;
        text-decoration: none;
    }
    
    .related-items-preview .fundusbox {
        width: 32.5% !important;
    }
}

/* Mobile phones - Extra small screens */

@media screen and (max-width: 480px) {
    /* Extra small screens - ensure no horizontal scroll */
    html, body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }
    
    body {
        font-size: 14px;
    }
    
    #logo img {
        width: 100%;
        max-width: 100%;
        max-height: 70px;
        object-fit: contain;
    }
    
    .navi {
        font-size: 14px;
        padding: 12px 15px;
        box-sizing: border-box;
    }
    
    .bar {
        font-size: 11px;
        max-width: 100%;
        overflow-wrap: break-word;
        padding: 12px;
    }
    
    .bar a {
        padding: 2px 0;
        font-size: 10pt;
        font-family: 'Courier New', serif;
        font-weight: bold;
        border: none;
        border-bottom: 1px solid transparent;
        background: transparent;
        color: black;
        text-decoration: none;
        box-sizing: border-box;
        transition: all 0.2s;
    }
    
    .bar a:hover {
        background: transparent;
        color: black;
        border-bottom-color: black;
        text-transform: uppercase;
        text-decoration: none;
    }
    
    .breadcrumb-sep {
        color: #666;
        margin: 0 6px;
        font-weight: normal;
    }
    
    #kontaktformular input,
    #kontaktformular textarea {
        font-size: 16px; /* Keep 16px to prevent zoom */
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* Make images more mobile-friendly */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Smaller recaptcha on very small screens */
    .g-recaptcha {
        transform: scale(0.85);
        transform-origin: 0 0;
        max-width: 100%;
    }
    
    /* Ensure all content containers fit */
    #content,
    #content-right,
    #topheader {
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }
    
    /* Tables on small screens */
    table {
        font-size: 11px;
    }
    
    table td, table th {
        padding: 4px;
    }
    
    /* Smaller spacing on very small screens */
    .fundusbox {
        padding: 8px !important;
        font-size: 12px;
    }
    
    .fundusbox a {
        padding: 6px !important;
        font-size: 12px !important;
    }
    
    .merke,
    fieldset {
        margin: 10px !important;
        padding: 12px !important;
        width: calc(100% - 20px) !important;
    }
    
    h1 { font-size: 22px; }
    h2 { font-size: 18px; }
    h3 { font-size: 16px; }
    
    .merkepic,
    .detailImages {
        padding: 0 10px;
    }
    
    /* Pagination smaller */
    .pages a,
    .pages span,
    .pages strong {
        padding: 8px 12px;
        min-height: 40px;
        min-width: 40px;
        font-size: 14px;
        margin: 3px;
    }
}

/* Landscape orientation on phones */
@media screen and (max-width: 768px) and (orientation: landscape) {
    #logo img {
        width: 120px;
    }
    
    .navi {
        display: inline-block;
        width: auto;
        margin: 5px;
        padding: 8px 15px;
    }
}

/* Cookie Consent Banner */
#cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    border-top: 2px solid #333;
    padding: 20px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 10000;
    font-family: 'Courier New', serif;
    display: none;
}

#cookie-consent-banner.show {
    display: block;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.cookie-consent-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.cookie-consent-text {
    flex: 1;
    min-width: 280px;
}

.cookie-consent-text h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: bold;
}

.cookie-consent-text p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

.cookie-consent-text a {
    color: #0066cc;
    text-decoration: underline;
}

.cookie-consent-text a:hover {
    color: #004499;
}

.cookie-consent-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.cookie-consent-btn {
    /* Inherit base button styles but override for cookie-specific styling */
    padding: 10px 20px;
    border: 1px solid black;
    background: white;
    color: black;
    cursor: pointer;
    font-family: 'Courier New', serif;
    font-size: 12pt;
    font-weight: bold;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    vertical-align: middle;
}

.cookie-consent-btn:hover {
    background: black;
    color: white;
    text-transform: uppercase;
}

.cookie-consent-btn.primary {
    background: black;
    color: white;
}

.cookie-consent-btn.primary:hover {
    background: #333;
    text-transform: uppercase;
}

.cookie-settings-link {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: #666;
    cursor: pointer;
    text-decoration: underline;
}

.cookie-settings-link:hover {
    color: #333;
}

/* Cookie Settings Modal */
#cookie-settings-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10001;
    overflow-y: auto;
}

#cookie-settings-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.cookie-settings-content {
    background: white;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    border: 3px solid #333;
    margin: 20px;
}

.cookie-settings-content h2 {
    margin: 0 0 20px 0;
    font-size: 20px;
}

.cookie-category {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.cookie-category:last-child {
    border-bottom: none;
}

.cookie-category h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cookie-category p {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.cookie-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.cookie-toggle input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.cookie-toggle input[type="checkbox"]:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.cookie-toggle label {
    cursor: pointer;
    font-size: 14px;
}

.cookie-required-badge {
    display: inline-block;
    background: #666;
    color: white;
    padding: 2px 8px;
    font-size: 11px;
    border-radius: 3px;
}

.cookie-settings-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
    align-items: center;
}

/* Mobile responsive */
@media screen and (max-width: 768px) {
    .cookie-consent-content {
        flex-direction: column;
        align-items: stretch;
    }
    
    .cookie-consent-buttons {
        width: 100%;
    }
    
    .cookie-consent-btn {
        flex: 1;
        text-align: center;
    }
    
    .cookie-settings-content {
        padding: 20px;
        width: 95%;
    }
    
    #cookie-consent-banner {
        padding: 15px;
    }
}

/* Instagram Embed Minimal Styling - Hide Social Elements */
.instagram-feed-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.instagram-post-wrapper {
    position: relative;
    overflow: visible;
    background: transparent;
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.instagram-post-wrapper .instagram-thumbnail-link {
    /* Force 1:1 square aspect ratio for thumbnail link */
    aspect-ratio: 1 / 1;
    overflow: hidden;
    flex-shrink: 0;
    flex-grow: 0;
    width: 100%;
    height: auto;
    min-height: 0;
    min-width: 0;
}

.instagram-caption {
    margin-top: 10px;
    padding: 10px;
    font-size: 0.95em;
    line-height: 1.5;
    color: #333;
    text-align: center;
    background: #f9f9f9;
    border-radius: 4px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    min-width: 0;
    overflow: hidden;
}

.instagram-thumbnail-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    position: relative;
    padding: 8px;
    box-sizing: border-box;
}

.instagram-thumbnail-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../img/rahmen_insta.png') !important;
    background-size: 100% 100% !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    z-index: 2;
    pointer-events: none;
}

.instagram-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.3s;
    position: relative;
    z-index: 1;
}

.instagram-thumbnail-link:hover .instagram-thumbnail {
    opacity: 0.9;
}

.instagram-thumbnail-missing {
    padding: 40px 20px;
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #666;
}

.instagram-thumbnail-missing a {
    color: #3897f0;
    text-decoration: none;
    font-weight: bold;
}

.instagram-thumbnail-missing a:hover {
    text-decoration: underline;
}

.instagram-login-hint {
    font-size: 0.85em;
    color: #999;
    margin-top: 10px;
}

/* Hide Instagram embed header and footer */
.instagram-post-wrapper .instagram-media {
    /* Remove default Instagram embed margins */
    margin: 0 !important;
    border: none !important;
    box-shadow: none !important;
    max-width: 100% !important;
    min-width: auto !important;
}

/* Crop the iframe to hide header/footer/social elements */
.instagram-post-wrapper iframe.instagram-media-rendered {
    /* Negative margins to crop header and footer */
    margin-top: -58px !important;
    margin-bottom: -220px !important;
    width: 100% !important;
    min-height: 100% !important;
    display: block !important;
}

/* Hide the blockquote fallback content before JS loads */
.instagram-post-wrapper .instagram-media > div {
    display: none;
}

/* Hide any text/links in the blockquote */
.instagram-post-wrapper .instagram-media p,
.instagram-post-wrapper .instagram-media a {
    display: none !important;
}

@media screen and (max-width: 768px) {
    .instagram-feed-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        width: 100%;
        max-width: 100%;
        padding: 10px;
        box-sizing: border-box;
    }
    
    .instagram-post-wrapper {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }
    
    .instagram-caption {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        word-break: break-word;
    }
}

/* Image alignment classes for TinyMCE editor content */
#content-right img.image-left {
    float: left;
    margin-right: 15px;
    margin-bottom: 10px;
    max-width: 100%;
}

#content-right img.image-left-last {
    float: left;
    margin-right: 15px;
    margin-bottom: 10px;
    max-width: 100%;
}

/* Force line break after image-left-last - clear on the link container */
/* Modern browsers: use :has() selector */
#content-right a:has(img.image-left-last)::after {
    content: "";
    display: block;
    clear: both;
}

/* Fallback: Clear left on next element after the link containing image-left-last */
#content-right a:has(img.image-left-last) + * {
    clear: left;
}

/* Additional fallback: Clear on paragraph containing image-left-last */
#content-right p:has(img.image-left-last)::after {
    content: "";
    display: block;
    clear: both;
}

#content-right img.image-right {
    float: right;
    margin-left: 15px;
    margin-bottom: 10px;
    max-width: 100%;
}

#content-right img.image-center {
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 10px;
    max-width: 100%;
}

/* Mobile: Remove float for image alignment classes, display images stacked */
@media screen and (max-width: 768px) {
    #content-right img.image-left,
    #content-right img.image-left-last,
    #content-right img.image-right {
        float: none !important;
        display: block !important;
        margin-left: auto !important;
        margin-right: auto !important;
        margin-bottom: 15px !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    
    #content-right img.image-center {
        display: block !important;
        margin-left: auto !important;
        margin-right: auto !important;
        margin-bottom: 15px !important;
        max-width: 100% !important;
        width: 100% !important;
    }
}

/* Clear floats after images */
#content-right::after {
    content: "";
    display: table;
    clear: both;
}
