/**
 * ============================================
 * حنين الرواد - ملف أنماط الإضافات الخارجية
 * Hanin Alruwad - Vendor Stylesheet
 * ============================================
 * 
 * الإصدار: 1.0
 * تاريخ: مارس 2026
 * 
 * يحتوي على أنماط:
 * - Swiper Slider
 * - AOS (Animate on Scroll)
 * - Jarallax
 * - Chocolat Lightbox
 * - تحسينات عامة للإضافات
 * 
 * ============================================
 */

/* ============================================ */
/* 1. Swiper Slider - أنماط السلايدر */
/* ============================================ */
.swiper {
    width: 100%;
    position: relative;
    overflow: hidden;
    list-style: none;
    padding: 0;
    z-index: 1;
}

.swiper-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 1;
    display: flex;
    transition-property: transform;
    box-sizing: content-box;
}

.swiper-slide {
    flex-shrink: 0;
    width: 100%;
    height: 100%;
    position: relative;
    transition-property: transform;
}

/* أزرار التنقل */
.swiper-button-prev,
.swiper-button-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

.swiper-button-prev {
    left: 10px;
    right: auto;
}

.swiper-button-next {
    right: 10px;
    left: auto;
}

[dir="rtl"] .swiper-button-prev {
    right: 10px;
    left: auto;
}

[dir="rtl"] .swiper-button-next {
    left: 10px;
    right: auto;
}

.swiper-button-prev:after,
.swiper-button-next:after {
    font-family: swiper-icons;
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    text-transform: none;
    letter-spacing: 0;
    font-variant: initial;
    line-height: 1;
}

.swiper-button-prev:after {
    content: 'prev';
}

.swiper-button-next:after {
    content: 'next';
}

[dir="rtl"] .swiper-button-prev:after {
    content: 'next';
}

[dir="rtl"] .swiper-button-next:after {
    content: 'prev';
}

.swiper-button-prev:hover,
.swiper-button-next:hover {
    background: var(--hanin-primary);
    transform: translateY(-50%) scale(1.1);
}

/* نقاط التنقل */
.swiper-pagination {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.swiper-pagination-bullet-active {
    background: var(--hanin-primary);
    width: 24px;
    border-radius: 5px;
}

/* تأثير التمرير */
.swiper-slide {
    transition: transform 0.3s ease;
}

/* ============================================ */
/* 2. AOS - Animate on Scroll */
/* ============================================ */
[data-aos] {
    pointer-events: none;
    transition-property: transform, opacity;
}

[data-aos].aos-animate {
    pointer-events: auto;
}

/* تأثيرات الظهور */
[data-aos="fade-up"] {
    transform: translate3d(0, 30px, 0);
    opacity: 0;
}

[data-aos="fade-up"].aos-animate {
    transform: translate3d(0, 0, 0);
    opacity: 1;
}

[data-aos="fade-down"] {
    transform: translate3d(0, -30px, 0);
    opacity: 0;
}

[data-aos="fade-down"].aos-animate {
    transform: translate3d(0, 0, 0);
    opacity: 1;
}

[data-aos="fade-right"] {
    transform: translate3d(30px, 0, 0);
    opacity: 0;
}

[data-aos="fade-right"].aos-animate {
    transform: translate3d(0, 0, 0);
    opacity: 1;
}

[data-aos="fade-left"] {
    transform: translate3d(-30px, 0, 0);
    opacity: 0;
}

[data-aos="fade-left"].aos-animate {
    transform: translate3d(0, 0, 0);
    opacity: 1;
}

[data-aos="zoom-in"] {
    transform: scale(0.9);
    opacity: 0;
}

[data-aos="zoom-in"].aos-animate {
    transform: scale(1);
    opacity: 1;
}

[data-aos="zoom-out"] {
    transform: scale(1.1);
    opacity: 0;
}

[data-aos="zoom-out"].aos-animate {
    transform: scale(1);
    opacity: 1;
}

/* ============================================ */
/* 3. Jarallax - تأثير الخلفية الثابتة */
/* ============================================ */
.jarallax {
    position: relative;
    z-index: 0;
    overflow: hidden;
}

.jarallax > .jarallax-img {
    position: absolute;
    object-fit: cover;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.jarallax-keep-img {
    position: relative;
    z-index: 0;
}

.jarallax-keep-img > .jarallax-img {
    position: relative;
    display: block;
    max-width: 100%;
    height: auto;
    z-index: -100;
}

/* ============================================ */
/* 4. Chocolat Lightbox - معرض الصور المنبثق */
/* ============================================ */
.hanin-lightbox-open {
    overflow: hidden;
}

.hanin-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.hanin-lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

.hanin-lightbox-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1060;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.hanin-lightbox-wrapper.active {
    opacity: 1;
    visibility: visible;
}

.hanin-lightbox-container {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

.hanin-lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.hanin-lightbox-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    font-size: 20px;
    transition: all 0.3s ease;
    z-index: 10;
}

[dir="rtl"] .hanin-lightbox-close {
    right: auto;
    left: 15px;
}

.hanin-lightbox-close:hover {
    background: var(--hanin-danger);
    transform: scale(1.1);
}

.hanin-lightbox-prev,
.hanin-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    font-size: 24px;
    transition: all 0.3s ease;
    z-index: 10;
}

.hanin-lightbox-prev {
    left: 20px;
}

.hanin-lightbox-next {
    right: 20px;
}

[dir="rtl"] .hanin-lightbox-prev {
    left: auto;
    right: 20px;
}

[dir="rtl"] .hanin-lightbox-next {
    right: auto;
    left: 20px;
}

.hanin-lightbox-prev:hover,
.hanin-lightbox-next:hover {
    background: var(--hanin-primary);
    transform: translateY(-50%) scale(1.1);
}

.hanin-lightbox-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    color: #fff;
    padding: 20px;
    text-align: center;
    font-size: 14px;
}

.hanin-lightbox-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--hanin-primary);
    border-radius: 50%;
    animation: lightboxSpin 0.8s linear infinite;
}

@keyframes lightboxSpin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* ============================================ */
/* 5. أنماط إضافية لـ Swiper مع RTL */
/* ============================================ */
[dir="rtl"] .swiper-button-prev,
[dir="rtl"] .swiper-button-next {
    transform: translateY(-50%) rotate(180deg);
}

[dir="rtl"] .swiper-pagination-bullet-active {
    width: 24px;
}

/* ============================================ */
/* 6. أنماط التحسينات العامة */
/* ============================================ */
/* تأكد من أن جميع الإضافات لا تتداخل مع الأنماط الرئيسية */
.swiper-container {
    width: 100%;
    height: 100%;
}

/* تحسين ظهور السلايدر على الموبايل */
@media (max-width: 768px) {
    .swiper-button-prev,
    .swiper-button-next {
        width: 35px;
        height: 35px;
    }
    
    .swiper-button-prev:after,
    .swiper-button-next:after {
        font-size: 14px;
    }
    
    .swiper-pagination-bullet {
        width: 8px;
        height: 8px;
    }
    
    .swiper-pagination-bullet-active {
        width: 20px;
    }
    
    .hanin-lightbox-prev,
    .hanin-lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .hanin-lightbox-close {
        width: 35px;
        height: 35px;
        font-size: 16px;
        top: 10px;
        right: 10px;
    }
}

/* تحسين ظهور السلايدر على الشاشات الكبيرة */
@media (min-width: 1200px) {
    .swiper-button-prev,
    .swiper-button-next {
        width: 45px;
        height: 45px;
    }
    
    .swiper-button-prev:after,
    .swiper-button-next:after {
        font-size: 20px;
    }
}

/* ============================================ */
/* 7. أنماط السلايدر الرئيسي */
/* ============================================ */
.hanin-hero-slider .swiper-slide {
    transition: opacity 0.5s ease;
}

.hanin-hero-slider .swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.5);
}

.hanin-hero-slider .swiper-pagination-bullet-active {
    background: var(--hanin-secondary);
}

.hanin-hero-slider .swiper-button-prev,
.hanin-hero-slider .swiper-button-next {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
}

.hanin-hero-slider .swiper-button-prev:hover,
.hanin-hero-slider .swiper-button-next:hover {
    background: var(--hanin-secondary);
}

/* ============================================ */
/* 8. أنماط سلايدر العلامات التجارية */
/* ============================================ */
.hanin-brands-slider .swiper-slide {
    text-align: center;
    transition: transform 0.3s ease;
}

.hanin-brands-slider .swiper-slide:hover {
    transform: translateY(-5px);
}

/* ============================================ */
/* 9. أنماط AOS مع RTL */
/* ============================================ */
[dir="rtl"] [data-aos="fade-right"] {
    transform: translate3d(-30px, 0, 0);
}

[dir="rtl"] [data-aos="fade-right"].aos-animate {
    transform: translate3d(0, 0, 0);
}

[dir="rtl"] [data-aos="fade-left"] {
    transform: translate3d(30px, 0, 0);
}

[dir="rtl"] [data-aos="fade-left"].aos-animate {
    transform: translate3d(0, 0, 0);
}

/* ============================================ */
/* 10. أنماط Jarallax مع التجاوب */
/* ============================================ */
@media (max-width: 768px) {
    .jarallax {
        min-height: 300px;
    }
}

@media (min-width: 768px) {
    .jarallax {
        min-height: 400px;
    }
}

@media (min-width: 1200px) {
    .jarallax {
        min-height: 500px;
    }
}

/* ============================================ */
/* نهاية الملف */
/* ============================================ */