/* إعدادات عامة */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', sans-serif; /* خط عربي جميل */
}

/* شعار الموقع (صورة) */
.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 70px; /* الارتفاع الأساسي لعدم تكبير الشريط */
    width: auto;
    transform: scale(1.3); /* تكبير اللوغو بنسبة 30% بدون التأثير على ارتفاع الشريط */
    transform-origin: center left; /* نقطة ارتكاز التكبير لكي لا يخرج عن الحواف */
    transition: 0.3s;
}

.logo img:hover {
    transform: scale(1.4); /* تكبير إضافي عند التمرير */
    filter: drop-shadow(0 0 15px #ffd166);
}

/* ميزات الموقع (الصفحة الرئيسية) */
.features {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    max-width: 1200px;
    margin: 50px auto;
    padding: 0 20px;
}

.feature-box {
    background: rgba(42, 26, 15, 0.85);
    border: 1px solid #d4a373;
    border-radius: 15px;
    padding: 30px;
    width: 300px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transition: 0.3s;
    position: relative;
    overflow: hidden;
}

/* الأيقونات النابضة الاحترافية */
.feature-icon {
    font-size: 50px;
    margin-bottom: 15px;
    display: inline-block;
    animation: pulseIcon 2s infinite;
    text-shadow: 0 0 20px rgba(255, 209, 102, 0.8);
}

@keyframes pulseIcon {
    0% { transform: scale(1); }
    50% { transform: scale(1.15) translateY(-5px); text-shadow: 0 0 30px #ff9f1c; }
    100% { transform: scale(1); }
}

.feature-box:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 25px rgba(255, 209, 102, 0.2);
    border-color: #ffd166;
}

.feature-box h3 {
    color: #ffd166;
    margin-bottom: 15px;
    font-size: 24px;
}

.feature-box p {
    font-size: 16px;
    line-height: 1.6;
    color: #eee;
}

/* قسم مناطق التصدير (الأعلام المتوهجة) */
.export-regions {
    max-width: 1200px;
    margin: 80px auto;
    text-align: center;
    padding: 0 20px;
}

.export-regions h2 {
    color: #fff;
    font-size: 42px; /* تكبير العنوان */
    font-weight: 800;
    margin-bottom: 50px;
    padding: 15px 40px;
    display: inline-block;
    background: linear-gradient(135deg, rgba(255, 159, 28, 0.8), rgba(212, 163, 115, 0.8));
    border-radius: 50px; /* حواف دائرية أنيقة */
    box-shadow: 0 10px 30px rgba(255, 159, 28, 0.4);
    border: 2px solid #ffd166;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.5);
    position: relative;
    z-index: 1;
}

.export-regions h2::before {
    content: '';
    position: absolute;
    top: -5px; left: -5px; right: -5px; bottom: -5px;
    border-radius: 55px;
    background: linear-gradient(135deg, #ffd166, #ff9f1c);
    z-index: -1;
    opacity: 0.3;
    animation: glowBorder 3s infinite alternate;
}

@keyframes glowBorder {
    0% { opacity: 0.3; transform: scale(1); }
    100% { opacity: 0.7; transform: scale(1.05); }
}

.flags-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
}

.flag-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    transition: 0.3s;
}

.flag-item img {
    width: 80px;
    height: 53px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(255, 209, 102, 0.3);
    transition: 0.4s;
}

.flag-item span {
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    text-shadow: 1px 1px 3px #000;
    transition: 0.3s;
}

.flag-item:hover img {
    transform: translateY(-10px) scale(1.1);
    box-shadow: 0 0 25px rgba(255, 209, 102, 0.8), 0 0 40px rgba(255, 159, 28, 0.6);
    border: 2px solid #ffd166;
}

.flag-item:hover span {
    color: #ffd166;
    text-shadow: 0 0 10px #ffd166;
}

/* الفوتر وتذييل الصفحة */
footer {
    background: rgba(26, 15, 10, 0.95);
    border-top: 3px solid #d4a373;
    padding: 40px 20px;
    text-align: center;
    margin-top: 50px;
    width: 100%;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
}

.footer-content h3 {
    color: #ffd166;
    margin-bottom: 20px;
    font-size: 26px;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.contact-links a {
    color: #fff;
    text-decoration: none;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 20px;
    border-radius: 30px;
    transition: 0.3s;
}

.contact-links a:hover {
    background: rgba(255, 209, 102, 0.2);
    color: #ffd166;
    transform: translateY(-3px);
}

.whatsapp-btn {
    border: 1px solid #25D366;
}

.email-btn {
    border: 1px solid #ea4335;
}

.whatsapp-btn:hover { background: rgba(37, 211, 102, 0.2) !important; color: #25D366 !important; }
.email-btn:hover { background: rgba(234, 67, 53, 0.2) !important; color: #ea4335 !important; }

body {
    direction: rtl; /* اتجاه من اليمين لليسار */
    color: #fff;
    overflow-x: hidden;
    background: #2a1a0f; /* لون صحراوي داكن كأساس */
    position: relative;
}

/* --- خلفية الرمال المتحركة المتقدمة بالـ CSS --- */
.sand-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: linear-gradient(135deg, #d4a373 0%, #ccd5ae 100%);
}

/* طبقات الرمال الاحترافية والسلسة */
.sand-layer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200vw; /* العرض ضعف الشاشة لتحريكها بسلاسة */
    height: 100%;
    background-repeat: repeat-x;
    background-size: 100vw 100%;
}

.sand-layer.front {
    background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 1000 100" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="none"><path fill="%23b08968" d="M0,50 C250,100 250,0 500,50 C750,100 750,0 1000,50 L1000,100 L0,100 Z"/></svg>');
    height: 150px;
    animation: moveSand 15s linear infinite;
    z-index: 3;
}

.sand-layer.middle {
    background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 1000 100" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="none"><path fill="%239c6644" d="M0,30 C250,-20 250,80 500,30 C750,-20 750,80 1000,30 L1000,100 L0,100 Z"/></svg>');
    height: 200px;
    animation: moveSand 20s linear infinite reverse;
    z-index: 2;
    opacity: 0.9;
}

.sand-layer.back {
    background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 1000 100" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="none"><path fill="%237f4f24" d="M0,60 C250,10 250,110 500,60 C750,10 750,110 1000,60 L1000,100 L0,100 Z"/></svg>');
    height: 250px;
    animation: moveSand 30s linear infinite;
    z-index: 1;
    opacity: 0.7;
}

@keyframes moveSand {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); } /* التحريك بنسبة 50% يعني 100vw بالضبط */
}

/* شريط التنقل (Navbar) */
header {
    background: rgba(42, 26, 15, 0.85);
    padding: 10px 40px; /* تصغير ارتفاع الشريط وتقليل المساحات الفارغة */
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.logo {
    font-size: 28px;
    font-weight: bold;
    color: #ffd166;
    text-shadow: 0 0 10px #ffd166;
    text-decoration: none;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 18px;
    transition: 0.3s;
    padding: 10px;
}

nav ul li a:hover {
    color: #ffd166;
    text-shadow: 0 0 15px #ffd166;
}

/* --- السلايدر المتوهج (Glowing Slider) --- */
.slider-container {
    margin-top: 180px; /* زيادة المسافة العلوية لتفادي تداخل اللوغو الكبير والقائمة */
    position: relative;
    width: 90%;
    max-width: 1000px;
    height: 500px;
    margin-left: auto;
    margin-right: auto;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(255, 209, 102, 0.7), 0 0 60px rgba(255, 209, 102, 0.4);
    border: 3px solid #ffd166;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide.active {
    opacity: 1;
}

/* تراكب غامق للصور لتوضيح النص */
.slide::after {
    content: '';
    position: absolute;
    top:0; left:0; right:0; bottom:0;
    background: rgba(0,0,0,0.5);
    z-index: 1;
}

.slide-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.slide-content h2 {
    font-size: 45px;
    color: #fff;
    text-shadow: 0 0 20px #ffd166, 0 0 40px #ff9f1c;
    margin-bottom: 20px;
}

.slide-content p {
    font-size: 22px;
    text-shadow: 1px 1px 5px #000;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 209, 102, 0.3);
    color: #fff;
    border: none;
    padding: 15px 20px;
    cursor: pointer;
    font-size: 24px;
    z-index: 10;
    transition: 0.3s;
    border-radius: 50%;
}

.slider-btn:hover {
    background: #ffd166;
    color: #2a1a0f;
    box-shadow: 0 0 20px #ffd166;
}

.prev { left: 20px; }
.next { right: 20px; }

/* المحتوى العام (النماذج والجداول) */
.container {
    max-width: 800px;
    margin: 50px auto;
    background: rgba(42, 26, 15, 0.85);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
    border: 1px solid #ffd166;
}

.container h1 {
    text-align: center;
    color: #ffd166;
    margin-bottom: 20px;
    text-shadow: 0 0 10px #ffd166;
}

/* النماذج (Forms) */
form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

form input, form select, form textarea {
    padding: 12px;
    border: 1px solid #d4a373;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 16px;
    transition: 0.3s;
}

form input:focus, form select:focus, form textarea:focus {
    outline: none;
    border-color: #ffd166;
    box-shadow: 0 0 10px #ffd166;
    background: rgba(255, 255, 255, 0.2);
}

/* حل مشكلة عدم ظهور النص داخل الخيارات (options) */
form select option {
    background-color: #2a1a0f; /* لون خلفية غامق يناسب الموقع */
    color: #fff; /* نص أبيض ليكون واضحاً */
}

form button {
    padding: 12px;
    background: linear-gradient(45deg, #d4a373, #ff9f1c);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
    transition: 0.3s;
    font-weight: bold;
}

form button:hover {
    box-shadow: 0 0 20px #ff9f1c;
    transform: translateY(-2px);
}

/* رسائل النجاح والخطأ */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    text-align: center;
}
.alert.success { background: rgba(46, 204, 113, 0.3); border: 1px solid #2ecc71; color: #2ecc71; }
.alert.error { background: rgba(231, 76, 60, 0.3); border: 1px solid #e74c3c; color: #e74c3c; }

/* لوحة التحكم (Admin Tables) */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

table th, table td {
    padding: 12px;
    text-align: right;
    border-bottom: 1px solid #d4a373;
}

table th {
    background: rgba(212, 163, 115, 0.3);
    color: #ffd166;
}

table tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* التجاوب مع الهواتف والشاشات الصغيرة */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        padding: 10px;
    }
    
    .logo img {
        height: 50px; /* تصغير إضافي للوغو في الهواتف */
    }

    nav ul {
        margin-top: 10px;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    nav ul li a {
        font-size: 16px;
        padding: 5px;
    }

    .slider-container {
        height: 300px;
        margin-top: 150px; /* تعديل المسافة بعد تصغير الشريط */
    }
    .slide-content h2 { font-size: 28px; }
    .slide-content p { font-size: 15px; padding: 0 10px; }
    
    .container { width: 95%; padding: 20px; margin-top: 130px; }
    
    .feature-box {
        width: 100%; /* الميزة تأخذ العرض بالكامل في الهاتف */
    }

    .flags-container {
        gap: 15px;
    }

    .flag-item img {
        width: 60px; /* تصغير الأعلام في الهاتف */
        height: 40px;
    }

    .flag-item span {
        font-size: 14px;
    }

    .export-regions h2 {
        font-size: 26px;
    }
}