/* Hero Slider RTL & Responsive Fixes */

/* ── React hero (AsmaaHero): flex layout, never Nest absolute positioning ── */
.home-slider .sara-react-hero.hero-slider-1 .hero-slide-inner {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex-direction: row !important;
    height: 100%;
    min-height: inherit;
    padding-inline: 4% !important;
}

.home-slider .sara-react-hero.hero-slider-1 .hero-slide-inner .slider-content {
    position: relative !important;
    inset: auto !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    transform: none !important;
    flex: 0 1 auto !important;
    width: auto !important;
    max-width: min(580px, 52%) !important;
    /* pin to inline-start: left in LTR, right in RTL */
    margin-inline-start: 0 !important;
    margin-inline-end: auto !important;
    z-index: 2;
}

html[dir="rtl"] .home-slider .sara-react-hero.hero-slider-1 .hero-slide-inner .slider-content {
    text-align: right;
}

html[dir="ltr"] .home-slider .sara-react-hero.hero-slider-1 .hero-slide-inner .slider-content {
    text-align: left;
}

.home-slider .sara-react-hero.hero-slider-1 .hero-fg-wrap {
    flex: 0 0 auto;
    /* pin to inline-end: right in LTR, left in RTL */
    margin-inline-start: auto;
    margin-inline-end: 0;
}

/* foreground on start side (left LTR / right RTL) */
html[dir="ltr"] .home-slider .sara-react-hero.hero-slider-1 .hero-slide-inner[data-fg-start="true"] .hero-fg-wrap {
    order: -1;
    margin-inline-start: 0;
    margin-inline-end: auto;
}

html[dir="ltr"] .home-slider .sara-react-hero.hero-slider-1 .hero-slide-inner[data-fg-start="true"] .slider-content {
    order: 1;
    margin-inline-start: auto;
    margin-inline-end: 0 !important;
}

html[dir="rtl"] .home-slider .sara-react-hero.hero-slider-1 .hero-slide-inner[data-fg-start="true"] .hero-fg-wrap {
    order: -1;
    margin-inline-start: auto;
    margin-inline-end: 0;
}

html[dir="rtl"] .home-slider .sara-react-hero.hero-slider-1 .hero-slide-inner[data-fg-start="true"] .slider-content {
    order: 1;
    margin-inline-start: 0 !important;
    margin-inline-end: auto !important;
}

.home-slider .sara-react-hero:not(.areej-hero-mode) .single-hero-slider {
    min-height: 500px;
}

html[data-tenant-slug='areejalward'] .home-slider .sara-react-hero.areej-hero-mode .single-hero-slider {
    position: absolute !important;
    inset: 0 !important;
    height: 100% !important;
    min-height: 0 !important;
}

html[data-tenant-slug='areejalward'] .home-slider .sara-react-hero.areej-hero-mode .hero-slides-stack {
    min-height: clamp(420px, 38vw, 620px);
}

/* ── Legacy Nest/Slick sliders only (not React hero) ── */
.home-slider .hero-slider-1:not(.sara-react-hero) .single-hero-slider {
    min-height: 500px;
    background-position: center right;
    background-size: cover;
}

[dir="rtl"] .home-slider .hero-slider-1:not(.sara-react-hero) .single-hero-slider {
    background-position: center left;
}

.home-slider .hero-slider-1:not(.sara-react-hero) .slider-content {
    max-width: 600px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

/* Large Desktop (1920px+) */
@media (min-width: 1920px) {
    .home-slider .hero-slider-1:not(.sara-react-hero) .slider-content {
        max-width: 700px;
    }

    .home-slider .hero-slider-1:not(.sara-react-hero) .single-hero-slider,
    .home-slider .sara-react-hero:not(.areej-hero-mode) .single-hero-slider {
        min-height: 600px;
    }
}

/* Desktop (1400px - 1920px) */
@media (min-width: 1400px) and (max-width: 1919px) {
    .home-slider .hero-slider-1:not(.sara-react-hero) .slider-content {
        max-width: 550px;
    }
}

/* Medium Desktop (1200px - 1399px) */
@media (min-width: 1200px) and (max-width: 1399px) {
    .home-slider .hero-slider-1:not(.sara-react-hero) .slider-content {
        max-width: 500px;
    }
}

/* Tablet (768px - 1199px) */
@media (min-width: 768px) and (max-width: 1199px) {
    .home-slider .hero-slider-1:not(.sara-react-hero) .slider-content {
        max-width: 450px;
        left: 30px !important;
        right: 30px !important;
    }

    [dir="rtl"] .home-slider .hero-slider-1:not(.sara-react-hero) .slider-content {
        right: 30px !important;
        left: auto !important;
    }

    .home-slider .hero-slider-1:not(.sara-react-hero) .single-hero-slider,
    .home-slider .sara-react-hero:not(.areej-hero-mode) .single-hero-slider {
        min-height: 450px;
    }
}

/* Mobile (< 768px) */
@media (max-width: 767px) {
    .home-slider .sara-react-hero .hero-slide-inner {
        flex-direction: column !important;
        justify-content: center !important;
        text-align: center !important;
        padding: 1.5rem 1rem !important;
    }

    .home-slider .sara-react-hero .hero-slide-inner .slider-content {
        max-width: 100% !important;
        margin-inline: auto !important;
        text-align: center !important;
    }

    .home-slider .hero-slider-1:not(.sara-react-hero) .slider-content {
        max-width: calc(100% - 40px) !important;
        left: 20px !important;
        right: 20px !important;
        padding: 20px;
        background: rgba(255, 255, 255, 0.9);
        border-radius: 10px;
    }

    .home-slider .hero-slider-1:not(.sara-react-hero) .single-hero-slider,
    .home-slider .sara-react-hero:not(.areej-hero-mode) .single-hero-slider {
        min-height: 400px;
    }

    .home-slider .hero-slider-1:not(.sara-react-hero) .slider-content h1 {
        font-size: 32px !important;
        margin-bottom: 20px !important;
    }

    .home-slider .hero-slider-1:not(.sara-react-hero) .slider-content p {
        font-size: 14px !important;
        margin-bottom: 20px !important;
    }

    .home-slider .hero-slider-1:not(.sara-react-hero) .slider-content .btn {
        padding: 12px 24px !important;
        font-size: 14px !important;
    }
}

/* Extra Small Mobile (< 576px) */
@media (max-width: 575px) {
    .home-slider .hero-slider-1:not(.sara-react-hero) .slider-content h1 {
        font-size: 28px !important;
    }

    .home-slider .hero-slider-1:not(.sara-react-hero) .slider-content {
        max-width: calc(100% - 30px) !important;
        left: 15px !important;
        right: 15px !important;
    }

    .home-slider .hero-slider-1:not(.sara-react-hero) .single-hero-slider,
    .home-slider .sara-react-hero:not(.areej-hero-mode) .single-hero-slider {
        min-height: 350px;
    }
}

/* Newsletter RTL & Layout Fix */
.newsletter-inner {
    position: relative;
    overflow: hidden;
    min-height: 250px;
}

.newsletter-inner .newsletter-content {
    position: relative;
    z-index: 10;
    max-width: 650px;
}

[dir="rtl"] .newsletter-inner {
    direction: rtl;
}

[dir="rtl"] .newsletter-inner .newsletter-content {
    text-align: right;
    margin-inline-start: 0;
    margin-inline-end: auto;
}

[dir="ltr"] .newsletter-inner .newsletter-content {
    text-align: left;
    margin-inline-start: 0;
    margin-inline-end: auto;
}

/* Newsletter image positioning */
.newsletter-inner img {
    position: absolute;
    bottom: 0;
    height: 100%;
    width: auto;
    opacity: 0.15;
    z-index: 1;
    pointer-events: none;
}

[dir="rtl"] .newsletter-inner img {
    left: 0;
    right: auto;
}

[dir="ltr"] .newsletter-inner img {
    right: 0;
    left: auto;
}

/* Product Card Image Fix */
.product-img-action-wrap {
    position: relative;
    overflow: hidden;
}

.product-img img {
    max-width: 100%;
    height: auto;
    object-fit: cover;
}

/* Trust Signals Responsive */
@media (max-width: 991px) {
    .trust-signal-card {
        margin-bottom: 20px;
    }
}

/* Premium Newsletter Responsive */
@media (max-width: 1199px) {
    .newsletter-premium-wrapper h2 {
        font-size: 32px !important;
    }
}

@media (max-width: 991px) {
    .newsletter-premium-wrapper {
        padding: 40px 30px !important;
    }
    
    .newsletter-premium-wrapper h2 {
        font-size: 28px !important;
    }
    
    .newsletter-premium-wrapper .row > div:first-child {
        margin-bottom: 30px;
    }
}

@media (max-width: 767px) {
    .newsletter-premium-wrapper {
        padding: 30px 20px !important;
    }
    
    .newsletter-premium-wrapper h2 {
        font-size: 24px !important;
    }
    
    .newsletter-premium-wrapper h2 span {
        font-size: 20px !important;
    }
    
    .newsletter-premium-wrapper > div > div {
        padding: 25px 20px !important;
    }
    
    .newsletter-premium-wrapper h3 {
        font-size: 20px !important;
    }
}

@media (max-width: 576px) {
    .newsletter-premium-wrapper h2 {
        font-size: 22px !important;
    }
}
