/*
Theme Name: Divi-Child
Version: 1.0
Description: A child theme of Divi
Template: Divi
Author: Administrator
*/
@import url("../Divi/style.css");

/* Your awesome customization starts here */

.listing-title h5.et_pb_module_header {
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Begrenzt den Text auf 2 Zeilen */
    -webkit-box-orient: vertical;  
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================================================
   1. VIEW 1: SPLASH GRID (2:1 Ratio & Browser-Fix)
   ============================================================ */
.ps-splash-wrapper { 
    overflow: hidden; 
    margin: 20px 0; 
    position: relative;
     border-radius: 15px;
}
.ps-splash-container { 
    display: flex !important; 
    flex-direction: row !important;
    width: 100% !important;
    /* Ratio-Fix für Desktop */
    aspect-ratio: 2 / 1 !important; 
    height: auto !important;
    gap: 8px; 
}


.ps-main-img { width: 50% !important; height: 100% !important; background-size: cover; background-position: center; cursor: pointer; }
.ps-side-grid { width: 50% !important; height: 100% !important; display: grid !important; grid-template-columns: 1fr 1fr !important; grid-template-rows: 1fr 1fr !important; gap: 8px !important; }
.ps-small-img { background-size: cover; background-position: center; cursor: pointer; position: relative; }

.ps-btn-all {
    position: absolute; bottom: 15px; right: 15px; background: #fff;
    border: none; padding: 8px 14px !important; border-radius: 4px; 
    font-weight: bold; cursor: pointer; display: flex; align-items: center; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.15); font-size: 13px !important; color: #333; z-index: 10;
}
.ps-btn-all .et-pb-icon { font-size: 16px !important; margin-right: 6px !important; }

/* ============================================================
   2. VIEW 2: MODAL (Z-Index & "No Line" Fix)
   ============================================================ */
.ps-modal-overlay {
    display: none; 
    position: fixed; 
    top: 0; left: 0; width: 100%; height: 100%;
    background: #fff; 
    /* Höher als der Divi-Header */
    z-index: 9999999 !important; 
    overflow-y: scroll;
}

.ps-modal-nav {
    position: sticky; 
    top: 0; 
    width: 100%;
    background: #fff;
    padding: 20px 40px !important; 
    display: flex; 
    justify-content: flex-end; 
    z-index: 10001;
    border: none !important;
    /* Schatten/Linie komplett eliminieren */
    box-shadow: none !important;
    outline: none !important;
}

/* Verhindert den 1px Spalt (die "Linie") beim Scrollen */
.ps-modal-nav::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 1px;
    background: #fff;
}

.ps-close-x { font-size: 40px !important; font-weight: 300; color: #000 !important; cursor: pointer; padding: 10px; line-height: 0.5; }

.ps-modal-content { max-width: 1200px; margin: 0 auto 40px auto; padding: 0 20px; cursor: zoom-out; }
.ps-modal-row { display: flex; gap: 10px; margin-bottom: 10px; align-items: stretch; cursor: default; }
.ps-grid-item { position: relative !important; overflow: hidden; display: block; }
.ps-grid-item img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 2px; }

.ps-cap {
    position: absolute !important; bottom: 15px; left: 15px; 
    background: rgba(0,0,0,0.6); color: #fff; padding: 5px 12px; 
    font-size: 13px; border-radius: 3px; z-index: 5;
}

/* ============================================================
   3. MOBILE ANPASSUNG (Ratio-Fix & Ecken-Fix)
   ============================================================ */
@media (max-width: 767px) {
    /* 1. Abgerundete Ecken auf Smartphone entfernen */
    .ps-splash-wrapper {
        border-radius: 0 !important;
        margin: 0 0 20px 0; /* Eventuell Margin anpassen, wenn es bündig sein soll */
    }

    /* 2. Ratio-Fix für Chrome/Safari iOS */
    .ps-splash-container { 
        height: auto !important;
        /* Wir nutzen aspect-ratio und setzen min/max außer Kraft */
        aspect-ratio: 2 / 1 !important;
        min-height: 0 !important;
        max-height: none !important;
        gap: 4px !important; 
    }
    
    .ps-main-img { width: 50% !important; }
    .ps-side-grid { width: 50% !important; gap: 4px !important; }
    
    .ps-modal-nav { padding: 20px !important; }
    .ps-modal-row { flex-direction: column !important; }
    .ps-grid-item { width: 100% !important; margin-bottom: 10px; }
    .ps-grid-item img { height: auto !important; }
}

/* View 3 Lightbox */
.mfp-wrap.ps-ultimate-lightbox { z-index: 2147483647 !important; }


@media screen {
	.hideonscreen {display:none;}
}
/* ============================================================
   4. DRUCK-OPTIMIERUNG (Schlanke Version ohne Logo)
   ============================================================ */
@media print {
    /* Seitenränder für ein sauberes Schriftbild */
    @page {
        margin: 2cm;
    }

    /* Inhaltsbreite auf 100% zwingen */
    :root {
        --content-width: 100% !important;
    }

    .et_pb_row {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Sektionen kompakter machen */
    .et_pb_section {
        padding-top: 10px !important;
        padding-bottom: 10px !important;
    }

    /* Störende Web-Elemente ausblenden */
    .ps-btn-all,
	header, 
    footer, 
    #main-header, 
    #top-header, 
    #main-footer, 
    .dontprint, 
    .ps-map-fullwidth {
        display: none !important;
    }

    /* Hintergrundbilder (Galerie) drucken */
    .ps-splash-container {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    /* Sicherstellen, dass der Text ganz oben beginnt */
    body, #page-container, #main-content {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
}
.listing-badge-container {
  position:absolute;
  top:12px;
  left:12px;
  z-index:10;
}
.listing-badge {
   background:#c00000;
  color:#fff;
  padding:6px 10px;
  font-weight:700;
  text-transform:uppercase;
  border-radius:3px;
}
