/* ===========================
   Referenzen Slider Styles
   =========================== */

.referenzen-slider-wrapper {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
    overflow: hidden;
}

.referenzen-slider {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: 100%;
}

.referenz-slide {
    min-width: 100%;
    box-sizing: border-box;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.referenz-slide-image {
    width: 100%;
    max-width: 1000px;
    height: 500px; /* Feste Höhe für einheitliches Format */
    margin-bottom: 20px;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    background: #f5f5f5;
    position: relative;
}

.referenz-slide-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover; /* Bild wird zugeschnitten, behält Proportionen */
    object-position: center;
}

.referenz-slide-content {
    text-align: center;
    max-width: 800px;
}

.referenz-slide-title {
    font-size: 28px;
    margin-bottom: 15px;
    color: #333;
}

.referenz-slide-description {
    font-size: 16px;
    line-height: 1.6;
    color: #666;
}

/* Slider Navigation Buttons */
.referenzen-slider-prev,
.referenzen-slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 40px;
    padding: 10px 15px;
    cursor: pointer;
    z-index: 10;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.referenzen-slider-prev:hover,
.referenzen-slider-next:hover {
    background: rgba(0, 0, 0, 0.8);
}

.referenzen-slider-prev {
    left: 10px;
}

.referenzen-slider-next {
    right: 10px;
}

/* Slider Dots */
.referenzen-slider-dots {
    text-align: center;
    padding: 20px 0;
}

.referenzen-slider-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin: 0 5px;
    background: #ccc;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s ease;
}

.referenzen-slider-dot.active {
    background: #333;
}

/* ===========================
   Referenzen Grid Styles
   =========================== */

.referenzen-grid {
    display: grid;
    gap: 30px;
    margin: 40px 0;
}

/* Grid Columns - Default 3 */
.referenzen-grid[data-columns="2"] {
    grid-template-columns: repeat(2, 1fr);
}

.referenzen-grid[data-columns="3"] {
    grid-template-columns: repeat(3, 1fr);
}

.referenzen-grid[data-columns="4"] {
    grid-template-columns: repeat(4, 1fr);
}

.referenz-grid-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.referenz-grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Grid Item Mini-Slider */
.referenz-grid-image-slider {
    position: relative;
    width: 100%;
    height: 300px; /* Feste Höhe für einheitliches Format */
    overflow: hidden !important; /* Wichtig: Verhindert Überlauf */
    background: #f5f5f5;
}

.referenz-grid-slides {
    display: flex;
    height: 100%;
    width: 100%;
    transition: transform 0.4s ease-in-out;
    position: relative;
}

.referenz-grid-slide {
    min-width: 100%;
    max-width: 100%; /* Verhindert Überschreitung */
    width: 100%; /* Explizite Breite */
    height: 100%;
    flex-shrink: 0;
    position: relative;
    overflow: hidden; /* Verhindert dass Kinder-Elemente rausragen */
}

.referenz-grid-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Bild wird zugeschnitten, behält Proportionen */
    object-position: center;
    display: block;
    position: relative;
    z-index: 1; /* Bild über Jetpack-Elementen */
}

/* Mini-Slider Navigation */
.referenz-grid-nav {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 5;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 12px;
    border-radius: 20px;
}

.referenz-grid-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.referenz-grid-dot.active {
    background: white;
    width: 24px;
    border-radius: 4px;
}

.referenz-grid-dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

/* Grid Navigation Arrows */
.referenz-grid-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 24px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    z-index: 5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease, background 0.3s ease;
}

.referenz-grid-item:hover .referenz-grid-arrow {
    opacity: 1;
}

.referenz-grid-arrow:hover {
    background: rgba(0, 0, 0, 0.8);
}

.referenz-grid-arrow.prev {
    left: 10px;
}

.referenz-grid-arrow.next {
    right: 10px;
}

/* Image Counter Badge */
.referenz-image-count {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: bold;
    z-index: 5;
}

.referenz-grid-content {
    padding: 20px;
}

.referenz-grid-title {
    font-size: 20px;
    margin-bottom: 10px;
    color: #333;
}

.referenz-grid-description {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    margin: 0;
}

/* ===========================
   Responsive Styles
   =========================== */

/* Tablets */
@media (max-width: 1024px) {
    .referenzen-grid[data-columns="3"],
    .referenzen-grid[data-columns="4"] {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .referenz-slide-image {
        height: 400px;
    }
    
    .referenz-slide-title {
        font-size: 24px;
    }
    
    .referenz-grid-title {
        font-size: 18px;
    }
    
    .referenz-grid-image-slider {
        height: 250px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .referenzen-grid,
    .referenzen-grid[data-columns="2"],
    .referenzen-grid[data-columns="3"],
    .referenzen-grid[data-columns="4"] {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .referenz-slide {
        padding: 10px;
    }
    
    .referenz-slide-image {
        height: 300px;
    }
    
    .referenz-slide-title {
        font-size: 20px;
    }
    
    .referenz-slide-description {
        font-size: 14px;
    }
    
    .referenz-grid-image-slider {
        height: 220px;
    }
    
    .referenzen-slider-prev,
    .referenzen-slider-next {
        font-size: 30px;
        padding: 5px 10px;
    }
    
    .referenz-grid-arrow {
        width: 35px;
        height: 35px;
        font-size: 20px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .referenz-slide-image {
        height: 250px;
    }
    
    .referenz-slide-title {
        font-size: 18px;
    }
    
    .referenz-grid-title {
        font-size: 16px;
    }
    
    .referenz-grid-content {
        padding: 15px;
    }
    
    .referenz-grid-image-slider {
        height: 200px;
    }
    
    .referenzen-slider-prev,
    .referenzen-slider-next {
        font-size: 24px;
    }
    
    .referenz-grid-arrow {
        width: 30px;
        height: 30px;
        font-size: 18px;
    }
}

/* Aspect Ratio Alternative (falls object-fit nicht ausreicht) */
/* Uncomment für 16:9 Aspect Ratio Container
.referenz-slide-image,
.referenz-grid-image-slider {
    aspect-ratio: 16 / 9;
    height: auto;
}
*/

/* ===========================
   Fix für Jetpack Boost Guide Thumbnails
   =========================== */

/* Verstecke Jetpack Boost Guide Elemente komplett - alle Varianten */
.jetpack-boost-guide,
.jetpack-boost-guide[data-jetpack-boost-guide-id],
[data-jetpack-boost-guide-id],
.referenz-grid-slide .jetpack-boost-guide,
.referenz-grid-item .jetpack-boost-guide,
.referenzen-grid .jetpack-boost-guide,
.referenz-grid-image-slider .jetpack-boost-guide {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    overflow: hidden !important;
}

/* Verstecke alle Svelte-Klassen von Jetpack Boost */
.guide.small.svelte-1828btn,
.guide.svelte-1828btn,
.previews.svelte-1828btn,
.interaction-area.svelte-1qopaii,
.bubble.svelte-1qopaii,
.bubble-inner.svelte-1qopaii,
.spinner.svelte-2eb8gc,
.svelte-f6jc8,
[class*="svelte-"] {
    display: none !important;
}

/* Verstecke alle guide-bezogenen Klassen */
.guide_small_image,
[class*="guide_small_image"],
[class*="guide"][class*="small"],
.guide.small {
    display: none !important;
}

/* Zusätzlicher globaler Schutz */
div[data-jetpack-boost-guide-id] * {
    display: none !important;
}
