
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #228322;
    --secondary-color: #DC762B;
    --accent-color: #225383;
    --dark-bg: #0f1923;
    --light-text: #ffffff;
    --gray-text: #a0aec0;
    --card-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
}

body {
    font-family: 'Tajawal', sans-serif;
    background-color: var(--dark-bg); /* #0f1923 */
    
    /* ثم نضيف التدرج كصورة للخلفية */
    background-image: linear-gradient(135deg, #0f1923 0%, #1a3a52 50%, #2c5282 100%);
    
    min-height: 100vh;
    color: var(--light-text);
    overflow-x: hidden;
    position: relative;
}

/* تنسيق رسالة الترحيب للمستخدم */
.user-welcome {
    font-size: 1.1rem;
    font-weight: 500;
    color: white;
    margin-right: 1.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    /* background-color: rgba(76, 175, 80, 0.1); */
    border: 1px solid #ff6b35;
}

/* تنسيق أزرار الدخول/التسجيل */
.auth-buttons {
    display: flex;
    align-items: center;
    gap: 1rem; /* مسافة بين العناصر */
}

/* إذا كنت تحتاج إلى تحسين مظهر الأزرار */
.btn-primary, .btn-outline {
    text-decoration: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}
/* Animated Background */
.animated-bg {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
    overflow: hidden;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.6;
    animation: float 20s infinite ease-in-out;
}

.orb1 {
    width: 400px;
    height: 400px;
    background: linear-gradient(45deg, #ff6b35, #f7931e);
    top: -200px;
    right: -100px;
    animation-delay: 0s;
}

.orb2 {
    width: 300px;
    height: 300px;
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
    bottom: -150px;
    left: -100px;
    animation-delay: 5s;
}

.orb3 {
    width: 350px;
    height: 350px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 10s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(100px, -100px) scale(1.1);
    }

    50% {
        transform: translate(-100px, 100px) scale(0.9);
    }

    75% {
        transform: translate(-50px, -50px) scale(1.05);
    }
}

/* Navigation */
header {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background: rgba(15, 25, 35, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo img {
    width: 120px;       /* الحجم اللي يخلي الصورة كلها تظهر */
    height: auto;       /* يحافظ على النسبة الأصلية */

    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    object-fit: scale-down; /* يضمن ظهور الصورة كاملة */
   border-radius: 15px;
    padding: 15px;
    
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--light-text);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    transition: width 0.3s ease;
}

.nav-link:hover::before {
    width: 100%;
}

.nav-link:hover {
    color: var(--accent-color);
    transform: translateY(-2px);
}

.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(26, 58, 82, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    min-width: 200px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    padding: 1rem 0;
    margin-top: 0.5rem;
    border: 1px solid var(--glass-border);
}

.dropdown:hover .dropdown-content {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-content a {
    display: block;
    color: var(--light-text);
    padding: 0.7rem 1.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.dropdown-content a:hover {
    background: rgba(255, 107, 53, 0.2);
    color: var(--secondary-color);
    padding-right: 2rem;
}

.auth-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.7rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.btn-outline {
    background: transparent;
    color: var(--light-text);
    border: 2px solid var(--secondary-color);
}

.btn-outline:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.3);
}

.btn-primary {
    background: linear-gradient(135deg, var(--secondary-color), #f7931e);
    color: var(--light-text);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 107, 53, 0.4);
}

/* Main Content */
main {
    margin-top: 80px;
    padding: 2rem 5%;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

/* Hero Section */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 0;
}

.hero-content {
    text-align: center;
    animation: fadeInUp 1s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--light-text), white);
    -webkit-background-clip: text;
    
    background-clip: text;
    line-height: 1.2;
}

.hero p {
    font-size: 1.25rem;
    color: var(--gray-text);
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-hero {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

/* Feature Cards */
.section {
    padding: 4rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, white, white);
    -webkit-background-clip: text;
 
    background-clip: text;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--gray-text);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary-color), var(--primary-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.card:hover::before {
    transform: scaleX(1);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

.card-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.card p {
    color: var(--light-text);
    line-height: 1.6;
}

/* Newsletter */
.newsletter {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    padding: 3rem;
    text-align: center;
    border: 1px solid var(--glass-border);
    margin: 4rem 0;
}

.newsletter h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.newsletter-form {
    display: flex;
    gap: 1rem;
    max-width: 500px;
    margin: 2rem auto 0;
    flex-direction: row-reverse;
}

.newsletter input {
    flex: 1;
    padding: 1rem 1.5rem;
    border-radius: 25px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.1);
    color: var(--light-text);
    font-size: 1rem;
    text-align: right;
}

.newsletter input::placeholder {
    color: var(--gray-text);
}
/* Footer */
footer {
    /* تم افتراض وجود متغيرات مثل --glass-border, --gray-text, --secondary-color */
    background: rgba(15, 25, 35, 0.8);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border);
    padding: 3rem 5%;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding-bottom: 2rem; /* إضافة مسافة بين المحتوى وحقوق النشر */
}

.footer-column h4 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-column a {
    display: block;
    color: var(--gray-text);
    text-decoration: none;
    padding: 0.5rem 0;
    transition: all 0.3s ease;
}

.footer-column a:hover {
    color: var(--accent-color);
    padding-right: 10px;
}
.social-links {
    display: flex;
    gap: 10px;
    margin-top: 0.5rem;
}

.social-link {
    font-size: 1.2rem;
    color: var(--gray-text);
    transition: color 0.3s ease;
}

.social-link:hover {
    color: #27ae60; /* لون عند الـ hover */
}

/* التعديل هنا: التأكد من المحاذاة للمنتصف */
.copyright {
    /* هذه الخاصية تضمن محاذاة النص للمنتصف على عرض الـ footer بالكامل */
    text-align: center; 
    color: var(--gray-text);
    margin-top: 1rem; /* تقليل المسافة العلوية بعد إضافة padding في footer-content */
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--light-text);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Responsive Design */
@media (max-width: 768px) {
    nav {
        padding: 1rem 1rem; /* تقليل المسافة الجانبية لتوفير مساحة */
    }
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(15, 25, 35, 0.95);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 2rem;
    }

    .nav-menu.active {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }

    .auth-buttons {
        flex-direction: column;
        width: 100%;
        margin-top: 1rem; /* إضافة مسافة فاصلة عن روابط القائمة */
    }

    .hero h1 {
        font-size: 2rem;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .newsletter-form {
        flex-direction: column;
    }

     .dropdown-content {
        position: relative; /* لتظهر ضمن تدفق الـ nav-menu */
        top: 0;
        right: 0;
        min-width: 100%;
        margin-top: 0;
        padding: 0;
        border: none;
        border-radius: 0;
        background: none; /* إزالة الخلفية لتبدو جزءاً من القائمة */
        box-shadow: none;
        text-align: right;
    }

    .dropdown-content a {
        padding-right: 2rem; /* زيادة المسافة للمحاذاة */
    }
    .nav-link, .btn-primary, .btn-outline {
        width: 100%;
        text-align: center;
    }
     .footer-content {
        /*
        * على الشاشات الصغيرة، نجعل الأعمدة تتحول إلى صفوف 
        * مما يقلل من المساحة الأفقية ويزيد سهولة التمرير.
        */
        grid-template-columns: 1fr; /* عمود واحد فقط يملأ العرض */
        gap: 1rem; /* تقليل المسافة بين العناصر لتقليل الارتفاع */
    }

    .footer-column h4 {
        margin-bottom: 0.5rem; /* تقليل المسافة أسفل العناوين */
        font-size: 1.1rem;
    }
    
    .footer-column a {
        padding: 0.3rem 0; /* تقليل التباعد الرأسي بين الروابط */
    }

    footer {
        padding: 2rem 5%; /* تقليل الـ padding الكلي للتذييل */
    }
}