/* Alap stílusok a slider-hez - jobb oldali túlnyúlással */
.gardeningo-elotte-utana-slider {
    position: relative;
    margin: 30px 0;
    max-width: 100%;
    overflow: visible; /* Fontos: engedje a tartalmat túlnyúlni */
    padding: 0 0 30px;
}

/* Slider konténer és tartalom */
.slider-container {
    position: relative;
    width: calc(100% + 300px); /* Túlnyúlik a jobb oldalon */
    margin-right: -300px; /* Jobb oldali túlnyúlás kompenzálása */
    overflow: visible; /* Fontos: engedje a tartalmat túlnyúlni */
    padding: 0; /* Eltávolítottuk a bal oldali padding-et, mivel a nyilak már nem itt vannak */
    box-sizing: border-box;
    margin-bottom: 30px; /* Hely a navigációs gomboknak */
}

.slider-track {
    display: flex;
    transition: transform 0.5s ease;
    overflow: visible; /* Fontos: engedje a tartalmat túlnyúlni */
}

.slider-slide {
    flex: 0 0 45%; /* 2 teljes dia + 1 fél dia megjelenítése */
    width: 45%;
    min-width: 0; /* Fontos a flexbox miatt */
    padding: 0 10px;
    box-sizing: border-box;
}

/* Előtte-utána konténer */
.elotte-utana-container {
    position: relative;
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    height: 100%;
}

/* Egyedi előtte-utána megvalósítás */
.custom-before-after {
    position: relative;
    width: 100%;
    height: 445px; /* Kisebb magasság a 3 diás megjelenítéshez */
    overflow: hidden;
}

.before-image,
.after-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

.after-image {
    width: 50%; /* Alapértelmezetten a kép felét mutatja */
    border-right: 4px solid #FFFFFF;
}

.slider-handle {
    position: absolute;
    top: 0;
    left: 50%; /* Alapértelmezetten középen van */
    height: 100%;
    width: 40px;
    margin-left: -20px;
    cursor: ew-resize;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 5; /* Biztosítsuk, hogy a csúszka a címke felett legyen */
}

.slider-handle-line {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 36px;
    height: 36px;
    background-color: #374836;
    border: 3px solid white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.slider-handle-line::before,
.slider-handle-line::after {
    content: '';
    position: absolute;
    background-color: white;
    width: 3px;
    height: 12px;
}

.slider-handle-line::before {
    transform: translateX(-5px);
}

.slider-handle-line::after {
    transform: translateX(5px);
}

.projekt-cim {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0;
    color: white;
    padding: 20px;
    text-align: center;
    z-index: 2;
    font-family: "Poppins", Sans-serif;
    font-size: 20px;
    background: linear-gradient(180deg, rgba(55, 72, 54, 0.00) 39%, #374836 100%);
    height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
}

/* Navigációs konténer a slider alatt */
.slider-navigation-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px; /* Távolság a nyilak között */
    margin: 0 auto 30px;
    max-width: 150px; /* A konténer szélessége */
}

/* Navigáció nyilak */
.slider-nav {
    width: 40px;
    height: 40px;
    background-color: #374836;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    text-align: center;
    opacity: 0.8;
    transition: opacity 0.3s, transform 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.slider-nav:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Aktív slide kiemelése (opcionális) */
.slider-slide {
    opacity: 1;
    transition: opacity 0.3s;
}

.slider-slide.active {
    opacity: 1;
}

/* Túlnyúló slider szülő konténeréhez */
.elotte-utana-wrapper-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    overflow: visible !important;
}

/* --------- HOZZÁADOTT RÉSZEK A SIMA KÉPEKHEZ --------- */

/* Egyszerű kép konténer stílusok */
.simple-image-container {
    position: relative;
    width: 100%;
    height: 445px; /* Megegyezik a custom-before-after magasságával */
    overflow: hidden;
    border-radius: 8px;
}

/* Egyszerű kép stílusok */
.simple-image {
    width: 100%;
    height: 100%  !important;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

/* Hover effekt az egyszerű képre (opcionális) */
.simple-image-container:hover .simple-image {
    transform: scale(1.03);
}

/* Hiányzó kép placeholder */
.no-image-placeholder {
    position: relative;
    width: 100%;
    height: 445px;
    background-color: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.no-image-placeholder p {
    font-family: "Poppins", Sans-serif;
    color: #374836;
    font-size: 16px;
}

/* Ugyanolyan címke stílus az egyszerű képekhez is, mint az előtte-utána képeknél */
.simple-image-container .projekt-cim {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0;
    color: white;
    padding: 20px;
    text-align: center;
    z-index: 2;
    font-family: "Poppins", Sans-serif;
    font-size: 20px;
    background: linear-gradient(180deg, rgba(55, 72, 54, 0.00) 39%, #374836 100%);
    height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
}

/* --------- VÉGE A HOZZÁADOTT RÉSZEKNEK --------- */

/* Responsive beállítások */
@media (max-width: 1400px) {
    .slider-container {
        width: calc(100% + 200px);
        margin-right: -200px;
    }
}

@media (max-width: 992px) {
    .slider-slide {
        flex: 0 0 60%; /* 1 dia + egy fél tableten */
        width: 60%;
    }
    .slider-container {
        width: calc(100% + 150px);
        margin-right: -150px;
    }
}

@media (max-width: 768px) {
    .slider-slide {
        flex: 0 0 85%; /* 1 dia + egy fél kis képernyőn */
        width: 85%;
    }
    .custom-before-after,
    .simple-image-container,
    .no-image-placeholder {
        height: 350px;
    }
    .slider-container {
        width: 100%;
        margin-right: 0px;
    }
    .gardeningo-elotte-utana-slider {
        position: relative;
        margin: 30px 0;
        max-width: 100%;
        overflow: hidden;
        padding: 0 0 30px;
    }
}