/* Ergänzungen zum bisherigen Theme (theme.css) für das CMS
   – Bilder werden per object-fit in die bisherigen Formate zugeschnitten.
     Der Bildausschnitt (Fokuspunkt) wird im CMS pro Bild festgelegt. */

picture { display: block; }

/* Slider: Desktop 1500×795, Mobile quadratisch (wie bisher) */
.rslides > div { aspect-ratio: 1500 / 795; overflow: hidden; }
.rslides img { width: 100%; height: 100%; object-fit: cover; }
@media all and (max-width: 650px) {
    .rslides > div { aspect-ratio: 1 / 1; }
}

/* Bild-Text-Abschnitte: Format 3:2 */
.section.testimonial .testimg picture { aspect-ratio: 1766 / 1172; overflow: hidden; }
.section.testimonial .testimg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.section.testimonial.voll .testimg picture { aspect-ratio: 1500 / 795; }
.section.testimonial { margin-bottom: 40px; }
.section.testimonial.rightimg .content-state { float: left; }

/* Galerie: quadratische Vorschaubilder */
.galerie-img picture { aspect-ratio: 1 / 1; overflow: hidden; }
.galerie-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.galerie-img a:hover img { transform: scale(1.03); }
.galerie-img a { display: block; overflow: hidden; position: relative; }
.galerie-img .bildlegende { position: absolute; left: 10px; bottom: 10px; right: 10px; color: #fff; font-size: .85em; text-shadow: 0 1px 3px rgba(0,0,0,.7); }
.galerie-titel { padding-top: 20px; }
.section.galerie { margin-bottom: 60px; }

/* Reiner Textabschnitt */
.section.text.only .text-only { float: right; margin-bottom: 60px; }
@media all and (max-width: 1024px) { .section.text.only .text-only { float: none; } }

/* Tabellen im Text (z.B. Preise) */
.einleitung table, .content-state table { border-collapse: collapse; width: 100%; margin: 10px 0 20px; }
.einleitung td, .einleitung th, .content-state td, .content-state th { padding: 6px 8px 6px 0; vertical-align: top; border-bottom: 1px solid rgba(125,113,100,.25); text-align: left; }
.einleitung tr:last-child td { border-bottom: 0; }
@media all and (max-width: 650px) {
    .einleitung td, .content-state td { font-size: .9em; }
}

/* Leere Absätze aus dem alten System nicht zu hoch */
.einleitung p:empty { min-height: 1em; }

/* Hinweisleiste für angemeldete Bearbeiter */
.cms-adminbar { position: fixed; right: 16px; bottom: 16px; z-index: 5000; display: flex; gap: 8px; align-items: center; font: 600 14px/1 Arial, sans-serif; }
.cms-adminbar a, .cms-adminbar span { background: #513925; color: #fff !important; padding: 10px 14px; border-radius: 20px; text-decoration: none; box-shadow: 0 2px 10px rgba(0,0,0,.25); }
.cms-adminbar a:hover { background: #7D7164; }
.cms-adminbar .cms-draft { background: #c0392b; }
