/* ================================================
    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;
}

