/**
 * GenTech Hero Banner Stilləri
 * ============================
 * Bu fayl ana səhifədəki hero banner/slider ilə bağlı bütün stilləri saxlayır
 * style.css-dən ayrılıb optimallaşdırma məqsədilə
 */

/* ===================================================================== */
/* === HERO BANNER: ÜMUMİ LAYOUT === */
/* ===================================================================== */

/* Ana səhifə hero layoutu */
.home-hero-layout {
    display: flex;
    gap: 15px;
    margin: 20px 45px !important;
    align-items: stretch;
    flex-direction: row;
}

/* Sağ tərəf: Slider */
.hero-main {
    flex-grow: 1;
    min-width: 0;
    height: 450px;
}

.home-hero-layout .hero-left {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
    background: #f8f9fa;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.home-hero-layout .hero-left .slider-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Ümumi hero */
.hero {
    display: flex;
    justify-content: center;
    margin: 18px 0;
    position: relative;
    z-index: 1;
}

/* ===================================================================== */
/* === HERO BANNER: DESKTOP STİLLƏR === */
/* ===================================================================== */

@media (min-width: 1025px) {
    .hero {
        height: 450px;
    }

    .hero-left {
        background: linear-gradient(180deg, #8b0b2f, #b91c1c);
        color: #fff;
        padding: 36px;
        border-radius: 12px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        width: 100%;
        height: 450px;
    }

    .hero-left>img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 12px;
        display: block;
    }
}

/* ===================================================================== */
/* === HERO BANNER: MOBİL STİLLƏR (1023px) === */
/* ===================================================================== */

@media (max-width: 1024px) {

    /* Hero layout - yalnız slider görünsün */
    .home-hero-layout {
        display: block !important;
        gap: 0 !important;
        margin: 10px 0 !important;
    }

    /* Hero-main tam en alsın, height auto */
    .hero-main {
        width: 100% !important;
        height: auto !important;
        min-height: unset !important;
    }

    .home-hero-layout .hero-left {
        height: 250px;
        width: 100% !important;
    }

    /* section.hero margin/padding */
    section.hero.home-hero-layout {
        margin-bottom: 20px !important;
        box-sizing: border-box !important;
    }
}

/* ===================================================================== */
/* === HERO BANNER: MOBİL STİLLƏR (768px) === */
/* ===================================================================== */

@media (max-width: 768px) {

    /* Hero layout - simmetrik padding */
    .home-hero-layout {
        margin: 10px 0 15px 0 !important;
        padding: 0 5px !important;
        box-sizing: border-box !important;
    }

    .home-hero-layout .hero-left {
        height: 170px;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        border-radius: 12px !important;
        overflow: hidden !important;
    }

    .hero-main {
        height: auto !important;
        padding: 0 !important;
        width: 100% !important;
    }

    /* Yalnız sol banner qalsın */
    .hero-right {
        display: none !important;
    }

    .hero {
        display: block !important;
        margin: 12px 0 !important;
        height: auto !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Hero-left: mobil ölçü */
    .hero-left {
        width: 100% !important;
        height: 170px !important;
        min-height: 170px !important;
        aspect-ratio: 399 / 170;
        padding: 0 !important;
        margin: 0 !important;
        text-align: center;
        display: flex;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
        border-radius: 12px;
        overflow: hidden;
        background: #f8f9fa !important;
    }

    .hero-left .btn,
    .hero-left button,
    .hero-left a.button,
    .hero-left .buttons {
        display: none !important;
    }

    /* Mənfi marginlər silindi - simmetrik layout */
    html body .hero {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    html body .hero-left {
        max-width: 100% !important;
    }

    .hero-left>img {
        width: 100% !important;
        height: auto !important;
        object-fit: contain !important;
        border-radius: 12px;
        display: block !important;
        margin: 0 auto !important;
    }
}

/* ===================================================================== */
/* === HERO BANNER: DESKTOP SLİDER === */
/* ===================================================================== */

/* Ana konteyner üçün sərhəd tərifi */
.hero-left {
    position: relative;
    overflow: hidden;
    min-height: 450px;
    /* Desktop height constraint */
}

/* Sliderin özü üçün ümumi qaydalar */
.desktop-slider {
    display: none;
    /* Standart olaraq gizlidir (mobil üçün) */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Slider daxilindəki hər bir şəkil üçün qaydalar */
.desktop-slider .slider-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Sahəni tam doldurur, boşluq qoymur */
    object-position: center;
    /* Mərkəzi göstər - bütün şəkillər üçün balanslı */
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    visibility: hidden;
    border-radius: 10px;
}

/* Aktiv (görünən) şəkil üçün qayda */
.desktop-slider .slider-image.active {
    opacity: 1;
    visibility: visible;
}

/* Yalnız 768px və daha böyük ekranlarda slideri göstər */
@media (min-width: 768px) {
    .desktop-slider {
        display: block;
    }
}


/* ===== HERO DESKTOP SLIDER ===== */

.desktop-slider img {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

.desktop-slider img:first-child {
    opacity: 1;
    visibility: visible;
}

/* ======= MOBİL HERO SLIDER (LCP Optimizasiyası) ======= */
.mobile-slider {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    background: #f8f9fa;
}

.mobile-slider-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease-in-out;
}

.mobile-slider-image.active,
.mobile-slider-image:first-child {
    opacity: 1 !important;
    visibility: visible !important;
}

@media (max-width: 767px) {
    .mobile-slider {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .desktop-slider {
        display: none !important;
    }
}

/* ===================================================================== */
/* === HERO BANNER: 1920px+ EKRANLAR ÜÇÜN XÜSUSİ (DAHA GENİŞ) === */
/* ===================================================================== */
@media (min-width: 1920px) {
    .home-hero-layout {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

@media (max-width: 1366px) {
    .desktop-slider .slider-image {
        object-position: 50% center;
    }
}

@media (max-width: 1025px) {
    .desktop-slider .slider-image {
        object-position: 20% center;
    }
}

/* Tablet-ə məxsus xüsusi düzəlişlər: 768px - 1024px */
@media (min-width: 768px) and (max-width: 1024px) {

    /* Hero-left hündürlüyünü tablet üçün tənzimləyirik */
    /* Bu, pseudo-elementdən yaranan overlap-ı tamamilə aradan qaldırır */
    .hero-banner,
    .hero,
    .home-hero {
        height: auto !important;
        min-height: 250px !important;
    }

    /* Tablet üçün xüsusi dizayn şəkli - Fallback olaraq */
    .hero::before {
        content: "";
        position: absolute;
        left: 30px;
        right: 30px;
        top: 0;
        height: 250px !important;
        background-image: url("https://gentechstore.az/wp-content/uploads/2026/02/Adsiz-tasarim-1.png") !important;
        background-size: cover;
        background-position: center;
        border-radius: 18px;
        z-index: 0;
    }

    /* Slider konteynerini gizlədirik ki, yalnız arxa fon şəkli (::before) görünsün */
    /* Bu, "klonlanma" və üst-üstə minmə problemini tam həll edir */
    .hero .hero-main,
    .hero .hero-left,
    .hero .desktop-slider,
    .hero .mobile-slider {
        display: none !important;
    }

    .hero {
        background: transparent !important;
        display: block !important;
    }
}
