/* ============================================================
   SALONEOM - FEATURES PAGE (DARK MODE & MOBILE FIX)
   ============================================================ */

:root {
    --feat-bg-dark: #0f172a;       /* لون الخلفية الأساسي (كحلي غامق) */
    --feat-accent: #38bdf8;        /* اللون السماوي للنصوص المميزة */
    --feat-text-light: #f8fafc;    /* لون النص الأبيض */
    --feat-text-muted: #cbd5e1;    /* لون النص الفرعي (أفتح قليلاً للقراءة) */
    --primary-soft: #eff6ff;
}

/* =========================================
   1. HERO SECTION (Dark + Image Support)
   ========================================= */
.feat-hero {
    position: relative;
    
    /* 1. لون احتياطي (كحلي غامق) */
    background-color: var(--feat-bg-dark);

    /* 2. الخلفية مع الصورة + طبقة تعتيم (Overlay) */
    /* غير الرابط 'img/hero-bg.jpg' بصورتك الخاصة */
    background: 
        /* طبقة سوداء شفافة بنسبة 85% لضمان قراءة النص الأبيض */
        linear-gradient(rgba(15, 23, 42, 0.90), rgba(15, 23, 42, 0.95)),
        /* ضع رابط صورتك هنا بدلاً من الرابط الوهمي */
        url('../img/hero-bg.jpg'); 
        
    background-size: cover;
    background-position: center;
    background-attachment: scroll; /* جعل الصورة ثابتة أو تتحرك (يفضل scroll للموبايل) */

    padding: 7rem 1.5rem 10rem 1.5rem;
    text-align: center;
    overflow: hidden;
    color: var(--feat-text-light);
    z-index: 1;
}

/* --- Code Particles (الرموز الطائرة) --- */
.code-particles span {
    position: absolute;
    color: rgba(255, 255, 255, 0.05); /* شفافية عالية */
    font-family: monospace;
    font-weight: 900;
    font-size: 1.5rem;
    animation: floatUp 15s linear infinite;
    bottom: -50px;
    z-index: 0;
}

/* توزيع الرموز */
.code-particles span:nth-child(1) { left: 10%; animation-duration: 12s; font-size: 2rem; }
.code-particles span:nth-child(2) { left: 20%; animation-delay: 2s; }
.code-particles span:nth-child(3) { right: 30%; animation-delay: 1s; }
.code-particles span:nth-child(4) { right: 10%; font-size: 2.5rem; }

@keyframes floatUp {
    0% { transform: translateY(0); opacity: 0; }
    20% { opacity: 0.3; }
    100% { transform: translateY(-100vh); opacity: 0; }
}

/* --- Developer Badge --- */
.dev-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    color: var(--feat-accent);
    font-family: monospace;
    font-weight: 700;
    font-size: 0.8rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(4px);
}

.blink-cursor {
    animation: blink 1s step-end infinite;
    color: #fff;
}
@keyframes blink { 50% { opacity: 0; } }

/* --- Slider Typography (تم تصغير الخطوط للموبايل) --- */
.hero-text-slider {
    display: grid;
    grid-template-areas: "stack";
    place-items: center;
    margin-bottom: 2rem;
    min-height: 220px; /* تقليل الارتفاع ليتناسب مع الموبايل */
}

.hero-slide {
    grid-area: stack;
    opacity: 0;
    transform: translateY(15px);
    transition: all 0.6s ease;
    pointer-events: none;
    width: 100%;
}

.hero-slide.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
    z-index: 10;
}

.feat-hero-title {
    /* استخدام clamp بحد أدنى أصغر (1.8rem) للموبايل */
    font-size: clamp(1.8rem, 5vw, 3.8rem);
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.gradient-text {
    background: linear-gradient(135deg, #60a5fa 0%, #38bdf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.4));
}

.feat-hero-sub {
    /* تصغير الخط الفرعي في الموبايل */
    font-size: clamp(0.95rem, 3vw, 1.2rem);
    color: var(--feat-text-muted);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
    padding: 0 10px; /* هوامش جانبية لمنع التصاق النص بالحواف */
}

/* --- Dots --- */
.slider-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 1rem;
    position: relative;
    z-index: 5;
}

.dot {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
}

.dot.active {
    background: var(--feat-accent);
    width: 25px;
    border-radius: 10px;
}

/* --- Wave --- */
.hero-wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    z-index: 3;
    line-height: 0;
}
.hero-wave svg {
    width: calc(100% + 1.3px);
    height: 60px; /* موجة صغيرة للموبايل */
}
@media (min-width: 768px) {
    .hero-wave svg { height: 120px; }
}

/* =========================================
   2. REST OF THE PAGE (Grid & Deep Dive)
   ========================================= */
.feat-grid-sec {
    padding: 2rem 1.5rem 5rem 1.5rem;
    background: #fff;
    position: relative; 
    z-index: 2;
}

.feat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.feat-box {
    padding: 2rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    text-align: left;
    transition: transform 0.3s ease;
}

.feat-icon-circle {
    width: 50px;
    height: 50px;
    background: var(--primary-soft);
    color: #2563eb;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.feat-box h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.8rem;
}

.feat-box p {
    font-size: 0.95rem;
    color: #64748b;
    line-height: 1.6;
}

/* --- Feature Rows (Deep Dive) --- */
.feat-row {
    padding: 4rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
}
.feat-row:nth-child(even) { background: #fff; }
.feat-row:nth-child(odd) { background: #f8fafc; }

.feat-row-inner {
    display: flex;
    align-items: center;
    gap: 4rem;
    max-width: 1100px;
    margin: 0 auto;
}
.feat-row.reverse .feat-row-inner { flex-direction: row-reverse; }

.feat-content { flex: 1; }
.feat-visual { flex: 1; width: 100%; }

.feat-badge {
    display: inline-block;
    padding: 6px 12px;
    background: #eff6ff;
    color: #2563eb;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.feat-row h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 1rem;
}

.feat-row p {
    font-size: 1rem;
    color: #475569;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.feat-list li {
    padding: 6px 0;
    font-size: 0.95rem;
    display: flex;
    gap: 10px;
    color: #334155;
}
.feat-list i { color: #2563eb; }

/* صورة المتصفح */
.feat-img-box {
    background: #1e293b;
    border-radius: 10px;
    padding-top: 20px; /* شريط العنوان */
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}
.feat-img-box::before {
    content: '';
    position: absolute;
    top: 8px; left: 10px;
    width: 8px; height: 8px;
    background: #ff5f56;
    border-radius: 50%;
    box-shadow: 14px 0 0 #ffbd2e, 28px 0 0 #27c93f;
}
.feat-img-box img { display: block; width: 100%; border-radius: 4px 4px 0 0; }

/* =========================================
   3. MOBILE RESPONSIVENESS (تحسينات قوية للهاتف)
   ========================================= */
@media (max-width: 991px) {
    /* Hero Adjustments */
    .feat-hero {
        padding-top: 5rem;
        padding-bottom: 8rem;
    }

    /* إصلاح حجم الخط في الموبايل ليكون صغيراً ومقروءاً */
    .feat-hero-title {
        font-size: 2.2rem; /* حجم ثابت مناسب للموبايل */
    }
    
    .feat-hero-sub {
        font-size: 1rem;
    }

    /* تحويل الصفوف لعمود واحد */
    .feat-row-inner {
        flex-direction: column !important;
        gap: 3rem;
        text-align: center;
    }
    
    /* محاذاة القوائم للوسط أو اليسار */
    .feat-list li {
        justify-content: center;
        text-align: left;
    }
    
    /* تقليل حجم الصورة في الموبايل */
    .feat-visual {
        max-width: 100%; 
    }
    
    /* تقليل الهوامش الداخلية للكروت */
    .feat-box {
        padding: 1.5rem;
    }
}

/* شاشات صغيرة جداً (مثل iPhone SE) */
@media (max-width: 480px) {
    .feat-hero-title {
        font-size: 1.8rem; /* تصغير إضافي للشاشات الضيقة */
    }
    .dev-badge {
        font-size: 0.7rem;
    }
}