/* =========================================
   1. المتغيرات وإعدادات الألوان (Variables)
   ========================================= */
:root {
    /* لوحة الألوان الرئيسية */
    --color-primary: #0A2647;       /* أزرق كحلي داكن */
    --color-primary-light: #144272; /* درجة أفتح قليلاً */
    --color-secondary: #FFC800;     /* أصفر ذهبي (لون الشمس) */
    --color-secondary-dark: #E6B400;
    
    /* ألوان النصوص والخلفيات */
    --color-text-dark: #2C3E50;
    --color-text-light: #607D8B;
    --color-white: #ffffff;
    --color-bg-light: #F8F9FA;
    --color-bg-dark: #1a1a1a;

    /* الخطوط */
    --font-main: 'Tajawal', 'Cairo', sans-serif;

    /* تأثيرات الظل والأنيميشن */
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.12);
    --shadow-lg: 0 16px 48px rgba(0,0,0,0.15);
    --gradient-primary: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    --gradient-secondary: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-secondary-dark) 100%);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =========================================
   2. التنسيقات العامة (Global Reset)
   ========================================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-main);
    color: var(--color-text-dark);
    line-height: 1.7;
    background-color: var(--color-white);
    overflow-x: hidden; /* لمنع السكرول العرضي */
    direction: rtl;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-smooth);
}

ul {
    list-style: none;
}

button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    outline: none;
}

/* كلاسات مساعدة */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.section-padding {
    padding: 80px 0;
}

.text-center {
    text-align: center;
}

.text-highlight {
    color: var(--color-secondary);
}

.bg-light {
    background-color: var(--color-bg-light);
}

/* =========================================
   3. شريط إمكانية الوصول (Accessibility Bar)
   ========================================= */
.a11y-bar {
    background-color: var(--color-bg-dark);
    color: var(--color-white);
    padding: 8px 0;
    font-size: 0.9rem;
    position: relative;
    z-index: 1001;
}

.a11y-content {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 15px;
}

.a11y-bar button {
    background: rgba(255,255,255,0.15);
    color: var(--color-white);
    padding: 4px 12px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-smooth);
    font-size: 0.85rem;
}

.a11y-bar button:hover {
    background: var(--color-secondary);
    color: var(--color-primary);
}

/* =========================================
   4. الهيدر والقائمة (Header & Nav)
   ========================================= */
#main-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px); /* تأثير الزجاج */
    padding: 10px 0;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo {
    height: 85px; /* تم التعديل لتكبير اللوجو */
    width: auto;
    display: block;
    transition: transform 0.3s ease;
}

.site-logo:hover {
    transform: scale(1.05);
}

.main-nav ul {
    display: flex;
    align-items: center;
    gap: 30px;
}

.main-nav a {
    font-weight: 700;
    color: var(--color-primary);
    position: relative;
    padding: 5px 0;
    font-size: 1.1rem;
}

/* تأثير الخط تحت الروابط */
.main-nav a:not(.nav-btn)::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 3px;
    background: var(--color-secondary);
    transition: var(--transition-smooth);
}

.main-nav a:not(.nav-btn):hover::after,
.main-nav a.active::after {
    width: 100%;
}

/* زر التبرع في القائمة */
.nav-btn {
    background: var(--gradient-secondary);
    color: var(--color-primary) !important;
    padding: 10px 25px !important;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(255, 200, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 200, 0, 0.4);
}

.mobile-menu-toggle {
    display: none;
    font-size: 1.8rem;
    color: var(--color-primary);
    background: none;
}

/* =========================================
   5. القسم الرئيسي (Hero Section) - تم الإصلاح
   ========================================= */
.hero-section {
    position: relative;
    height: 90vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    color: var(--color-white);
    background: url('https://images.unsplash.com/photo-1532938911079-1b06ac7ceec7?ixlib=rb-4.0.3&auto=format&fit=crop&w=1600&q=80') no-repeat center center/cover;
    margin-top: -85px; /* ليدخل تحت الهيدر */
    padding-top: 85px;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(10, 38, 71, 0.92) 0%, rgba(20, 66, 114, 0.8) 100%);
    z-index: 1;
    pointer-events: none; /* هام: يسمح بمرور الكليك من خلال الطبقة */
}

.hero-content {
    position: relative;
    z-index: 10; /* هام: رفع الطبقة لتكون فوق الموجة والخلفية */
    max-width: 800px;
}

.hero-subtitle {
    display: inline-block;
    color: var(--color-secondary);
    font-weight: 700;
    margin-bottom: 15px;
    background: rgba(255, 200, 0, 0.1);
    padding: 5px 15px;
    border-radius: 30px;
}

.hero-section h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 25px;
}

.hero-description {
    font-size: 1.3rem;
    margin-bottom: 40px;
    opacity: 0.95;
    max-width: 650px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    position: relative;
    z-index: 20; /* تأكيد إضافي لعمل الأزرار */
}

/* شكل الموجة في الأسفل */
.wave-bottom {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    z-index: 5; /* أقل من المحتوى */
    line-height: 0;
    pointer-events: none; /* هام جداً: يمنع الموجة من تغطية الأزرار */
}
.wave-bottom svg {
    width: 100%;
    height: auto;
}

/* =========================================
   6. الأزرار والعناوين (UI Components)
   ========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 700;
    transition: var(--transition-smooth);
    font-size: 1rem;
    cursor: pointer; /* تأكيد شكل الماوس */
}

.btn-lg {
    padding: 15px 40px;
    font-size: 1.1rem;
}

.btn-primary {
    background: var(--gradient-secondary);
    color: var(--color-primary);
    box-shadow: 0 4px 15px rgba(255, 200, 0, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(255, 200, 0, 0.6);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--color-secondary);
    color: var(--color-secondary);
}

.btn-outline:hover {
    background: var(--color-secondary);
    color: var(--color-primary);
}

.section-header {
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem;
    color: var(--color-primary);
    font-weight: 800;
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.section-title::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient-secondary);
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--color-text-light);
    margin-top: 15px;
}

/* =========================================
   7. قسم من نحن والبطاقات (About)
   ========================================= */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.modern-card {
    background: var(--color-white);
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    text-align: center;
    border-bottom: 5px solid transparent;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.modern-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-bottom-color: var(--color-secondary);
}

.featured-card {
    background: var(--color-primary);
    color: var(--color-white);
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

.featured-card:hover {
    transform: scale(1.05) translateY(-10px);
}

.featured-card p {
    color: rgba(255,255,255,0.85);
}

.card-icon-wrapper {
    width: 80px;
    height: 80px;
    background: rgba(255, 200, 0, 0.15);
    color: var(--color-secondary-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 25px;
}

.featured-card .card-icon-wrapper {
    background: rgba(255,255,255,0.1);
    color: var(--color-secondary);
}

.modern-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

/* =========================================
   8. قسم الخدمات (Services)
   ========================================= */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

.service-box {
    background: var(--color-white);
    padding: 35px 25px;
    border-radius: 15px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
    border: 1px solid rgba(0,0,0,0.03);
}

.service-box:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-secondary);
}

.service-icon {
    font-size: 3rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
    display: inline-block;
}

.service-box h4 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--color-primary);
}

/* =========================================
   9. قسم التواصل والخريطة (Contact & Map)
   ========================================= */
.contact-wrapper {
    display: flex;
    flex-wrap: wrap;
    background: var(--color-white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    margin-top: 20px;
}

.contact-info-box {
    flex: 1;
    min-width: 300px;
    padding: 50px;
    background: var(--color-primary);
    color: var(--color-white);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-info-box h3 {
    margin-bottom: 30px;
    color: var(--color-secondary);
    font-size: 1.8rem;
    border-bottom: 2px solid rgba(255,255,255,0.1);
    padding-bottom: 15px;
}

.contact-details li {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 25px;
}

.contact-details .icon {
    font-size: 1.4rem;
    color: var(--color-secondary);
    margin-top: 5px;
}

.contact-details strong {
    display: block;
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.contact-details p, .contact-details a {
    color: rgba(255,255,255,0.9);
    font-size: 1rem;
    transition: color 0.3s;
}

.contact-details a:hover {
    color: var(--color-secondary);
}

.social-links-big {
    margin-top: 30px;
    display: flex;
    gap: 15px;
}

.social-links-big a {
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.1);
    color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.2rem;
    transition: var(--transition-smooth);
}

.social-links-big a:hover {
    background: var(--color-secondary);
    color: var(--color-primary);
    transform: scale(1.1);
}

/* الخريطة */
.map-container {
    flex: 1.5;
    min-width: 300px;
    min-height: 450px;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* =========================================
   10. الأزرار الجانبية العائمة (Sticky Sidebar)
   ========================================= */
.sticky-sidebar {
    position: fixed;
    left: 20px; /* جهة اليسار */
    bottom: 30px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sticky-btn {
    width: 60px;
    height: 60px;
    background-color: #333;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
}

.sticky-btn.facebook { background-color: #1877F2; }
.sticky-btn.whatsapp { background-color: #25D366; }

.sticky-btn:hover {
    transform: scale(1.1) translateX(5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
}

/* =========================================
   11. الفوتر (Footer)
   ========================================= */
footer {
    background: var(--color-primary);
    color: rgba(255,255,255,0.75);
    padding-top: 70px;
    margin-top: 50px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 50px;
    margin-bottom: 50px;
}

.footer-logo {
    height: 80px; /* تم التعديل لتكبير اللوجو */
    margin-bottom: 20px;
    filter: brightness(0) invert(1); /* جعل اللوجو أبيض */
}

footer h4 {
    color: var(--color-white);
    font-size: 1.25rem;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

footer h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 2px;
    background: var(--color-secondary);
}

footer ul li {
    margin-bottom: 12px;
}

footer a:hover {
    color: var(--color-secondary);
    padding-right: 5px;
}

footer i {
    color: var(--color-secondary);
    margin-left: 8px;
    width: 20px;
    text-align: center;
}

.copyright {
    padding: 25px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
    background: rgba(0,0,0,0.1);
}

/* =========================================
   12. الأنيميشن (Animations)
   ========================================= */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.appear,
.fade-in-up.appear {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   13. وضع التباين العالي (Accessibility)
   ========================================= */
body.high-contrast {
    --color-primary: #000000;
    --color-primary-light: #000000;
    --color-secondary: #FFFF00;
    --color-text-dark: #000000;
    --color-text-light: #000000;
    --color-white: #FFFFFF;
    --color-bg-light: #FFFFFF;
    --color-bg-dark: #000000;
    --gradient-primary: linear-gradient(to bottom, #000, #000);
    --gradient-secondary: linear-gradient(to bottom, #FF0, #FF0);
    
    background-color: #FFF !important;
    color: #000 !important;
}

body.high-contrast .hero-section {
    background: #000 !important;
}

body.high-contrast .hero-overlay {
    opacity: 1;
    background: #000;
}

body.high-contrast .hero-subtitle,
body.high-contrast .text-highlight,
body.high-contrast i {
    color: #FFFF00 !important;
    background: #000;
}

body.high-contrast .btn-primary, 
body.high-contrast .nav-btn,
body.high-contrast .sticky-btn {
    background: #FFFF00 !important;
    color: #000 !important;
    border: 3px solid #000;
    box-shadow: none;
}

body.high-contrast .modern-card,
body.high-contrast .service-box,
body.high-contrast .contact-info-box {
    border: 3px solid #000;
    background: #FFF !important;
    color: #000 !important;
    box-shadow: none;
}

body.high-contrast footer {
    background: #000;
    color: #FFF !important;
    border-top: 5px solid #FF0;
}

body.high-contrast a {
    text-decoration: underline;
}

/* =========================================
   14. التجاوب (Media Queries)
   ========================================= */
@media (max-width: 992px) {
    .hero-section h1 {
        font-size: 2.8rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .featured-card {
        transform: scale(1);
    }
}

@media (max-width: 768px) {
    /* الموبايل منيو */
    .mobile-menu-toggle {
        display: block;
    }
    
    .main-nav {
        position: fixed;
        top: 80px;
        right: -100%;
        width: 80%;
        height: calc(100vh - 80px);
        background: var(--color-white);
        padding: 30px;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        transition: var(--transition-smooth);
        overflow-y: auto;
    }
    
    .main-nav.active {
        right: 0;
    }
    
    .main-nav ul {
        flex-direction: column;
        align-items: flex-start;
        gap: 25px;
    }
    
    .main-nav a {
        font-size: 1.2rem;
        display: block;
        width: 100%;
    }
    
    .nav-btn {
        width: 100%;
        justify-content: center;
    }

    /* Hero Section */
    .hero-section {
        height: auto;
        padding: 120px 0 100px;
        text-align: center;
        background-position: 70% center; /* تعديل مكان الصورة */
    }
    
    .hero-section h1 {
        font-size: 2.2rem;
    }
    
    .hero-description {
        margin: 0 auto 30px;
        font-size: 1.1rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    /* Contact Section */
    .contact-wrapper {
        flex-direction: column;
    }
    
    .map-container {
        height: 350px;
        min-height: 350px;
    }
    
    .contact-info-box {
        padding: 30px;
    }

    /* Footer & Grids */
    .cards-grid, .footer-grid, .services-grid {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    /* Sticky Buttons Adjustment */
    .sticky-sidebar {
        left: 15px;
        bottom: 20px;
        gap: 12px;
    }
    
    .sticky-btn {
        width: 50px;
        height: 50px;
        font-size: 1.6rem;
    }
}


