* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

/* 1. متغيرات CSS لسهولة التعديل */
:root {
    --primary-color: #ff0000;
    --primary-color-dark: #cc0000;
    --dark-bg: #000000;
    --medium-dark-bg: #050505;
    --light-dark-bg: #0a0a0c;
    --text-color-light: #a0a0a8;
    --text-color-medium: #71717a;
    --text-color-bright: #ffffff;
    --border-color-dark: #200505; /* Subtle red glow border context */
    --neon-shadow: 0 0 15px rgba(255, 0, 0, 0.3);
}

body {
    font-family: 'Cairo', 'Amiri', Arial, sans-serif;
    font-weight: 400;
    line-height: 1.6;
    color: #ffffff;
    overflow-x: hidden;
    background-color: #000000;
    overscroll-behavior-y: auto;    transition: all 0.3s ease;
    direction: rtl;
    padding-top: 80px; 
    text-align: right;
}

a {
    color: inherit;
    text-decoration: none !important;
}

/* الحركات والتأثيرات البصرية */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideLeft {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideRight {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 15px rgba(255, 0, 0, 0.4);
        border-color: rgba(255, 0, 0, 0.2);
    }
    50% {
        box-shadow: 0 0 35px rgba(255, 0, 0, 0.6), 0 0 50px rgba(255, 0, 0, 0.4);
        border-color: rgba(255, 0, 0, 0.8);
    }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes robotMove {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    25% {
        transform: translateY(-5px) rotate(-2deg);
    }
    50% {
        transform: translateY(-10px) rotate(0deg);
    }
    75% {
        transform: translateY(-5px) rotate(2deg);
    }
}

@keyframes eyeBlink {
    0%, 90%, 100% {
        transform: scaleY(1);
    }
    95% {
        transform: scaleY(0.1);
    }
}

@keyframes tvGlow {
    0%, 100% {
        box-shadow: 0 20px 50px rgba(0,0,0,0.5),
                    inset 0 0 15px rgba(0,0,0,0.7),
                    0 0 30px var(--primary-color-dark);
    }
    50% {
        box-shadow: 0 20px 50px rgba(0,0,0,0.5),
                    inset 0 0 15px rgba(0,0,0,0.7),
                    0 0 60px var(--primary-color);
    }
}

/* العناوين */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    font-family: 'Cairo', sans-serif;
}

/* فئات الحركة */
.animate-on-scroll {
    /* Removed opacity: 0 to ensure fallback visibility */
    opacity: 1;
    transition: all 0.8s ease-out;
}

.animate-on-scroll.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* أنماط إشعار الواتساب المخصص */
.whatsapp-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background-color: #fff;
    color: #1a1a1a;
    padding: 25px 35px;
    border-radius: 15px;
    display: none; /* يبدأ مخفياً */
    align-items: center;
    gap: 20px;
    z-index: 10001;
    font-family: 'Cairo', sans-serif;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}
.whatsapp-notification.show {
    display: flex;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}
.whatsapp-notification .fab.fa-whatsapp {
    font-size: 50px;
    color: #25D366; /* لون واتساب الأخضر */
}
.whatsapp-notification img {
    width: 60px; /* حجم الأيقونة */
    height: 60px;
    object-fit: cover;
}
.logo-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin-left: 10px;
    vertical-align: middle;
}

/* زر تبديل اللغة المحسن */
.lang-switcher {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 6px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(5px);
    margin-inline-start: 15px;
}
.lang-switcher::before {
    content: '\f0ac'; /* Globe icon */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.9rem;
    transition: transform 0.5s ease;
}
.lang-switcher:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(215, 55, 55, 0.3);
}
.lang-switcher:hover::before {
    transform: rotate(180deg) scale(1.1);
}

/* الهيدر */
.header {
    background: rgba(51, 51, 51, 0.5); /* خلفية شبه شفافة في الحالة الافتراضية */
    color: white;
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1010;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    /* display: none; */ /* تم إظهار شريط التنقل العلوي */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* إضافة حد زجاجي */
    /* display: none;  تمت إزالة هذا السطر لإظهار الناف بار */
}

.header.scrolled {
    background: rgba(26, 26, 26, 0.85); /* خلفية أغمق وأكثر شفافية عند التمرير */
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Cairo', sans-serif;
}
.logo:hover {
    opacity: 0.9;
    transform: scale(1.02);
    transition: all 0.2s ease-in-out;
}

.logo i {
    color: #FFFFFF;
    animation: pulse 2s infinite;
}

.hamburger {
    display: none; /* إخفاء زر الهامبرغر افتراضياً على الشاشات الكبيرة */
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    -webkit-transition: all 0.3s ease-in-out;
    transition: all 0.3s ease-in-out;
    background-color: white;
    border-radius: 2px;
}

.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* قسم البطل الرئيسي مع خلفية GIF */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5); /* Darker overlay for better contrast */
    z-index: 2; /* Above video */
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1; /* Base layer */
    pointer-events: none;
}

.hero-content {
    max-width: 900px;
    z-index: 3; /* On top of everything */
    position: relative;
    padding: 3rem 2rem;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    margin: 0 1rem;
}

.hero h1 {
    font-size: clamp(2.2rem, 5vw, 4rem);
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    animation: slideRight 1.5s ease-out 0.3s both;
    font-weight: 800;
    font-family: 'Cairo', sans-serif;
}

.hero p {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    margin-bottom: 2rem;
    opacity: 1;
    animation: slideLeft 1.5s ease-out 0.6s both;
    font-weight: 600;
    font-family: 'Cairo', sans-serif;
}

.hero .cta-button {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-color-dark));
    color: #FFFFFF;
    padding: 18px 45px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.15rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 30px rgba(215, 55, 55, 0.4);
    animation: slideDown 1.2s ease-out 0.9s both;
    opacity: 1;
    font-family: 'Cairo', sans-serif;
    border: none;
    cursor: pointer;
    letter-spacing: 0.5px;
}

.hero .cta-button:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 40px rgba(215, 55, 55, 0.6);
    background: linear-gradient(135deg, #ff4d4d, var(--primary-color-dark));
}

/* قسم الخدمات */
.services {
    padding: 100px 0;
    background: var(--medium-dark-bg); /* توحيد الخلفية مع هوية الموقع */
    position: relative;
    overflow: hidden; /* إخفاء البطاقات الزائدة عن عرض الشاشة */
}

/* إضافة غطاء متدرج على الجوانب لإخفاء حواف الشريط المتحرك */
.services::before, .services::after {
    content: '';
    position: absolute;
    top: 0;
    width: 100px; /* عرض التدرج */
    height: 100%;
    z-index: 2;
}

.section-title {
    text-align: center;
    font-size: clamp(2rem, 4vw, 2.8rem);
    margin-bottom: 3rem;
    color: #F8F8F8;
    position: relative;
    opacity: 0;
    font-weight: 800;
    font-family: 'Cairo', sans-serif;
}

.section-title.services-title {
    animation: slideDown 1s ease-out;
    animation-fill-mode: both;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary-color-dark);
    border-radius: 2px;
    display: none; /* تمت إضافة هذا السطر لإخفاء الخط */
}

.service-card {
    background: rgba(255, 255, 255, 0.03);
    padding: 1.5rem; 
    border-radius: 20px;
    text-align: right; 
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
    transition: all 0.4s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    opacity: 1;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-color-dark));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color); /* استخدام اللون الأحمر الأساسي */
    box-shadow: 0 15px 30px rgba(215, 55, 55, 0.2);
}

.service-icon {
    font-size: 2.5rem; /* تصغير حجم الأيقونة */
    color: var(--primary-color-dark);
    margin-bottom: 1rem; /* تقليل الهامش السفلي */
    display: block;
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    transform: scale(1.1);
    color: var(--primary-color);
}

.service-card h3 {
    font-size: 1.2rem; /* تصغير حجم العنوان */
    margin-bottom: 0.8rem; /* تقليل الهامش السفلي */
    color: #F8F8F8;
    font-weight: 700;
    font-family: 'Cairo', sans-serif;
}

.service-card p {
    color: #ccc;
    line-height: 1.7;
    flex-grow: 1;
    font-size: 0.9rem; /* تصغير حجم النص */
    margin-bottom: 1rem; /* تقليل الهامش السفلي */
    font-family: 'Cairo', sans-serif;
}

.service-card .cta-button {
    display: inline-block;
    background: var(--primary-color);
    color: rgb(255, 255, 255);
    padding: 12px 25px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    margin-top: 15px;
    animation: glow 2s ease-in-out infinite alternate;
    position: relative;
    overflow: hidden;
    font-family: 'Cairo', sans-serif;
}

.service-card .cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.service-card .cta-button:hover::before {
    left: 100%;
}

.service-card .cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(215, 55, 55, 0.4);
    background: var(--primary-color-dark);
}

/* Services Grid Styles */
.service-card {
    opacity: 1; /* Make cards visible */
}

/* قسم من نحن - إصلاح الأخطاء */
.about {
    padding: 120px 0;
    background: #1a1a1a;
    position: relative;
    overflow: hidden; /* إضافة لمنع تسريب المحتوى */
}

.about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><linearGradient id="grad1" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" stop-color="%23b91c1c" stop-opacity="0.05"/><stop offset="100%" stop-color="%23d73737" stop-opacity="0.1"/></linearGradient></defs><circle cx="100" cy="100" r="80" fill="url(%23grad1)"/><circle cx="900" cy="800" r="120" fill="url(%23grad1)"/></svg>') !important;
    z-index: 0;
}

/* About Section Layout */
.about-premium-layout {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-top: 40px;
}

.about-glass-card {
    flex: 1.2;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 60px;
    border-radius: 40px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
    position: relative;
    overflow: hidden;
}

.about-glass-card h2 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    font-weight: 800;
}

.about-glass-card p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color-light);
    margin-bottom: 30px;
}

.about-image-container.premium-image {
    flex: 1;
    position: relative;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
}

.about-image-container.premium-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

@media (max-width: 992px) {
    .about-premium-layout {
        flex-direction: column;
        text-align: center;
        gap: 50px;
    }
    .about-glass-card {
        padding: 40px 25px;
        order: 2;
    }
    .about-image-container.premium-image {
        width: 100%;
        max-width: 500px;
        order: 1;
    }
    .about-glass-card h2 {
        font-size: 2rem;
    }
    .about-stats {
        justify-content: center;
    }
}

.about-text p:hover {
    border-right-color: var(--primary-color);
    background: rgba(215, 55, 55, 0.08);
    border-radius: 8px;
}

.about-image {
    position: relative;
    /* overflow: hidden; */ /* تم تعطيل هذه الخاصية لإظهار رأس الروبوت */
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.4);
    height: 400px; /* تقليل الارتفاع */
    width: 70%; /* تقليل العرض إلى 70% */
    margin: 0 auto; /* توسيط الإطار */
    display: flex;
    justify-content: center;
    align-items: center;
}

.about-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(185, 28, 28, 0.2), rgba(215, 55, 55, 0.2));
    z-index: 1;
    border-radius: 20px;
}

.about-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
    border-radius: 20px;
}

/* قسم الكلمات المفتاحية للـ SEO */
.seo-keywords {
    padding: 80px 0;
    background: var(--medium-dark-bg);
    text-align: center;
    overflow: hidden;
}

.stacked-cards-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.stacked-cards-container {
    position: relative;
    width: 300px;
    height: 400px;
    margin-top: 3rem;
}

.stacked-card {
    background: var(--light-dark-bg);
    padding: 2rem 1.5rem;
    border-radius: 15px;
    border: 2px solid var(--border-color-dark);
    transition: transform 0.5s ease, opacity 0.5s ease;
    width: 100%;
    height: 100%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: absolute;
    cursor: grab;
    user-select: none;
}

.stacked-card.dismiss-right {
    transform: translateX(150%) rotate(30deg) !important;
    opacity: 0;
}

.stacked-card.dismiss-left {
    transform: translateX(-150%) rotate(-30deg) !important;
    opacity: 0;
}

.stacked-card:active {
    cursor: grabbing;
}

.stacked-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.stacked-card h4 {
    color: #f8f8f8;
    margin-bottom: 1rem;
    font-weight: 700;
    font-family: 'Cairo', sans-serif;
    font-size: 1.4rem;
    text-align: center;
}

.stacked-card p {
    color: var(--text-color-light);
    line-height: 1.6;
    font-size: 1rem;
    font-family: 'Cairo', sans-serif;
    text-align: center;
}

.stacked-cards-controls {
    display: block; /* Show container on mobile by default */
    text-align: center;
    margin-top: 2rem;
}
.stacked-cards-controls .mobile-only-btn {
    display: inline-flex; /* Show only the reset button on mobile */
    align-items: center;
    gap: 8px;
    padding: 12px 25px; /* Increased padding for a better look */
    width: auto;
    height: auto;
    font-size: 1rem;
    background: var(--primary-color); /* Use primary color for background */
    border: none; /* Remove border */
    border-radius: 50px; /* Pill shape */
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(215, 55, 55, 0.2);
}
.stacked-cards-controls .mobile-only-btn:hover i {
    transform: rotate(180deg); /* Rotate icon on hover */
}

.stacked-cards-nav-btn {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 15px; /* Changed from circle to squircle */
    cursor: pointer;
    font-size: 1.4rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.stacked-cards-nav-btn i {
    transition: transform 0.4s ease; /* Smooth transition for icon rotation */
}
.stacked-cards-nav-btn:hover i {
    transform: scale(1.2); /* Make icon slightly bigger on hover */
}

.stacked-cards-nav-btn#stacked-cards-prev,
.stacked-cards-nav-btn#stacked-cards-next {
    display: none; /* Hide prev/next buttons on mobile */
}

.stacked-cards-nav-btn:hover {
    background: var(--primary-color);
    transform: translateY(-5px) scale(1.05); /* More pronounced hover effect */
    border-color: var(--primary-color-dark);
    box-shadow: 0 8px 25px rgba(215, 55, 55, 0.3), inset 0 0 10px rgba(0,0,0,0.3);
}

@media (min-width: 768px) {
    .stacked-cards-controls {
        display: flex; /* Show the container on desktop */
        justify-content: center;
        gap: 1.5rem;
    }
    .stacked-cards-nav-btn#stacked-cards-prev,
    .stacked-cards-nav-btn#stacked-cards-next {
        display: inline-flex; /* Show prev/next buttons on desktop */
        width: 60px; /* Restore desktop size */
        height: 60px;
        font-size: 1.4rem;
    }
    .stacked-cards-controls .mobile-only-btn {
        display: none; /* Hide mobile button on desktop */
    }
}

@media (max-width: 400px) {
    .stacked-cards-container {
        width: 260px;
        height: 360px;
    }
    .stacked-card h4 { font-size: 1.2rem; }
    .stacked-card p { font-size: 0.9rem; }
}

/* إزالة الأنماط القديمة */
.playing-cards-container, .keyword-item {
    display: none;
}

/* قسم المدونة - تحسين الوظائف */
/* --- New Blog Page Styles --- */
.blog {
    background-color: #e9e6e4;
    max-width: 1350px;
    display: grid;
    height: 90vh;
    max-height: 800px;
    overflow: hidden;
    grid-template-columns: 15% 20% 35% 30%;
    grid-template-rows: 100%;
    width: 100%;
    padding: 40px 4px;
    position: relative;
    margin: 5vh auto; /* Center the blog section */
    border-radius: 15px;
}

.blog-part {
    padding: 0 20px;
}
.blog-part:not(:last-child) {
    border-left: 1px solid #94918f; /* Switched from right to left for RTL */
}

.blog-menu {
    font-size: 22px;
    text-decoration: none;
    color: #161419;
    display: flex;
    letter-spacing: -0.5px;
    align-items: center;
}
.blog-menu svg { width: 22px; margin-right: 4px; } /* Switched from left to right */
.blog-menu + .blog-menu { margin-top: 24px; }
.blog-menu.mention { margin-top: auto; font-size: 19px; }
.blog-menu.subscribe { margin-top: 8px; font-size: 19px; position: relative; }
.blog-menu.subscribe:before { content: ""; width: 16px; height: 16px; background-color: #161419; left: 0; border-radius: 1px; margin-left: 14px; } /* Switched from right to left */
.blog-menu.rounded:before { content: ""; border-radius: 50%; width: 12px; height: 12px; background-color: #161419; margin-left: 12px; } /* Switched from right to left */

.is-menu { display: flex; flex-direction: column; }

.blog-big__title {
    font-family: "Space Grotesk", sans-serif;
    font-size: 132px;
    font-weight: 700;
    letter-spacing: -5px;
    line-height: 1;
    margin-bottom: 6px;
}

.blog-header { display: flex; flex-direction: column; }
.blog-article { padding: 0 20px; }
.blog-article img { height: 260px; max-height: 22vh; width: 100%; object-fit: cover; filter: grayscale(1); }

.page-number {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 100%;
    font-size: 72px;
    text-align: center;
    letter-spacing: -3px;
    font-weight: lighter;
    font-family: "Space Grotesk", sans-serif;
    border-left: 1px solid #94918f; /* Switched from right to left */
    white-space: nowrap;
}

.small-title { border-bottom: 1px solid #94918f; margin-bottom: 20px; padding-bottom: 20px; }
.date { display: flex; justify-content: flex-start; } /* Switched from flex-end */

.blog-article h2 {
    font-size: 26px;
    font-weight: 500;
    line-height: 1.2;
    margin: 8px 0;
}
.blog-article h2 span { font-family: "Playfair Display", serif; }
.blog-article p { line-height: 1.5; margin: 14px 0; }
.blog-article a {
    color: #161419;
    text-decoration: none;
    font-size: 26px;
    letter-spacing: -1px;
    display: flex;
    justify-content: flex-start; /* Switched from flex-end */
    align-items: center;
    margin-top: auto;
    border-top: 1px solid #94918f;
    padding-top: 14px;
}
.blog-article a svg { width: 26px; margin-right: 10px; } /* Switched from margin-right */

.blog-detail { display: flex; align-items: center; justify-content: space-between; font-size: 14px; }
.blog-detail span { font-family: "Playfair Display", serif; }

.blog-header-container {
    overflow-y: auto;
    overflow-x: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    scroll-snap-type: y mandatory;
    border-left: 1px solid #94918f; /* Switched from right to left */
}
.blog-header-container > * { flex-shrink: 0; min-height: 100%; scroll-snap-align: start; }
.blog-header-container .blog-article:not(.header-article) { flex-grow: 1; display: flex; flex-direction: column; }

marquee {
    font-size: 20px;
    background-color: var(--dark-bg);
    color: #e9e6e4;
    padding: 6px 0;
    width: calc(100% + 44px);
    margin-right: -20px; /* Switched from left to right */
    flex-shrink: 0;
}
marquee span:before {
    display: inline-block;
    content: "";
    border-radius: 50%;
    width: 10px;
    height: 10px;
    position: relative;
    top: -1px;
    vertical-align: baseline;
    background-color: #e9e6e4;
    margin: 0 16px;
}

.blog-right { overflow: auto; height: calc(100% + 60px); }
.blog-right .rounded { font-style: italic; font-size: 18px; }
.blog-right .rounded:before { content: ""; border-radius: 50%; width: 9px; height: 9px; background-color: #161419; margin-left: 6px; } /* Switched from right to left */

.blog-right-title { font-size: 25px; font-family: "Playfair Display", serif; }
.blog-right-title-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #94918f;
    margin-bottom: 20px;
    padding-bottom: 20px;
    margin-top: 100px;
    letter-spacing: -1px;
}

.blog-title-date { display: flex; align-items: baseline; justify-content: space-between; }
.blog-right-page { font-size: 56px; margin-bottom: 16px; font-family: "Space Grotesk", sans-serif; }
.blog-right-page-title { font-family: "Space Grotesk", sans-serif; font-size: 28px; font-weight: 600; max-width: 16ch; letter-spacing: -2px; }
.blog-right-page-subtitle { max-width: 33ch; font-size: 15px; margin-top: 12px; line-height: 1.4; }
.blog-right-container + .blog-right-container { margin-top: 40px; }

.right-blog { display: flex; flex-direction: column; }

::-webkit-scrollbar { display: none; }

.circle {
    width: 100%;
    aspect-ratio: 1/1;
    border-radius: 50%;
    background-color: var(--dark-bg);
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    color: #e9e6e4;
    padding: 20px;
    text-align: center;
    margin-top: 40px;
}
.circle-title { font-size: 24px; font-weight: 600; margin-bottom: 12px; font-family: "Space Grotesk", sans-serif; }
.circle-subtitle { max-width: 30ch; font-size: 14px; line-height: 1.3; margin-bottom: 16px; }
.circle-footer { font-family: "Playfair Display", serif; font-size: 30px; }

/* Responsive Adjustments */
@media screen and (max-width: 1400px) {
    .blog-big__title { font-size: 120px; }
    .blog-right-title-container { margin-top: 88px; }
    @media screen and (max-width: 768px) {
    .header .nav-container { padding: 0 1rem; }
    .lang-switcher { padding: 4px 10px; font-size: 0.75rem; margin-inline-start: 10px; }
    .logo { font-size: 1.3rem; }
}

@media screen and (max-width: 560px) {
    .hero-content { padding: 2.5rem 1.2rem; }
    .hero h1 { font-size: 1.8rem; }
    .hero p { font-size: 0.95rem; }
    .portfolio-section-home { padding: 50px 0; }
    .home-pf-container { max-width: 92% !important; }
}
}
@media screen and (max-width: 1260px) {
    .blog-menu { font-size: 1.6vw; }
    .blog-menu.mention, .blog-menu.subscribe { font-size: 1.4vw; }
    .blog-big__title { font-size: 9vw; letter-spacing: -2px; }
    .page-number { font-size: 5vw; }
    .blog-right-title-container { margin-top: 6vw; }
}
@media screen and (max-width: 1030px) {
    .blog { grid-template-columns: 20% 50% 30%; }
    .is-menu { display: none; }
    .blog-right-title-container { margin-top: 5vw; }
    .circle-title { display: none; }
    .right-blog .blog-menu { display: none; }
}
@media screen and (max-width: 768px) {
    .blog { grid-template-columns: 25% 75%; width: 100%; max-width: none; }
    .blog-header-container { border-left: 0; }
    .right-blog { display: none; }
}
@media screen and (max-width: 560px) {
    body { padding: 0; }
    .blog { grid-template-columns: 100%; max-height: none; height: auto; }
    .blog-big__title { font-size: 36px; margin-bottom: 12px; }
    .small-title { font-size: 14px; position: absolute; top: 10px; left: 24px; border-bottom: 0; } /* Switched from right to left */
    .blog-is-sticky { display: none; }
}
/* --- End New Blog Page Styles --- */

/* قسم الأسئلة الشائعة */
.faq-section {
    padding: 100px 0;
    background: #2a2a2a;
    position: relative;
}

.faq-item {
    margin-bottom: 1.5rem;
    border: 1px solid #444;
    border-radius: 12px;
    overflow: hidden;
    background: #333;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.faq-question {
    width: 100%;
    text-align: right;
    padding: 1.5rem 2rem;
    background: #333;
    border: none;
    color: white;
    font-size: 1.15rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Cairo', sans-serif;
}

.faq-question::before {
    content: '+';
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: transform 0.3s ease;
    order: -1;
}

.faq-question.active::before {
    transform: rotate(45deg);
}

.faq-question:hover {
    background: #3a3a3a;
    color: var(--primary-color);
}

.faq-answer {
    padding: 0 2rem;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    color: #ccc;
    background: #2a2a2a;
}

.faq-answer.active {
    max-height: 500px;
    padding: 2rem;
}

.faq-answer p {
    line-height: 1.7;
    font-size: 1rem;
    font-family: 'Cairo', sans-serif;
}

/* قسم التواصل */
.contact {
    padding: 120px 0;
    background: #333333;
    color: white;
    animation: slideUp 1s ease-out;
    position: relative;
}

.contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><radialGradient id="contact-grad" cx="50%" cy="50%"><stop offset="0%" stop-color="%23d73737" stop-opacity="0.1"/><stop offset="100%" stop-color="%23b91c1c" stop-opacity="0"/></radialGradient></defs><circle cx="500" cy="500" r="300" fill="url(%23contact-grad)"/></svg>') !important;
    z-index: 0;
}

.contact-form {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 1rem;
    position: relative;
    z-index: 1;
}

.form-group {
    margin-bottom: 2.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.8rem;
    font-weight: 700;
    font-size: 1.1rem;
    color: #f8f8f8;
    font-family: 'Cairo', sans-serif;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 18px 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    font-size: 1.05rem;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Cairo', sans-serif;
    text-align: right;
    direction: rtl;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 25px rgba(215, 55, 55, 0.25);
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255,255,255,0.5);
}

.submit-btn {
    background: linear-gradient(135deg, #d73737, #b91c1c);
    color: #FFFFFF;
    padding: 15px 35px;
    border: 2px solid #d73737;
    border-radius: 30px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    position: relative;
    overflow: hidden;
    font-family: 'Cairo', sans-serif;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(215, 55, 55, 0.4);
    background: linear-gradient(135deg, var(--primary-color-dark), #9a1616);
}

/* الفوتر */
.footer {
    background: #1a1a1a;
    color: white;
    padding: 4rem 0 2rem;
    text-align: right;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-color-dark), var(--primary-color));
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    text-align: right;
}

.footer-section {
    padding: 1rem 0;
}

.footer-section h3 {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    position: relative;
    padding-bottom: 8px;
    font-weight: 700;
    font-family: 'Cairo', sans-serif;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: 0;
    width: 50px;
    height: 3px;
    background: var(--primary-color-dark);
    border-radius: 2px;
    display: none; /* تمت إضافة هذا السطر لإخفاء الخط */
}

.footer-section p, .footer-section ul {
    font-size: 1rem;
    line-height: 1.9;
    color: #ccc;
    list-style: none;
    padding: 0;
    font-family: 'Cairo', sans-serif;
}

.footer-section ul li {
    margin-bottom: 0.8rem;
    transition: all 0.3s ease;
}

.footer-section ul li:hover {
    transform: translateX(-5px);
}

.footer-section ul li a {
    color: #ccc;
    transition: color 0.3s ease;
    position: relative;
}

.footer-section ul li a::before {
    content: '◀';
    color: var(--primary-color);
    margin-left: 8px;
    font-size: 0.8rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.footer-section ul li a:hover::before {
    opacity: 1;
}

/* --- Article Page Styles --- */
.page-section-padding {
    padding: 100px 0;
}

.article-content {
    max-width: 800px; /* تحديد عرض المقال لتحسين القراءة */
    margin: 0 auto;
    color: var(--text-color-light);
}

.article-content h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    color: #fff;
    margin-bottom: 1rem;
    line-height: 1.3;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    font-size: 0.9rem;
    color: var(--text-color-medium);
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color-dark);
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.article-image {
    width: 100%;
    height: auto;
    max-height: 450px;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 2.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.article-content p {
    font-size: 1.1rem; /* زيادة حجم الخط */
    line-height: 1.9; /* زيادة التباعد بين السطور */
    margin-bottom: 1.5rem;
    color: var(--text-color-light);
}

.article-content h2 {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    color: var(--primary-color);
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color-dark);
}

.article-content h3 {
    font-size: clamp(1.2rem, 3vw, 1.6rem);
    color: #fff;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.article-content ul,
.article-content ol {
    padding-right: 2rem; /* مسافة بادئة للقائمة */
    margin-bottom: 1.5rem;
}

.article-content ul li,
.article-content ol li {
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 0.8rem;
    color: var(--text-color-light);
}

.article-content ul li::marker {
    content: '✓ ';
    color: var(--primary-color);
    font-size: 1.2em;
}

.article-content a {
    color: var(--primary-color);
    text-decoration: underline !important;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color 0.3s ease, background-color 0.3s ease;
}

.article-content a:hover {
    color: #013b5c;
    background-color: rgba(37, 0, 250, 0.774);
    text-decoration-color: #183142 !important;
}

.share-buttons {
    margin: 2rem 0;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color-dark);
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.share-buttons-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: #fff;
    margin-left: 1rem; /* margin-right for LTR */
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    color: #fff;
    font-size: 1.2rem;
    text-decoration: none !important;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.share-btn:hover {
    transform: translateY(-3px) scale(1.1);
    color: #fff;
}

.share-btn.facebook { background-color: #1877F2; }
.share-btn.twitter { background-color: #1DA1F2; }
.share-btn.whatsapp { background-color: #25D366; }
.share-btn.linkedin { background-color: #0A66C2; }
.share-btn.copy-link { background-color: #6c757d; cursor: pointer; }

.share-btn.facebook:hover { box-shadow: 0 0 15px #1877F2; }
.share-btn.twitter:hover { box-shadow: 0 0 15px #1DA1F2; }
.share-btn.whatsapp:hover { box-shadow: 0 0 15px #25D366; }
.share-btn.linkedin:hover { box-shadow: 0 0 15px #0A66C2; }
.share-btn.copy-link:hover { box-shadow: 0 0 15px #6c757d; }

html[dir="ltr"] .share-buttons-title {
    margin-left: 0;
    margin-right: 1rem;
}

.copy-link-feedback {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #28a745;
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    z-index: 10002;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease;
    font-family: 'Cairo', sans-serif;
}

.copy-link-feedback.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -10px);
}
.footer-section ul li a:hover {
    color: var(--primary-color);
}

.footer-section.contact-info p a {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    color: #ccc;
    transition: all 0.3s ease;
    padding: 8px;
    border-radius: 8px;
    justify-content: flex-start;
    flex-direction: row-reverse;
}

.footer-section.contact-info p a:hover {
    color: var(--primary-color);
    background: rgba(215, 55, 55, 0.1);
    transform: translateX(-5px);
}

.footer-section.contact-info p a i {
    color: var(--primary-color);
    min-width: 20px;
    font-size: 1.1rem;
}

.social-links {
    margin-top: 1.5rem;
    display: flex;
    gap: 20px;
    justify-content: flex-start;
}

.social-links a {
    font-size: 2rem;
    color: #ccc;
    transition: all 0.3s ease;
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-links a:hover {
    color: var(--primary-color);
    background: rgba(215, 55, 55, 0.2);
    transform: translateY(-5px) scale(1.1);
}

.footer-bottom {
    border-top: 1px solid #444;
    margin-top: 4rem;
    padding-top: 2rem;
    font-size: 0.95rem;
    color: #aaa;
    text-align: center;
}

.footer-bottom p {
    margin-bottom: 0.8rem;
    font-family: 'Cairo', sans-serif;
}

.footer-bottom a {
    color: var(--primary-color);
    transition: color 0.3s ease;
}

.footer-bottom a:hover {
    color: var(--primary-color-dark);
}

/* زر الدردشة العائم المحسن - مع إمكانية السحب */
.chatbot-toggle {
    position: fixed;
    bottom: 90px;
    right: 30px;
    background: #000000; /* Deep black base */
    color: rgb(255, 255, 255);
    border: 2px solid var(--primary-color); /* Neon red border */
    width: 65px;
    height: 65px;
    border-radius: 18px;
    cursor: move;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.4), inset 0 0 10px rgba(255, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}

.chatbot-toggle.dragging {
    cursor: grabbing;
    animation: none;
    transform: scale(1.1);
    box-shadow: 0 15px 35px rgba(215, 55, 55, 0.6);
}

.chatbot-toggle::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--primary-color), var(--primary-color-dark), var(--primary-color));
    border-radius: 22px;
    z-index: -1;
    animation: rotate 5s linear infinite;
}

.robot-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.robot-face {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 1px;
}

.robot-eye {
    width: 10px;
    height: 15px;
    background: #fff;
    border-radius: 50%;
    animation: eyeBlink 3s infinite;
}

.robot-mouth {
    width: 5px;
    height: 3px;
    background: #fff;
    border-radius: 1px;
}

.robot-antenna {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 10px;
    background: #fff;
}

.robot-antenna::after {
    content: '';
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: #ffff00;
    border-radius: 50%;
    box-shadow: 0 0 8px #ffff00;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.chatbot-toggle:hover:not(.dragging) {
    transform: scale(1.1) rotateY(15deg);
    box-shadow: 0 12px 35px rgba(215, 55, 55, 0.5);
    animation: robotMove 1s ease-in-out infinite;
}

.chatbot-toggle:hover .robot-antenna::after {
    box-shadow: 0 0 15px #ffff00;
}

/* نافذة الدردشة - تصميم عصري داكن متوافق مع لوحة التحكم */
.chatbot-window {
    position: fixed;
    bottom: 110px;
    right: 30px;
    width: 380px;
    height: 550px;
    background: rgba(10, 10, 12, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 0, 0, 0.1);
    z-index: 1002;
    display: none;
    flex-direction: column;
    animation: premiumScaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: bottom right;
    color: #f8fafc;
    border: 1px solid rgba(255, 0, 0, 0.2);
    overflow: hidden;
}

@keyframes premiumScaleIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.chatbot-header {
    background: linear-gradient(135deg, #d71a21, #ac1519);
    color: white;
    padding: 1.2rem 1.5rem;
    border-radius: 24px 24px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    box-shadow: 0 4px 12px rgba(215, 26, 33, 0.15);
}

.chatbot-header h4 {
    font-weight: 700;
    font-size: 1.1rem;
    margin: 0;
    font-family: 'Cairo', sans-serif;
}

.chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatbot-close:hover {
    background: rgba(255,255,255,0.2);
    transform: rotate(90deg);
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) #444;
}

/* تحسينات أزرار الخيارات في الشات بوت */
.chatbot-options-group {
    padding: 2px 5px;
    margin-bottom: 10px;
    animation: fadeIn 0.5s ease;
}

.chatbot-opt-btn {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #e2e8f0 !important;
    font-family: 'Cairo', sans-serif;
    padding: 8px 16px !important;
    border-radius: 12px !important;
    cursor: pointer;
    transition: all 0.2s ease !important;
    font-size: 0.88rem !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.chatbot-opt-btn:hover, .chatbot-opt-btn.selected {
    background: rgba(215, 26, 33, 0.1) !important;
    border-color: #ff0000 !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 0, 0, 0.2);
}

.chatbot-select-all-btn {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px dashed rgba(255, 255, 255, 0.2) !important;
    color: #cbd5e1 !important;
    padding: 8px 16px !important;
    border-radius: 10px !important;
    cursor: pointer;
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    transition: 0.3s;
}

.chatbot-confirm-multi-btn {
    background: #ff0000 !important;
    border: none !important;
    color: white !important;
    padding: 10px 20px !important;
    border-radius: 12px !important;
    cursor: pointer;
    font-size: 0.9rem !important;
    font-weight: 800 !important;
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3) !important;
    transition: 0.3s;
}

.chatbot-confirm-multi-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 0, 0, 0.5) !important;
    background: #e60000 !important;
}

.message.bot-message br {
    content: "";
    display: block;
    margin-bottom: 8px;
}

.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: #444;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.message {
    max-width: 85%;
    padding: 12px 18px;
    border-radius: 18px;
    word-wrap: break-word;
    animation: fadeInUp 0.3s ease-out;
    line-height: 1.5;
    font-family: 'Cairo', sans-serif;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.user-message {
    background: linear-gradient(135deg, #ff0000, #cc0000);
    align-self: flex-end;
    margin-left: auto;
    animation: fadeInLeft 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    color: #ffffff;
    border-bottom-left-radius: 4px;
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);
}

.bot-message {
    background: rgba(255, 255, 255, 0.05);
    align-self: flex-start;
    animation: fadeInRight 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    color: #f8fafc;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.bot-message .button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.bot-message .button-group button {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-color-dark));
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 600;
    position: relative;
    overflow: hidden;
    font-family: 'Cairo', sans-serif;
}

.bot-message .button-group button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.3s;
}

.bot-message .button-group button:hover::before {
    left: 100%;
}

.bot-message .button-group button:hover {
    background: linear-gradient(135deg, var(--primary-color-dark), #9a1616);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(215, 55, 55, 0.3);
}

.chatbot-input {
    display: flex;
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: #0f172a;
    border-radius: 0 0 24px 24px;
}

.chatbot-input input {
    flex: 1;
    padding: 12px 18px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    margin-left: 10px;
    background: rgba(255, 255, 255, 0.03);
    color: #ffffff;
    font-family: 'Cairo', sans-serif;
    transition: all 0.3s ease;
    text-align: right;
    direction: rtl;
}

.chatbot-input input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(215, 55, 55, 0.3);
}

.chatbot-input button {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-color-dark));
    color: white;
    border: none;
    padding: 12px 18px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.chatbot-input button:hover {
    background: linear-gradient(135deg, var(--primary-color-dark), #9a1616);
    transform: scale(1.05);
}

/* مؤشر الكتابة */
.typing-indicator {
    background: rgba(255, 255, 255, 0.05);
    width: fit-content;
    padding: 10px 18px;
    border-radius: 18px;
    margin: 10px 15px;
    display: flex;
    align-items: center;
    gap: 6px;
    border-bottom-left-radius: 2px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.typing-indicator span {
    display: block;
    width: 8px;
    height: 8px;
    background: #ccc;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out both;
}

.typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.typing-indicator span:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* تحسين زر الإرسال عند التعطيل */
.chatbot-input button:disabled {
    background: #555;
    cursor: not-allowed;
    opacity: 0.7;
}

/* تحسينات للجوال */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    body {
        padding-top: 0; /* إزالة المساحة العلوية على الموبايل */
        padding-bottom: 70px; /* تعديل المساحة السفلية لتناسب ارتفاع شريط التنقل */
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .chatbot-window {
        width: 100%;
        max-width: 360px;
        left: auto;
        right: 15px;
        height: 60vh; /* Reduced height to fix the "too big" issue */
        bottom: 85px;
        border-radius: 20px;
    }

    .chatbot-toggle {
        bottom: 20px;
        right: 20px;
    }

    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .footer-section h3::after {
        right: 50%;
        transform: translateX(50%);
    }

    .social-links {
        justify-content: center;
    }

    .footer-section.contact-info p a {
        justify-content: center;
    }

    .blog-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .keywords-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1.5rem;
    }

    /* --- Navbar Mobile Styles --- */
    .hamburger {
        display: block;
    }

    .header {
        background: #333333; /* خلفية معتمة دائماً على الموبايل للوضوح */
    }

    .nav-menu a {
        display: block;
        padding: 1rem 2rem;
        text-align: center;
        font-weight: 600;
        color: var(--text-color-bright);
        transition: background-color 0.3s ease, color 0.3s ease;
    }

    .nav-menu a:hover,
    .nav-menu a.active {
        background-color: var(--primary-color);
        color: white;
    }

    .nav-menu {
        display: none; /* إخفاء القائمة بشكل افتراضي */
        position: absolute;
        top: 70px; /* أسفل الهيدر مباشرة */
        left: 0;
        width: 100%;
        flex-direction: column;
        background: rgba(30, 30, 30, 0.9);
        backdrop-filter: blur(15px);
        padding: 1rem 0;
        border-bottom-left-radius: 15px;
        border-bottom-right-radius: 15px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.2);
        transform: translateY(-20px);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
    }
    .nav-menu { list-style: none; } /* إلغاء النقاط الافتراضية للقائمة */

    .nav-menu.active {
        display: flex;
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .nav-menu li {
        width: 100%;
    }

}

/* --- Navbar Desktop Styles --- */
@media (min-width: 769px) {
    .header {
        background: rgba(10, 10, 10, 0.65);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: 1px solid rgba(255,255,255,0.07);
        padding: 0.6rem 0;
        box-shadow: 0 4px 30px rgba(0,0,0,0.3);
    }
    .header.scrolled {
        background: rgba(10, 10, 10, 0.9);
        box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    }

    .nav-container {
        padding: 0 2.5rem;
    }

    .logo {
        font-size: 1.5rem;
        font-weight: 800;
        letter-spacing: 0.5px;
        background: linear-gradient(135deg, #fff 40%, var(--primary-color));
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
        gap: 8px;
    }

    .nav-menu {
        display: flex;
        list-style: none;
        align-items: center;
        gap: 4px;
    }

    .nav-menu li {
        position: relative;
    }

    .nav-menu a {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 8px 16px;
        border-radius: 50px;
        font-weight: 600;
        font-size: 0.92rem;
        color: rgba(255,255,255,0.75);
        transition: all 0.25s ease;
        background: transparent;
        text-shadow: none;
        border: 1px solid transparent;
        white-space: nowrap;
        position: relative;
    }

    .nav-menu a::after {
        display: none; /* إزالة الخط السفلي */
    }

    .nav-menu a:hover {
        color: #fff;
        background: rgba(255,255,255,0.08);
        border-color: rgba(255,255,255,0.12);
        box-shadow: none;
        text-shadow: none;
    }

    .nav-menu a.active,
    .nav-menu a:focus {
        color: #fff !important;
        background: linear-gradient(135deg, var(--primary-color), #b91c1c) !important;
        border-color: transparent !important;
        box-shadow: 0 4px 15px rgba(215,55,55,0.35);
        text-shadow: none !important;
    }

    .nav-menu a.active::after { width: 0; }

    /* زر تواصل معنا يختلف باللون */
    .nav-menu li:last-child a {
        background: rgba(215,55,55,0.12);
        border-color: rgba(215,55,55,0.3);
        color: #ff7070;
    }
    .nav-menu li:last-child a:hover {
        background: var(--primary-color);
        border-color: var(--primary-color);
        color: #fff;
        box-shadow: 0 4px 15px rgba(215,55,55,0.35);
    }
}


/* شريط التنقل السفلي للهاتف - تصميم عائم فخم */
.bottom-nav, .mobile-bottom-nav {
    display: none; 
    position: fixed;
    bottom: 15px;
    left: 15px;
    right: 15px;
    height: 70px; 
    background: rgba(10, 10, 15, 0.85); 
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 0, 0, 0.2);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6), 0 0 15px rgba(255, 0, 0, 0.1);
    z-index: 2000;
    justify-content: space-around;
    align-items: center;
    padding: 0 10px;
}

@media (max-width: 768px) {
    .bottom-nav, .mobile-bottom-nav {
        display: flex;
    }
}

.bottom-nav-link, .bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #71717a;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 0.7rem;
    flex-grow: 1;
    height: 100%;
    text-decoration: none !important;
    font-weight: 700;
}

.bottom-nav-link i, .bottom-nav-item i {
    font-size: 1.4rem;
    margin-bottom: 4px;
    transition: all 0.3s ease;
}

.bottom-nav-link:hover, .bottom-nav-item:hover {
    color: #fff;
    transform: translateY(-2px);
}

.bottom-nav-link.active, .bottom-nav-item.active {
    color: #ff0000;
}

.bottom-nav-link.active i, .bottom-nav-item.active i {
    transform: translateY(-5px);
    color: #ff0000;
    text-shadow: 0 0 15px rgba(255, 0, 0, 0.6);
}

.bottom-nav-link.active span, .bottom-nav-item.active span {
    font-weight: 800;
    text-shadow: 0 0 5px rgba(255, 0, 0, 0.3);
}

.chatbot-options button {
    background: var(--primary-color-dark);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.chatbot-options button:hover {
    background: #a01a1a; /* Kept as is, as it's a darker shade */
}

/* Gallery Styles */
.gallery-filters {
    text-align: center;
    margin-bottom: 2rem;
}

.filter-btn {
    background: #333;
    color: #fff;
    border: 2px solid var(--primary-color);
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    margin: 0 10px;
    transition: all 0.3s ease;
    font-weight: 600;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--primary-color);
    color: #fff;
}

@keyframes flipInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes flipOutRight {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(-100%); opacity: 0; }
}

@keyframes strongFlipInLeft {
    from { transform: perspective(1500px) rotateX(180deg) scale(0.7); opacity: 0; }
    to { transform: perspective(1500px) rotateX(0deg) scale(1); opacity: 1; }
}

@keyframes strongFlipOutLeft {
    from { transform: perspective(1500px) rotateX(0deg) scale(1); opacity: 1; }
    to { transform: perspective(1500px) rotateX(-180deg) scale(0.7); opacity: 0; }
}

.carousel-container {
    position: relative;
    background: #1a1a1a; /* Dark grey for the TV frame */
    border-radius: 0; /* Sharp corners for the TV */
    padding: 25px; /* Space between the frame and the screen */
    border: 5px solid #111; /* Thicker border */
    animation: tvGlow 3s infinite alternate;
    max-width: 800px; /* Limit the max width */
    margin: 80px auto 0; /* Add top margin to prevent overlap */
    perspective: 1000px;
}

.carousel-container::after {
    content: '';
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 0;
    box-shadow: 0 0 10px var(--primary-color);
}

.gallery-carousel {
    position: relative;
    overflow: hidden;
    background: #000; /* Black screen background */
    border-radius: 0; /* Sharp corners for the screen */
    box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
    aspect-ratio: 4 / 3; /* TV-like aspect ratio */
}

.gallery-item {
    position: absolute;
    width: 100%;
    height: 100%;
    display: none; /* Hide all items by default */
    align-items: center;
    justify-content: center;
}

.gallery-item.active {
    display: flex; /* Show only the active item */
}

.gallery-item.flip-in-right { animation: flipInRight 0.7s forwards; }
.gallery-item.flip-out-right { animation: flipOutRight 0.7s forwards; }
.gallery-item.strong-flip-in-left { animation: strongFlipInLeft 0.8s forwards; }
.gallery-item.strong-flip-out-left { animation: strongFlipOutLeft 0.8s forwards; }

.carousel-btn {
    position: absolute;
    bottom: -60px; /* زيادة المسافة قليلاً للأسفل */
    transform: translateY(0);
    background: rgba(255, 255, 255, 0.1); /* خلفية زجاجية */
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2); /* حدود زجاجية */
    cursor: pointer;
    z-index: 11;
    border-radius: 15px; /* زوايا دائرية للشكل الزجاجي */
    width: 70px;
    height: 50px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px); /* زيادة التأثير الضبابي */
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1); /* ظل ناعم */
}

/* تم التعليق لإظهار أسهم التنقل على جميع الأجهزة، بما في ذلك التي تدعم اللمس */
/* .touch-device .carousel-btn {
    display: none;
} */

.carousel-btn:hover {
    background: rgba(255, 255, 255, 0.2); /* زيادة وضوح الخلفية عند التحويم */
    border-color: rgba(255, 255, 255, 0.3);
}

.carousel-btn.prev {
    left: 25%; /* إبعاد السهم عن المنتصف قليلاً */
}

.carousel-btn.next {
    right: 25%; /* إبعاد السهم عن المنتصف قليلاً */
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item[data-category="video"]::after {
    content: '\f04b'; /* Font Awesome play icon */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 0 15px rgba(0,0,0,0.5);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item[data-category="video"]:hover::after {
    opacity: 1;
}

.gallery-item iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* TV Arms Styles */
.tv-arm {
    position: absolute;
    top: 45%;
    width: 100px; /* Arm length */
    height: 22px; /* Arm thickness */
    background: linear-gradient(to right, #222, #111);
    border: 2px solid #333;
    z-index: 10;
    transform-origin: left center;
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    box-shadow: inset 0 0 5px rgba(0,0,0,0.5);
}

.tv-arm::before {
    content: '';
    position: absolute;
    top: -9px;
    width: 40px;
    height: 40px;
    background: #1a1a1a;
    border: 3px solid #333;
    border-radius: 50%;
    z-index: -1;
}

.tv-arm.left {
    left: -20px; /* Position closer to the TV */
    border-radius: 15px 10px 10px 15px;
    transform: rotate(30deg);
}

.tv-arm.left::before {
    left: -20px;
}

.tv-arm.right {
    right: -20px; /* Position closer to the TV */
    border-radius: 10px 15px 15px 10px;
    transform-origin: right center;
    transform: rotate(-30deg);
}

.tv-arm.right::before {
    right: -20px;
}

.tv-head {
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 50px;
    background: #111;
    border: 3px solid #333;
    border-radius: 10px 10px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 4px 8px rgba(0,0,0,0.5);
}

.tv-logo {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 800;
    font-family: 'Cairo', sans-serif;
    text-shadow: 0 0 10px var(--primary-color);
    opacity: 0; /* يبدأ مخفياً */
}

.tv-logo.start-animation {
    animation: logo-fade-in-out 3s ease-out forwards;
}

@keyframes logo-fade-in-out {
    0%, 100% { opacity: 0; transform: scale(0.8); }
    20%, 80% { opacity: 1; transform: scale(1); }
}

.tv-eyes {
    position: absolute;
    display: flex;
    gap: 30px;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.tv-eye {
    width: 28px;
    height: 28px;
    background: #000;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
    border: 2px solid #222;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.tv-pupil {
    width: 10px;
    height: 10px;
    background: #ff4d4d;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    /* The transform is now fully controlled by JavaScript for accuracy */
    box-shadow: 0 0 8px #ff4d4d, 0 0 12px #ff0000;
    transition: transform 0.2s ease-out;
}

.tv-eye::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #111;
    transform: translateY(-100%);
    transition: transform 0.2s ease-in-out;
}

.tv-eye.blinking::after {
    animation: eye-blink-animation 0.4s ease-in-out;
}

@keyframes eye-blink-animation {
    0%, 100% { transform: translateY(-100%); }
    50% { transform: translateY(0%); }
}

.tv-beak {
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 18px solid #ff4d4d;
    opacity: 0;
    animation: beak-appear 1.5s ease-in-out forwards 3s;
    filter: drop-shadow(0 0 8px #ff4d4d) drop-shadow(0 0 12px #ff0000);
}

@keyframes beak-appear {
    from { opacity: 0; transform: translateX(-50%) scale(0.5); }
    to { opacity: 1; transform: translateX(-50%) scale(1); }
}

.tv-beak.talking {
    animation: beak-talk 0.5s infinite;
}

@keyframes beak-talk {
    0%, 100% { transform: translateX(-50%) scaleY(1); }
    50% { transform: translateX(-50%) scaleY(0.6); }
}

.tv-hand {
    position: absolute;
    width: 35px;
    height: 35px;
    background: #222;
    border-radius: 50%;
    border: 2px solid #333;
    box-shadow: 0 0 8px rgba(0,0,0,0.6);
}

.tv-arm.left .tv-hand {
    right: -18px;
    top: -7px;
}

.tv-arm.right .tv-hand {
    left: -18px;
    top: -7px;
}

.carousel-container:hover .tv-arm.left {
    animation: wave 1.5s ease-in-out infinite;
}

.carousel-container:hover .tv-arm.right {
    animation: wave 1.5s ease-in-out infinite reverse;
}

@keyframes wave {
    0%, 100% {
        transform: rotate(30deg);
    }
    50% {
        transform: rotate(-15deg) translateY(-5px);
    }
}

/* Preloader Styles */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #1a1a1a;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

#preloader {
    flex-direction: column;
}

.preloader-robot {
    width: 150px;
    height: 150px;
    position: relative;
    animation: preloader-pulse 2s ease-in-out infinite; /* 1. استخدام حركة أبسط وأكثر كفاءة */
}

/* 1. تعريف حركة النبض البسيطة */
@keyframes preloader-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.preloader-robot .robot-antenna {
    position: absolute;
    top: 15px; /* تعديل بسيط للموضع */
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 20px;
    background: #fff;
}

.preloader-robot .robot-antenna::after {
    content: '';
    position: absolute;
    top: -7px; /* تعديل بسيط للموضع */
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    background: #ffff00;
    border-radius: 50%;
    /* 2. إزالة box-shadow لتحسين الأداء */
}

.preloader-robot .robot-head {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-color-dark));
    border-radius: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.preloader-robot .robot-face {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 2px;
}

.preloader-robot .robot-eye {
    width: 20px;
    height: 30px;
    background: #fff;
    border-radius: 50%;
    animation: eyeBlink 3s infinite;
}

.preloader-robot .robot-mouth {
    width: 10px;
    height: 6px;
    background: #fff;
    border-radius: 2px;
}

.preloader-text {
    margin-top: 2rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff;
    font-family: 'Cairo', sans-serif;
    text-align: center;
    line-height: 1.5;
    /* 2. إزالة text-shadow المتحرك واستبداله بتأثير ثابت وأبسط */
    text-shadow: 0 0 15px var(--primary-color);
    animation: preloader-text-fade 2s ease-in-out infinite alternate; /* 1. استخدام حركة opacity بسيطة */
}

@keyframes preloader-text-fade {
    from { opacity: 0.7; }
    to { opacity: 1; }
}
/* --- قسم فريق العمل --- */
.team-section {
    background-color: #1a1a1a; /* خلفية داكنة تتناسب مع التصميم */
    padding: 80px 0;
    overflow: hidden; /* لمنع أي عناصر من الخروج عن نطاق القسم */
    position: relative;
}

.team-section .section-title {
    color: #fff;
    margin-bottom: 40px;
}

.team-subtitle {
    color: var(--primary-color) !important;
    text-align: center;
    font-size: 2rem;
    font-weight: 800;
    margin-top: 4rem;
    margin-bottom: 2.5rem;
    text-transform: uppercase;
    position: relative;
    z-index: 5;
    display: block !important;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.highlight-text {
    color: var(--primary-color);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: block;
    line-height: 1.4;
}

/* --- بداية تعديلات السلايدر الدائري 3D --- */
.carousel-3d-container {
    position: relative;
    width: 280px; /* زيادة عرض الحاوية قليلاً */
    height: 420px; /* زيادة ارتفاع الحاوية لاستيعاب الأزرار والمحتوى */
    margin: 0 auto;
    perspective: 1000px;
}

.carousel-3d {
    width: 100%;
    height: 100%;
    position: absolute;
    transform-style: preserve-3d;
    transition: transform 0.5s ease-in-out;
}

.carousel-3d-item {
    position: absolute;
    width: 280px; /* زيادة عرض البطاقة */
    height: 380px; /* زيادة ارتفاع البطاقة */
    background: var(--medium-dark-bg);
    border-radius: 15px;
    border: 2px solid var(--border-color-dark);
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    transition: transform 0.5s ease, opacity 0.5s ease;
}

.carousel-3d-item figure {
    margin: 0;
    padding: 1.5rem 1rem;
    text-align: center;
}

/* حاوية الصورة الدائرية */
.carousel-3d-item figure > div {
    border-radius: 50%;
    position: relative;
    margin: 0 auto 1rem;
    width: 150px;
    height: 150px;
    background-color: #2a2a2a; /* لون الدائرة الخلفية */
    border: 3px solid var(--primary-color);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* الصورة داخل الحاوية */
.carousel-3d-item figure > div > img {
    position: absolute;
    top: 50%; /* توسيط الصورة عمودياً */
    left: 50%;
    transform: translate(-50%, -50%); /* ضبط التوسيط الدقيق */
    width: 100%; /* جعل عرض الصورة يطابق عرض الدائرة */
    height: 100%; /* جعل ارتفاع الصورة يطابق ارتفاع الدائرة */
    object-fit: contain; /* تغيير القيمة لضمان ظهور الصورة بالكامل دون قص */
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.3)); /* إضافة ظل خفيف للصورة */
}

.carousel-3d-item figure figcaption h2 {
    color: #f0f0f0; /* لون أفتح ليتناسب مع الخلفية الداكنة */
    font-size: 1.2rem;
    font-weight: 700; /* استخدام وزن الخط المتوفر */
    font-family: 'Cairo', sans-serif;
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

.carousel-3d-item figure figcaption p {
    color: #aaa; /* لون أفتح */
    font-size: 0.9rem;
    font-weight: 400;
    font-family: 'Cairo', sans-serif;
}

/* --- تحسينات للشاشات الصغيرة (الهاتف) --- */
@media (max-width: 768px) {
    .carousel-3d-container {
        width: 250px; /* زيادة العرض على الهاتف */
        height: 380px; /* زيادة الارتفاع على الهاتف */
    }
    .carousel-3d-item {
        width: 250px;
        height: 320px;
    }
    .carousel-3d-item figure > div {
        width: 100px;
        height: 100px;
    }
    .carousel-3d-item figure figcaption h2 { font-size: 1rem; }
    .carousel-3d-item figure figcaption p { font-size: 0.8rem; }

}
/* --- نهاية تعديلات السلايدر الدائري 3D --- */

/* --- قسم من نحن الجديد (About Us) --- */
.about-us-section {
    background-color: #1a1a1a;
    padding: 80px 0;
    overflow: hidden;
    position: relative;
}

.about-narrative {
    max-width: 800px;
    margin: 0 auto 4rem auto; /* إضافة هامش سفلي لفصله عن قسم الفريق */
    text-align: center;
    color: var(--text-color-light);
}

.about-narrative h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-weight: 700;
    font-family: 'Cairo', sans-serif;
}

.about-narrative p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1rem;
    color: var(--text-color-light);
    font-family: 'Cairo', sans-serif;
}

/* تعديل اسم قسم الفريق ليتناسب مع الهيكلة الجديدة */
.team-section {
    padding-top: 40px; /* تقليل المسافة العلوية لأنه أصبح جزءاً من قسم أكبر */
}

/* --- أنماط قسم الخدمات الجديد (Diamond Grid) --- */
.clear-fix { clear: both; }

.services {
    background: var(--dark-bg);
    min-height: 100vh;
    padding: 15vh 0;
    overflow: hidden;
}

.services .desc {
    width: 100%; /* جعل الوصف يأخذ العرض الكامل */
    float: none; /* إزالة التعويم */
    text-align: center; /* توسيط النص */
    margin-bottom: 4rem; /* إضافة مسافة سفلية */
}

.services .desc .heading h1 {
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 1.4px;
    margin-bottom: 30px;
    color: var(--text-color-bright);
}

.services .desc .heading h1:after {
    content: '';
    display: block;
    width: 50px; /* Shortened the line */
    height: 3px;
    background: var(--primary-color);
    margin-top: 8px;
    margin-right: auto; /* توسيط الخط */
    margin-left: auto; /* توسيط الخط */
}

.services .desc .text {
    color: var(--text-color-light);
    line-height: 1.8;
}

.services .services-wrapper {
    width: 100%; /* جعل الحاوية تأخذ العرض الكامل */
    float: none; /* إزالة التعويم */
    display: flex; /* استخدام flexbox للتوسيط */
    justify-content: center; /* توسيط الأعمدة أفقياً */
    flex-wrap: wrap; /* السماح بالتفاف الأعمدة */
}

.services .services-wrapper .column {
    float: none; /* إزالة التعويم */
    margin: 0 30px; /* تعديل الهوامش لتكون متساوية */
    transform: rotate(45deg);
    transition: transform 0.3s ease;
}

.services .services-wrapper .column .service {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 120px;
    height: 120px;
    background: var(--medium-dark-bg);
    transition: all 0.2s ease;
    margin-bottom: 7px;
    border: 1px solid var(--border-color-dark);
}

.services .services-wrapper .column .service:hover {
    background: var(--primary-color);
    color: #fff;
}

.services .services-wrapper .column .service:hover .service-icon {
    color: #fff;
}

.services .services-wrapper .column .service .service-desc {
    transform: rotate(-45deg);
    text-align: center;
    text-transform: uppercase;
    font-size: 12px;
    font-weight: bold;
    transition: transform 0.3s ease;
    padding: 5px;
}

.services .services-wrapper .column .service .service-desc .service-icon  {
    font-size: 28px;
    margin-bottom: 8px;
    color: var(--primary-color);
    transition: color 0.2s ease;
}

@media all and (max-width: 967px) {
    .services {
        padding-top: 80px;
    }
    .services .desc {
        width: 100%;
        float: none;
        margin-bottom: 40px;
        text-align: center;
    }
    .services .desc .heading h1:after {
        margin-right: auto;
        margin-left: auto;
    }
    .services .services-wrapper {
        width: 100%;
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
    }
    .services .services-wrapper .column {
        transform: rotate(0deg);
        margin: 0 5px !important;
    }
    .services .services-wrapper .column .service .service-desc {
        transform: rotate(0deg);
    }
}

/* Glitch Effect Styles */
.glitch{
  color:white;
  font-family: 'Varela', sans-serif;
  font-size: clamp(2.5rem, 8vw, 5rem); /* Responsive font size */
  font-weight: bold;
  position:relative;
  margin:0 auto 30px auto; /* Center and add bottom margin */
  width: fit-content; /* Adjust width to content */
}

@keyframes noise-anim {
  0% { clip: rect(33px, 9999px, 94px, 0); }
  10% { clip: rect(1px, 9999px, 66px, 0); }
  20% { clip: rect(42px, 9999px, 52px, 0); }
  30% { clip: rect(99px, 9999px, 33px, 0); }
  40% { clip: rect(25px, 9999px, 73px, 0); }
  50% { clip: rect(7px, 9999px, 81px, 0); }
  60% { clip: rect(88px, 9999px, 4px, 0); }
  70% { clip: rect(45px, 9999px, 91px, 0); }
  80% { clip: rect(10px, 9999px, 69px, 0); }
  90% { clip: rect(58px, 9999px, 43px, 0); }
  100% { clip: rect(2px, 9999px, 85px, 0); }
}

.glitch:after{
  content:attr(data-text);
  position:absolute;
  left:2px;
  text-shadow:-1px 0 var(--primary-color); /* Use site's primary color */
  top:0;
  color:white;
  background:var(--dark-bg); /* Match site background */
  overflow:hidden;
  clip:rect(0,900px,0,0);
  animation:noise-anim 4s infinite linear alternate-reverse; /* إبطاء الأنيميشن الأول */
}

@keyframes noise-anim-2 {
  0% { clip: rect(83px, 9999px, 3px, 0); }
  10% { clip: rect(39px, 9999px, 76px, 0); }
  20% { clip: rect(11px, 9999px, 92px, 0); }
  30% { clip: rect(88px, 9999px, 3px, 0); }
  40% { clip: rect(45px, 9999px, 63px, 0); }
  50% { clip: rect(27px, 9999px, 81px, 0); }
  60% { clip: rect(18px, 9999px, 4px, 0); }
  70% { clip: rect(95px, 9999px, 11px, 0); }
  80% { clip: rect(30px, 9999px, 99px, 0); }
  90% { clip: rect(8px, 9999px, 43px, 0); }
  100% { clip: rect(22px, 9999px, 55px, 0); }
}

.glitch:before{
  content:attr(data-text);
  position:absolute;
  left:-2px;
  text-shadow:1px 0 #00ffff; /* Cyan for the other channel */
  top:0;
  color:white;
  background:var(--dark-bg); /* Match site background */
  overflow:hidden;
  clip:rect(0,900px,0,0);
  animation:noise-anim-2 5s infinite linear alternate-reverse; /* إبطاء الأنيميشن الثاني */
}
/* --- نهاية أنماط قسم الخدمات الجديد --- */

/* =========================================
   SEO & Article Specific Styles (Merged)
   ========================================= */
.seo-keywords {
    padding: 80px 0;
    background: var(--medium-dark-bg);
    position: relative;
}

.keywords-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.keyword-item {
    background: var(--light-dark-bg);
    border: 1px solid var(--border-color-dark);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.keyword-item:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 15px 30px rgba(215, 55, 55, 0.2);
}

.keyword-item::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-color-dark));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.keyword-item:hover::before { opacity: 1; }

.keyword-item h4 {
    color: var(--primary-color);
    font-size: 1.3em;
    margin-bottom: 15px;
    font-weight: bold;
}

.keyword-item p {
    color: #cccccc;
    line-height: 1.6;
    font-size: 1em;
}

/* Article Specifics */
.back-to-blog-btn {
    display: inline-block;
    margin-bottom: 2rem;
    color: var(--primary-color);
    font-weight: 600;
    transition: all 0.3s ease;
}
.back-to-blog-btn i { margin-left: 8px; }
.back-to-blog-btn:hover { color: #fff; transform: translateX(-5px); }

/* =========================================
   Portfolio & Gallery Styles (Merged from PP.html)
   ========================================= */
.portfolio-section {
    padding: 120px 0 80px;
    background-color: var(--dark-bg);
    min-height: 100vh;
}

.filters-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 50px;
}

.work-filter-btn {
    background: transparent;
    border: 1px solid #444;
    color: #aaa;
    padding: 10px 30px;
    border-radius: 50px;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.work-filter-btn:hover, .work-filter-btn.active {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 5px 15px rgba(215, 55, 55, 0.3);
    transform: translateY(-2px);
}

.gallery-item {
    background: #2c2c2c;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    border: 2px solid #444;
    animation: fadeIn 0.5s ease forwards;
    display: block;
    height: 100%;
    padding: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.gallery-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(215, 55, 55, 0.3);
    border-color: var(--primary-color);
    background: #252525;
}

.video-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 160%; /* 9:16 Aspect Ratio */
    background-size: cover;
    background-position: center;
    cursor: pointer;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #333;
}

.video-thumbnail.landscape { padding-top: 56.25%; }

.play-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.gallery-item:hover .play-overlay { background: rgba(0,0,0,0.1); }

.play-icon {
    width: 60px; height: 60px;
    background: rgba(215, 55, 55, 0.9);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 24px;
    box-shadow: 0 0 20px rgba(215, 55, 55, 0.5);
    transition: transform 0.3s;
}

.gallery-item:hover .play-icon { transform: scale(1.1); }

.item-info { padding: 15px 5px 5px; text-align: center; }
.item-info h4 { color: #fff; font-size: 1rem; margin: 0; line-height: 1.4; }

.gallery-item iframe {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    border: none; border-radius: 10px;
}

.portfolio-swiper {
    width: 100%; max-width: 400px;
    margin: 0 auto; padding: 20px 0;
}

.design-thumbnail img {
    width: 100%; height: auto;
    border-radius: 10px; border: 1px solid #333;
    display: block;
}

.website-thumbnail {
    position: relative; width: 100%; padding-top: 65%;
    background-color: #252525; border-radius: 10px;
    border: 1px solid #333; cursor: pointer; overflow: hidden;
}

.website-preview {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    border: none; pointer-events: none;
    background-color: #fff;
}

/* Background Effect Styles */
#background-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    pointer-events: none;
}

.glassy-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(32px);
    pointer-events: none;
    z-index: -1;
}

/* Background Effect Styles */
#background-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    pointer-events: none;
}

.glassy-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(32px);
    pointer-events: none;
    z-index: -1;
}

/* =========================================
   Unified Responsive Overhaul (Final Cleanup)
   ========================================= */

/* 1. Global Container Fix */
.container {
    width: 100%;
    padding-right: 20px;
    padding-left: 20px;
    margin-right: auto;
    margin-left: auto;
}

/* 2. Header & Logo (Mobile) */
@media (max-width: 768px) {
    .header .logo span { font-size: 1.1rem; }
    .logo-img { width: 30px; height: 30px; }
    .lang-switcher { padding: 4px 8px; font-size: 0.7rem; }
}

/* 3. About Us Section (Broken Flex) */
@media (max-width: 992px) {
    .about-premium-layout, .about-content {
        flex-direction: column !important;
        display: flex !important;
        text-align: center !important;
        gap: 30px !important;
    }
    .about-glass-card, .about-text {
        padding: 30px 15px !important;
        width: 100% !important;
    }
    .about-image-container, .premium-image {
        width: 100% !important;
        max-width: 450px !important;
        margin: 0 auto !important;
    }
    .about-stats {
        justify-content: center !important;
        flex-wrap: wrap;
    }
}

/* 4. Portfolio Swiper (Mobile Bloat) */
@media (max-width: 480px) {
    .home-pf-container {
        max-width: 95% !important;
    }
    .home-pf-swiper .design-thumbnail {
        height: 250px !important;
    }
    /* Increase specificity to override arrows styling on mobile */
    .home-pf-swiper .swiper-button-next,
    .home-pf-swiper .swiper-button-prev {
        display: none !important;
    }
}

/* 5. Team & Founders (Background Icons) */
@media (max-width: 768px) {
    .team-carousel-section { padding: 40px 0; }
    /* Hide overwhelming background elements on mobile */
    .team-carousel-section::before, 
    .team-carousel-section::after { 
        display: none !important; 
    }
}

/* 6. Messenger Icon Overlap Fix */
@media (max-width: 768px) {
    /* Target the chatbot toggle and messenger bubble */
    .chatbot-toggle, .messenger-bubble {
        bottom: 80px !important; /* Move above the mobile bottom nav */
        z-index: 9999 !important;
    }
}

/* 7. Footer Padding for Bottom Nav */
@media (max-width: 768px) {
    .footer {
        padding-bottom: 90px !important;
    }
}

/* 8. Services Swiper Consistency */
.swiper-card-premium {
    min-height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 30px 20px;
}
/* 9. Premium H3 Typography Fixes */
h3.section-title {
    margin-bottom: 1.5rem;
}

.about-glass-card h3.highlight-text {
    font-size: 1.6rem;
    margin-top: -10px;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.swiper-card-premium h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: #fff;
    line-height: 1.4;
}

@media (max-width: 768px) {
    .team-subtitle {
        font-size: 1.5rem !important;
        margin-top: 2.5rem !important;
    }
    .highlight-text {
        font-size: 1.2rem;
    }
}
