/* إضافة خلفية الشال الفلسطيني للجسم الرئيسي */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        /* نمط الكوفية الأبيض والأسود */
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 8px,
            rgba(255, 255, 255, 0.025) 8px,
            rgba(255, 255, 255, 0.025) 16px
        ),
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 8px,
            rgba(0, 0, 0, 0.03) 8px,
            rgba(0, 0, 0, 0.03) 16px
        ),
        /* خطوط متقاطعة تقليدية */
        linear-gradient(0deg, transparent 97%, rgba(255, 255, 255, 0.02) 100%),
        linear-gradient(90deg, transparent 97%, rgba(0, 0, 0, 0.02) 100%);
    background-size: 24px 24px, 24px 24px, 100% 20px, 20px 100%;
    opacity: 0.4;
    z-index: -2;
    animation: subtle-movement 30s ease-in-out infinite;
}

@keyframes subtle-movement {
    0%, 100% { 
        transform: translateX(0) translateY(0) scale(1);
        opacity: 0.4;
    }
    50% { 
        transform: translateX(5px) translateY(-3px) scale(1.01);
        opacity: 0.35;
    }
}

/* Root Variables */
:root {
    --palestine-red: #CE1126;
    --palestine-green: #007A3D;
    --palestine-black: #000000;
    --palestine-white: #FFFFFF;
    --tunisia-red: #E70013;
    --gold: #FFD700;
    --gradient-primary: linear-gradient(135deg, var(--palestine-red), var(--tunisia-red));
    --gradient-secondary: linear-gradient(135deg, var(--palestine-green), var(--gold));
}

/* Hero Section with Enhanced Palestinian Keffiyeh */
.hero-section {
    position: relative;
    background: linear-gradient(
        135deg,
        rgba(206, 17, 38, 0.95) 0%,
        rgba(231, 0, 19, 0.9) 50%,
        rgba(0, 122, 61, 0.85) 100%
    );
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        /* نمط الكوفية المحسن */
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 12px,
            rgba(255, 255, 255, 0.08) 12px,
            rgba(255, 255, 255, 0.08) 24px
        ),
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 12px,
            rgba(0, 0, 0, 0.1) 12px,
            rgba(0, 0, 0, 0.1) 24px
        ),
        /* شبكة تقليدية */
        repeating-conic-gradient(
            from 0deg at 50% 50%,
            transparent 0deg,
            rgba(255, 255, 255, 0.03) 45deg,
            transparent 90deg,
            rgba(0, 0, 0, 0.04) 135deg,
            transparent 180deg
        );
    background-size: 36px 36px, 36px 36px, 72px 72px;
    z-index: 1;
    animation: hero-keffiyeh 20s linear infinite;
}

@keyframes hero-keffiyeh {
    0% { transform: translateX(0) translateY(0); }
    25% { transform: translateX(-18px) translateY(9px); }
    50% { transform: translateX(-36px) translateY(0); }
    75% { transform: translateX(-18px) translateY(-9px); }
    100% { transform: translateX(0) translateY(0); }
}

.hero-section > * {
    position: relative;
    z-index: 2;
}
/* Section Background Enhancements */
.section-enhanced {
    position: relative;
    background: rgba(249, 250, 251, 0.98);
}

.section-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 25% 75%, rgba(206, 17, 38, 0.02) 0%, transparent 50%),
        radial-gradient(circle at 75% 25%, rgba(0, 122, 61, 0.02) 0%, transparent 50%),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 199px,
            rgba(255, 255, 255, 0.5) 200px
        );
    z-index: 0;
}

.section-enhanced > * {
    position: relative;
    z-index: 1;
}

/* Cards with Keffiyeh Touch */
.card-keffiyeh {
    position: relative;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.05);
}

.card-keffiyeh::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 6px,
            rgba(206, 17, 38, 0.02) 6px,
            rgba(206, 17, 38, 0.02) 8px
        ),
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 6px,
            rgba(0, 122, 61, 0.02) 6px,
            rgba(0, 122, 61, 0.02) 8px
        );
    border-radius: inherit;
    z-index: -1;
}
    width: 100%;
    height: 100%;
    background: 
        /* النمط المتقاطع للكوفية */
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 10px,
            rgba(255, 255, 255, 0.03) 10px,
            rgba(255, 255, 255, 0.03) 20px
        ),
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 10px,
            rgba(0, 0, 0, 0.05) 10px,
            rgba(0, 0, 0, 0.05) 20px
        ),
        /* نمط الشبكة التقليدي */
        repeating-conic-gradient(
            from 0deg at 50% 50%,
            transparent 0deg,
            rgba(255, 255, 255, 0.02) 90deg,
            transparent 180deg,
            rgba(0, 0, 0, 0.03) 270deg
        );
    animation: keffiyeh-flow 25s linear infinite;
}

@keyframes keffiyeh-flow {
    0% { 
        transform: translateX(0) translateY(0) rotate(0deg);
        filter: brightness(1);
    }
    25% { 
        transform: translateX(-10px) translateY(5px) rotate(1deg);
        filter: brightness(1.1);
    }
    50% { 
        transform: translateX(0) translateY(-5px) rotate(0deg);
        filter: brightness(0.95);
    }
    75% { 
        transform: translateX(10px) translateY(3px) rotate(-1deg);
        filter: brightness(1.05);
    }
    100% { 
        transform: translateX(0) translateY(0) rotate(0deg);
        filter: brightness(1);
    }
}

/* الرموز الطائرة */
.floating-symbols {
    position: relative;
    width: 100%;
    height: 100%;
}

.symbol {
    position: absolute;
    font-size: 2rem;
    opacity: 0.6;
    animation: float-symbol 20s infinite ease-in-out;
    pointer-events: none;
}

.olive-branch {
    top: 10%;
    left: 15%;
    animation-delay: 0s;
    animation-duration: 18s;
}

.palestine-key {
    top: 25%;
    right: 20%;
    animation-delay: 3s;
    animation-duration: 22s;
}

.olive-tree {
    top: 45%;
    left: 25%;
    animation-delay: 6s;
    animation-duration: 25s;
}

.peace-dove {
    top: 65%;
    right: 15%;
    animation-delay: 9s;
    animation-duration: 20s;
}

.freedom-flag {
    top: 80%;
    left: 35%;
    animation-delay: 12s;
    animation-duration: 24s;
}

.tunisia-flag {
    top: 35%;
    right: 35%;
    animation-delay: 15s;
    animation-duration: 19s;
}

@keyframes float-symbol {
    0%, 100% { 
        transform: translateY(0px) translateX(0px) rotate(0deg) scale(1);
        opacity: 0.3;
    }
    25% { 
        transform: translateY(-30px) translateX(15px) rotate(5deg) scale(1.1);
        opacity: 0.6;
    }
    50% { 
        transform: translateY(-50px) translateX(-10px) rotate(-3deg) scale(0.9);
        opacity: 0.8;
    }
    75% { 
        transform: translateY(-20px) translateX(20px) rotate(2deg) scale(1.05);
        opacity: 0.4;
    }
}

/* تحسينات على العناصر الموجودة */
.palestine-gradient {
    background: linear-gradient(135deg, 
        var(--palestine-red) 0%, 
        var(--palestine-black) 25%, 
        var(--palestine-white) 50%, 
        var(--palestine-green) 100%
    );
}

.keffiyeh-border {
    border: 3px solid transparent;
    background: 
        linear-gradient(white, white) padding-box,
        repeating-linear-gradient(
            45deg,
            var(--palestine-black) 0px,
            var(--palestine-black) 2px,
            var(--palestine-white) 2px,
            var(--palestine-white) 4px
        ) border-box;
    border-radius: 10px;
}

/* Custom Animations */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-20px) rotate(5deg); }
    66% { transform: translateY(-10px) rotate(-3deg); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

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

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

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

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(255, 215, 0, 0.6);
    }
}

/* Utility Classes */
.animate-fade-in-up {
    animation: fadeInUp 1s ease-out;
}

.animate-fade-in-right {
    animation: fadeInRight 1s ease-out 0.5s both;
}

.animate-fade-in-left {
    animation: fadeInLeft 1s ease-out 0.7s both;
}

.animate-shimmer {
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

/* Navigation Styles */
.nav-link {
    position: relative;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--palestine-red), var(--gold));
    transition: all 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
    right: 0;
}

/* Button Styles */
.cta-button {
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(206, 17, 38, 0.3);
    transition: all 0.3s ease;
}

.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 ease;
}

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

.cta-button:hover {
    box-shadow: 0 15px 40px rgba(206, 17, 38, 0.5);
    transform: translateY(-2px) scale(1.05);
}

/* Countdown Styles */
.countdown-item {
    backdrop-filter: blur(20px);
    transition: all 0.3s ease;
}

.countdown-item:hover {
    transform: translateY(-5px);
    animation: pulse-glow 2s infinite;
}

/* Background Patterns */
.bg-pattern-islamic {
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(206, 17, 38, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 122, 61, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(255, 215, 0, 0.1) 0%, transparent 50%);
}

/* Palestinian Flag Inspired Elements */
.flag-stripe-red {
    background: linear-gradient(90deg, var(--palestine-red), rgba(206, 17, 38, 0.8));
}

.flag-stripe-white {
    background: linear-gradient(90deg, var(--palestine-white), rgba(255, 255, 255, 0.9));
}

.flag-stripe-green {
    background: linear-gradient(90deg, var(--palestine-green), rgba(0, 122, 61, 0.8));
}

.flag-triangle {
    background: linear-gradient(135deg, var(--palestine-red), rgba(206, 17, 38, 0.9));
    clip-path: polygon(0 0, 100% 50%, 0 100%);
}

/* Arabic Typography Enhancements */
.font-amiri {
    line-height: 1.8;
    letter-spacing: 0.02em;
}

.font-cairo {
    letter-spacing: 0.01em;
}

/* Scroll Behavior */
html {
    scroll-behavior: smooth;
}

/* Section Transitions */
section {
    position: relative;
    overflow: hidden;
}

section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* Loading States */
.loading {
    opacity: 0.7;
    pointer-events: none;
    filter: blur(1px);
    transition: all 0.3s ease;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .countdown-item {
        min-width: 60px;
        padding: 0.75rem;
    }
    
    .countdown-item .text-3xl {
        font-size: 1.5rem;
    }
    
    .nav-link {
        padding: 0.75rem 0;
        width: 100%;
        text-align: right;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .bg-gradient-to-br {
        background: var(--palestine-black) !important;
    }
    
    .text-gray-300 {
        color: var(--palestine-white) !important;
    }
}

/* Print Styles */
@media print {
    .fixed,
    .animate-float,
    .animate-bounce {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--palestine-black);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--palestine-red), var(--palestine-green));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--gold), var(--tunisia-red));
}

/* Focus States for Accessibility */
.cta-button:focus,
.nav-link:focus {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

/* Text Selection */
::selection {
    background: var(--palestine-red);
    color: var(--palestine-white);
}

::-moz-selection {
    background: var(--palestine-red);
    color: var(--palestine-white);
}

/* Interactive Elements Hover Effects */
.interactive-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.interactive-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Gradient Text Animation */
.gradient-text-animated {
    background: linear-gradient(-45deg, var(--palestine-red), var(--tunisia-red), var(--gold), var(--palestine-green));
    background-size: 400% 400%;
    animation: gradient-shift 4s ease infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Card Hover Effects */
.card-hover {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.card-hover::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 215, 0, 0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.card-hover:hover::after {
    transform: translateX(100%);
}

.card-hover:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

/* Language Selector Styles */
.language-selector {
    z-index: 1000;
}

.language-selector button {
    backdrop-filter: blur(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.language-selector button:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.3);
}

#language-dropdown {
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-height: 300px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--gold) transparent;
}

#language-dropdown::-webkit-scrollbar {
    width: 4px;
}

#language-dropdown::-webkit-scrollbar-track {
    background: transparent;
}

#language-dropdown::-webkit-scrollbar-thumb {
    background: var(--gold);
    border-radius: 2px;
}

.language-option {
    transition: all 0.2s ease;
    position: relative;
}

.language-option::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: var(--gold);
    transform: scaleY(0);
    transition: transform 0.2s ease;
}

.language-option:hover::before {
    transform: scaleY(1);
}

.language-option:hover {
    background: rgba(255, 215, 0, 0.1) !important;
    padding-left: 1.5rem;
}

/* RTL Language Support */
[dir="rtl"] .language-selector {
    left: auto;
    right: 1rem;
}

[dir="rtl"] #language-dropdown {
    left: auto;
    right: 0;
}

[dir="rtl"] .language-option::before {
    left: auto;
    right: 0;
}

[dir="rtl"] .language-option:hover {
    padding-right: 1.5rem;
    padding-left: 1rem;
}

/* Language Transition Effects */
.language-transition {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.language-changing {
    opacity: 0.7;
    transform: scale(0.98);
}

/* Special Oscar Palestine Styles */
.oscar-palestine-gradient {
    background: linear-gradient(135deg, 
        var(--gold) 0%, 
        var(--palestine-red) 25%, 
        var(--tunisia-red) 50%, 
        var(--palestine-green) 75%, 
        var(--gold) 100%);
    background-size: 200% 200%;
    animation: oscar-shimmer 3s ease-in-out infinite;
}

@keyframes oscar-shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.truth-shield {
    position: relative;
}

.truth-shield::before {
    content: '🛡️';
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 1.5rem;
    filter: drop-shadow(0 0 10px var(--gold));
    animation: shield-pulse 2s infinite;
}

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

/* Workshop and Event Highlighting */
.workshop-card {
    background: linear-gradient(135deg, 
        rgba(206, 17, 38, 0.1) 0%,
        rgba(255, 215, 0, 0.1) 50%,
        rgba(0, 122, 61, 0.1) 100%);
    border-left: 4px solid var(--gold);
    transition: all 0.3s ease;
}

.workshop-card:hover {
    border-left-width: 8px;
    transform: translateX(5px);
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.3);
}

/* Flag Animation for Timeline */
.timeline-flag {
    background: linear-gradient(135deg,
        var(--palestine-black) 33.33%,
        var(--palestine-white) 33.33%,
        var(--palestine-white) 66.66%,
        var(--palestine-green) 66.66%);
    position: relative;
}

.timeline-flag::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 0;
    border-top: 50px solid var(--palestine-red);
    border-right: 50px solid transparent;
    border-bottom: 50px solid var(--palestine-red);
}

/* Responsive Language Selector */
@media (max-width: 768px) {
    .language-selector {
        position: fixed;
        top: 80px;
        left: 1rem;
        right: 1rem;
        z-index: 1001;
    }
    
    #language-dropdown {
        position: static;
        margin-top: 0.5rem;
        width: 100%;
        max-height: 200px;
    }
    
    .language-option {
        padding: 1rem;
        font-size: 1.1rem;
    }
}

/* Enhanced Accessibility for Languages */
@media (prefers-reduced-motion: reduce) {
    .language-selector * {
        animation: none !important;
        transition: none !important;
    }
    
    .oscar-palestine-gradient {
        animation: none;
        background: var(--gold);
    }
}