/* ================================================
    PROJECT: Alhooriy Mobile Store - Custom Styles
    AUTHOR: Alhooriy
    VERSION: 1.0
    ================================================
*/

/* 1. إعدادات عامة وتحسين التمرير */
* {
    scroll-behavior: smooth;
}

/* إخفاء شريط التمرير الافتراضي مع الحفاظ على إمكانية التمرير (لأقسام الخدمات) */
.hide-scroll-bar {
    -ms-overflow-style: none; /* Internet Explorer 10+ */
    scrollbar-width: none;    /* Firefox */
}

.hide-scroll-bar::-webkit-scrollbar {
    display: none; /* Safari and Chrome */
}

/* 2. منطق السلايدر الرئيسي (Hero Slider) */
.slider-container {
    position: relative;
    overflow: hidden;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease-in-out, visibility 0.8s;
    z-index: 0;
}

.slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 10;
}

/* تأثير بسيط عند ظهور النصوص داخل السلايدر */
.slide.active h1, 
.slide.active p, 
.slide.active a {
    animation: fadeInUp 0.8s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 3. الشريط الإخباري اللانهائي (News Ticker) */
.ticker-track {
    display: flex;
    width: max-content;
    animation: marquee-infinite 40s linear infinite;
}

/* توقف الحركة عند مرور الماوس */
.ticker-track:hover {
    animation-play-state: paused;
}

@keyframes marquee-infinite {
    0% {
        transform: translateX(-50%);
    }
    100% {
        transform: translateX(0%);
    }
}

/* 4. خلفية الألوان المتحركة (Animated Gradient) */
.bg-animated-gradient {
    background: linear-gradient(-45deg, #ffffff, #fce8e8, #ffffff, #ffebeb);
    background-size: 400% 400%;
    animation: animatedGradient 12s ease infinite;
}

/* تعديل ألوان الخلفية المتحركة في الوضع الليلي */
html.dark .bg-animated-gradient {
    background: linear-gradient(-45deg, #111111, #2a0002, #181818, #1f0000);
    background-size: 400% 400%;
}

@keyframes animatedGradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* 5. تحسينات الهيدر عند التمرير */
header.sticky {
    transition: all 0.3s ease;
}

/* 6. تأثيرات إضافية للبطاقات (Cards) */
.service-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* 7. تخصيص الفوتر */
footer {
    position: relative;
    z-index: 10;
}

/* تحسين شكل الأزرار في الجوال */
@media (max-width: 768px) {
    .slide h1 {
        font-size: 2.5rem;
    }
}
/* تأثيرات الخريطة والتنقل */
#real-location iframe {
    filter: grayscale(0.2) contrast(1.2) brightness(0.7);
    transition: filter 1s ease;
}

#real-location:hover iframe {
    filter: grayscale(0) contrast(1) brightness(0.8);
}

.animate-spin-slow {
    animation: spin 20s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ألوان الحالة */
.status-open { border-color: #10b981 !important; background: rgba(16, 185, 129, 0.1) !important; }
.status-closed { border-color: #ef4444 !important; background: rgba(239, 68, 68, 0.1) !important; }

.text-open { color: #10b981 !important; }
.text-closed { color: #ef4444 !important; }

.bg-open { background-color: #10b981 !important; }
.bg-closed { background-color: #ef4444 !important; }
/* تأثيرات المودال الاحترافية */
#maintenance-modal.active #modal-content {
    transform: scale(1);
    opacity: 1;
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23E50914'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 1rem center;
    background-size: 1.5rem;
}

#step-1, #step-2 {
    animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
/* مدخلات الاستبيان الاحترافية */
.form-input-pro {
    width: 100%;
    padding: 1.25rem 3.5rem 1.25rem 1.25rem;
    border-radius: 1.25rem;
    background: #f9fafb;
    border: 2px solid transparent;
    outline: none;
    transition: all 0.3s ease;
    font-weight: 700;
    color: #111;
}

html.dark .form-input-pro {
    background: #1f2937;
    color: #f3f4f6;
}

.form-input-pro:focus {
    border-color: #E50914;
    background: white;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

html.dark .form-input-pro:focus {
    background: #111;
}

/* حركة المودال */
#maintenance-modal.active #modal-content {
    transform: scale(1);
    opacity: 1;
}

/* سهم المنسدلة المخصص */
select.form-input-pro {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239ca3af'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 1.25rem center;
    background-size: 1.25rem;
}
/* تنسيقات الشعارات */
.sim-brand-box {
    background: white;
    height: 140px;
    border-radius: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.1);
    border: 1px solid rgba(0,0,0,0.05);
    transition: all 0.4s ease;
}
.sim-brand-box:hover { transform: translateY(-10px); box-shadow: 0 20px 40px -10px rgba(229, 9, 20, 0.2); }
.sim-brand-box img { max-height: 100%; object-fit: contain; }

/* مدخلات المحترفين */
.pro-input {
    width: 100%;
    padding: 1.25rem 1rem;
    border-radius: 1.25rem;
    background: #f9fafb;
    border: 2px solid transparent;
    outline: none;
    transition: all 0.3s;
    font-weight: 800;
    font-size: 0.9rem;
}
html.dark .pro-input { background: #1f2937; color: white; }
.pro-input:focus { border-color: #E50914; background: white; }

.field-label {
    @apply absolute -top-2.5 right-4 bg-white dark:bg-brand-dark px-2 text-[10px] font-black text-brand-red z-10;
}

/* اختيار النوع والشبكة */
.p-box {
    height: 65px; border-radius: 1rem; background: #f3f4f6; display: flex;
    align-items: center; justify-content: center; font-weight: 900; color: #94a3b8;
    border: 3px solid transparent; cursor: pointer; transition: 0.3s;
}
html.dark .p-box { background: #1f2937; }
.p-radio input:checked + .p-box { border-color: inherit; background: white; color: #111; transform: translateY(-3px); }

.t-radio span {
    display: block; padding: 15px; background: #f3f4f6; border-radius: 1rem;
    text-align: center; font-weight: 800; cursor: pointer; transition: 0.3s;
}
html.dark .t-radio span { background: #1f2937; color: #ccc; }
.t-radio input:checked + span { background: #E50914; color: white; box-shadow: 0 8px 15px rgba(229, 9, 20, 0.3); }

#sim-modal.active #sim-modal-content { transform: scale(1); opacity: 1; }

/* --- تنسيقات قسم الشركاء الاحترافي --- */

/* حاوية الشعار الواحد */
.partner-logo-slot {
    flex: 0 0 auto;
    width: 200px; /* عرض الشعار في الكمبيوتر */
    height: 100px;
    margin: 0 30px; /* المسافة بين الشعارات */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* التأثير الاحترافي الافتراضي: شفافية خفيفة وأبيض وأسود */
    filter: grayscale(100%);
    opacity: 0.5;
}

/* التجاوب للشاشات الصغيرة */
@media (max-width: 768px) {
    .partner-logo-slot {
        width: 140px;
        margin: 0 15px;
    }
}

/* تصميم الصورة داخل الحاوية */
.partner-logo-slot img {
    max-width: 80%;
    max-height: 70%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

/* --- تأثير الواو عند مرور الماوس (Hover) --- */
.partner-logo-slot:hover {
    filter: grayscale(0%); /* عودة الألوان الأصلية */
    opacity: 1; /* وضوح كامل */
    transform: scale(1.1); /* تكبير بسيط وناعم */
}

html.dark .partner-logo-slot:hover {
    filter: grayscale(0%) brightness(1.1); /* زيادة السطوع قليلاً في الوضع المظلم */
}

/* --- حركة السلايدر اللانهائي (CSS Animation) --- */
.logos-track {
    /* هذه الحركة سيتم تفعيلها بواسطة JS لضبط الوقت ديناميكياً */
    animation: scrollLogos linear infinite;
}

/* إيقاف الحركة عند وقوف الماوس على أي شعار (لمسة تفاعلية) */
.logos-track:hover {
    animation-play-state: paused !important;
}

@keyframes scrollLogos {
    0% { transform: translateX(0); }
    100% { transform: translateX(100%); } /* التحرك لليسار لآن الموقع RTL */
}
/* روابط التنقل الاحترافية */
.nav-link-pro {
    @apply relative px-5 py-2 text-gray-700 dark:text-gray-200 font-bold text-sm transition-all duration-300;
}

.nav-link-pro::after {
    content: '';
    @apply absolute bottom-0 left-1/2 w-0 h-0.5 bg-brand-red transition-all duration-300 -translate-x-1/2 rounded-full;
}

.nav-link-pro:hover {
    @apply text-brand-red;
}

.nav-link-pro:hover::after {
    @apply w-1/2;
}

/* تأثير تصغير الهيدر عند التمرير */
header.scrolled {
    @apply py-2 shadow-xl bg-white/95 dark:bg-brand-black/95 border-brand-red/10;
}

header.scrolled #headerInner {
    @apply h-16 lg:h-20;
}
/* --- ثبات التموضع --- */
.wa-fixed-right {
    position: fixed !important; bottom: 25px !important; right: 25px !important;
    left: auto !important; z-index: 9999; direction: rtl; font-family: 'Cairo', sans-serif;
}

/* --- الزر الرئيسي (لون المحل) --- */
.wa-fab-main {
    width: 68px; height: 68px; background-color: #E50914 !important;
    border-radius: 50%; border: 4px solid #111b21; color: white;
    font-size: 35px; cursor: pointer; position: relative;
    box-shadow: 0 12px 24px rgba(229, 9, 20, 0.3);
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.wa-fab-main:hover { transform: scale(1.1) rotate(8deg); }

.wa-pulse-red {
    position: absolute; inset: 0; border-radius: 50%;
    background: #E50914; animation: waRedPulse 2s infinite; opacity: 0.4;
}
@keyframes waRedPulse { 0% { transform: scale(1); opacity: 0.4; } 100% { transform: scale(1.6); opacity: 0; } }

/* --- إطار التطبيق --- */
.wa-app-frame {
    width: 360px; background: #0b141a; border-radius: 30px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.5); margin-bottom: 20px;
    overflow: hidden; border: 1px solid #202c33; transition: 0.5s ease;
}

.wa-header { background: #E50914; padding: 20px 15px; color: white; }
.wa-header-content { display: flex; align-items: center; gap: 12px; }

.wa-avatar-ring {
    width: 48px; height: 48px; background: rgba(255,255,255,0.15);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    border: 1px solid rgba(255,255,255,0.2); font-size: 22px;
}

.wa-text-group h3 { font-size: 16px; font-weight: 800; margin: 0; }
.wa-text-group p { font-size: 11px; opacity: 0.8; margin: 0; }

/* --- قائمة الموظفين (تباعد فخم) --- */
.wa-body-canvas { height: 410px; overflow-y: auto; background: #0b141a; position: relative; padding: 18px; }
.wa-overlay-doodle { position: absolute; inset: 0; opacity: 0.05; background-image: url('https://user-images.githubusercontent.com/15075759/28719144-86dc0f70-73b1-11e7-911d-60d70fcded21.png'); pointer-events: none; }

.wa-staff-card {
    background: #111b21; padding: 16px; border-radius: 22px;
    display: flex; align-items: center; gap: 15px; cursor: pointer;
    border: 1px solid #202c33; margin-bottom: 14px; /* مسافة بين الموظفين */
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.wa-staff-card:hover { 
    background: #1c272d; border-color: #E50914; 
    transform: translateY(-4px); box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.wa-verified { color: #2094f3; font-size: 12px; margin-right: 5px; }

/* --- أنيميشن جاري الكتابة الواو --- */
.wa-typing-bubble {
    background: #202c33; padding: 12px 18px; border-radius: 18px;
    border-bottom-right-radius: 4px; display: flex; gap: 4px; width: fit-content;
}
.wa-typing-bubble span {
    width: 6px; height: 6px; background: #8696a0; border-radius: 50%;
    animation: waTypingDots 1.4s infinite ease-in-out;
}
.wa-typing-bubble span:nth-child(2) { animation-delay: 0.2s; }
.wa-typing-bubble span:nth-child(3) { animation-delay: 0.4s; }

@keyframes waTypingDots { 0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; } 40% { transform: scale(1.1); opacity: 1; } }

/* --- الفقاعات --- */
.wa-bubble {
    max-width: 85%; padding: 12px 16px; font-size: 14px; font-weight: 600;
    border-radius: 18px; position: relative; line-height: 1.5; color: white;
}
.wa-in { background: #202c33; align-self: flex-start; border-bottom-right-radius: 4px; border-right: 3px solid #E50914; }

/* --- الفوتر --- */
.wa-footer-bar { background: #111b21; padding: 12px; display: flex; gap: 10px; border-top: 1px solid #202c33; }
.wa-input-pill {
    flex: 1; background: #2a3942; border-radius: 25px; padding: 8px 16px;
    display: flex; align-items: center; gap: 10px; color: #8696a0;
}
.wa-input-pill input { background: transparent; border: none; color: white; outline: none; flex: 1; font-size: 14px; font-weight: 600; }

.wa-send-circle {
    width: 46px; height: 46px; background: #E50914; color: white;
    border-radius: 50%; border: none; cursor: pointer; transform: rotate(180deg);
}

.wa-artiva-brand { padding: 12px; text-align: center; background: #0b141a; border-top: 1px solid #1c272d; }
.wa-artiva-brand a { color: #556670; font-size: 9px; text-decoration: none; font-weight: 900; letter-spacing: 1px; }

.wa-hidden { display: none !important; }