/* صفحة الدول المدعومة - تحسينات إضافية */

/* تحسينات الأعلام والرموز التعبيرية */
.country-flag {
    font-size: 4rem;
    display: inline-block;
    animation: flag-wave 3s ease-in-out infinite;
    transition: all 0.3s ease;
}

.country-flag:hover {
    transform: scale(1.2) rotate(5deg);
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.2));
}

@keyframes flag-wave {
    0%, 100% { 
        transform: rotate(0deg) scale(1); 
    }
    25% { 
        transform: rotate(3deg) scale(1.05); 
    }
    50% { 
        transform: rotate(0deg) scale(1.1); 
    }
    75% { 
        transform: rotate(-3deg) scale(1.05); 
    }
}

/* تأثيرات الخلفيات المتحركة - ألوان الموقع */
.animated-gradient {
    background: linear-gradient(-45deg, #059669, #10B981, #3B82F6, #1D4ED8, #059669);
    background-size: 400% 400%;
    animation: gradient-flow 12s ease infinite;
}

/* ألوان الموقع الأساسية */
:root {
    --primary-50: #ecfdf5;
    --primary-100: #d1fae5;
    --primary-200: #a7f3d0;
    --primary-300: #6ee7b7;
    --primary-400: #34d399;
    --primary-500: #10b981;
    --primary-600: #059669;
    --primary-700: #047857;
    --primary-800: #065f46;
    --primary-900: #064e3b;
    
    --secondary-50: #eff6ff;
    --secondary-100: #dbeafe;
    --secondary-200: #bfdbfe;
    --secondary-300: #93c5fd;
    --secondary-400: #60a5fa;
    --secondary-500: #3b82f6;
    --secondary-600: #2563eb;
    --secondary-700: #1d4ed8;
    --secondary-800: #1e40af;
    --secondary-900: #1e3a8a;
}

@keyframes gradient-flow {
    0% {
        background-position: 0% 50%;
    }
    25% {
        background-position: 100% 50%;
    }
    50% {
        background-position: 100% 100%;
    }
    75% {
        background-position: 50% 100%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* تحسينات البطاقات ثلاثية الأبعاد */
.card-3d {
    transform-style: preserve-3d;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card-3d:hover {
    transform: rotateY(10deg) rotateX(5deg) translateZ(20px);
}

.card-3d::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0));
    border-radius: inherit;
    transform: translateZ(-1px);
}

/* تأثيرات الضوء والظلال */
.glow-effect {
    position: relative;
    overflow: hidden;
}

.glow-effect::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    transform: scale(0);
    transition: transform 0.6s ease;
}

.glow-effect:hover::before {
    transform: scale(1);
}

/* تحسينات الخطوط والنصوص العربية */
.arabic-text {
    font-family: 'Tajawal', 'Arial', sans-serif;
    line-height: 1.8;
    letter-spacing: 0.02em;
}

.arabic-heading {
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* تأثيرات الانتقال المتقدمة */
.slide-in-right {
    animation: slideInRight 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.slide-in-left {
    animation: slideInLeft 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes slideInRight {
    0% {
        transform: translateX(100px);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInLeft {
    0% {
        transform: translateX(-100px);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

/* تحسينات الأزرار */
.btn-modern {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    transform: translateZ(0);
}

.btn-modern::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-modern:hover::before {
    width: 300px;
    height: 300px;
}

.btn-modern:active {
    transform: scale(0.98);
}

/* أنماط محدثة لصفحة الدول المدعومة */

/* تحسين الأزرار بألوان الموقع */
.btn-primary-site {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-500));
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(5, 150, 105, 0.3);
}

.btn-primary-site:hover {
    background: linear-gradient(135deg, var(--primary-700), var(--primary-600));
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(5, 150, 105, 0.4);
}

.btn-secondary-site {
    background: linear-gradient(135deg, var(--secondary-600), var(--secondary-500));
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-secondary-site:hover {
    background: linear-gradient(135deg, var(--secondary-700), var(--secondary-600));
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

/* تحسين بطاقات الدول */
.country-card-enhanced {
    background: white;
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.country-card-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-500), var(--secondary-500));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.country-card-enhanced:hover::before {
    transform: scaleX(1);
}

.country-card-enhanced:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* تحسين الخلفيات التدرجية */
.gradient-bg-primary {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-500));
}

.gradient-bg-secondary {
    background: linear-gradient(135deg, var(--secondary-600), var(--secondary-500));
}

.gradient-bg-combined {
    background: linear-gradient(135deg, var(--primary-600), var(--secondary-600));
}

/* تحسين الأيقونات والرموز */
.icon-primary {
    color: var(--primary-600);
}

.icon-secondary {
    color: var(--secondary-600);
}

.icon-bg-primary {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    color: white;
    width: 3rem;
    height: 3rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

/* تحسين النصوص */
.text-primary-site {
    color: var(--primary-600);
}

.text-secondary-site {
    color: var(--secondary-600);
}

/* تحسين الإحصائيات */
.stats-counter {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-600), var(--secondary-600));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* تحسين أعلام الدول */
.flag-container-enhanced {
    position: relative;
    display: inline-block;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.flag-container-enhanced:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.flag-container-enhanced img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.flag-container-enhanced:hover img {
    transform: scale(1.1);
}

/* تحسين القسم الرئيسي */
.hero-section-enhanced {
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--secondary-600) 50%, var(--primary-700) 100%);
    position: relative;
    overflow: hidden;
}

.hero-section-enhanced::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 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
    pointer-events: none;
}

/* تحسينات خاصة بالجزائر */
.algeria-special {
    background: linear-gradient(135deg, #059669 0%, #dc2626 50%, #059669 100%);
    background-size: 200% 200%;
    animation: algeria-gradient 6s ease infinite;
}

@keyframes algeria-gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* تحسينات الاستجابة للأجهزة المحمولة */
@media (max-width: 768px) {
    .country-card-enhanced {
        margin-bottom: 1.5rem;
    }
    
    .stats-counter {
        font-size: 2.5rem;
    }
    
    .flag-container-enhanced {
        margin: 0.5rem;
    }
}

/* تحسينات الأداء */
.will-change-transform {
    will-change: transform;
}

.will-change-opacity {
    will-change: opacity;
}

/* تحسينات إمكانية الوصول */
@media (prefers-reduced-motion: reduce) {
    .country-flag,
    .animated-gradient,
    .algeria-special {
        animation: none;
    }
    
    .country-card-enhanced,
    .flag-container-enhanced {
        transition: none;
    }
}

/* تحسين المحتوى للشاشات الكبيرة */
@media (min-width: 1200px) {
    .country-card-enhanced {
        padding: 2.5rem;
    }
    
    .stats-counter {
        font-size: 3.5rem;
    }
}

/* تأثيرات التحميل */
.loading-shimmer {
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0) 0%, 
        rgba(255, 255, 255, 0.1) 50%, 
        rgba(255, 255, 255, 0) 100%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* توحيد أحجام أعلام الدول في جميع أنحاء الصفحة */

/* أعلام الهيرو سكشن */
.country-flag-container img {
    width: 64px !important;
    height: 48px !important;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

/* أعلام الهيرو سكشن للموبايل */
@media (max-width: 768px) {
    .country-flag-container img {
        width: 48px !important;
        height: 36px !important;
    }
}

/* أعلام الهيرو سكشن للشاشات الكبيرة */
@media (min-width: 1024px) {
    .country-flag-container img {
        width: 80px !important;
        height: 60px !important;
    }
}

/* أعلام قسم الجزائر الخاص */
.algeria-flag-large {
    width: 96px !important;
    height: 72px !important;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    transition: all 0.3s ease;
}

/* أعلام بطاقات الدول */
.country-card-flag {
    width: 80px !important;
    height: 60px !important;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

/* تحسينات عامة للأعلام */
.flag-image {
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    image-rendering: crisp-edges;
    image-rendering: -webkit-optimize-contrast;
}

.flag-image:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* تحسينات خاصة للأعلام PNG */
.flag-png {
    image-rendering: high-quality;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* حاوي الأعلام مع التأثيرات */
.flag-container {
    position: relative;
    display: inline-block;
    overflow: hidden;
    border-radius: 8px;
}

.flag-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.flag-container:hover::before {
    opacity: 1;
}

/* توحيد أحجام الأعلام في جميع المواضع */

/* الحاوي الأساسي للأعلام */
.flag-container {
    display: inline-block;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

/* الصورة الأساسية للعلم */
.flag-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: all 0.3s ease;
}

/* تحسينات الأداء للصور */
.flag-optimized {
    image-rendering: crisp-edges;
    image-rendering: -webkit-optimize-contrast;
}

/* أحجام مختلفة للأعلام */

/* أعلام الهيرو */
.flag-container:has(.hero-flag) {
    width: 64px;
    height: 48px;
}

.hero-flag {
    width: 64px;
    height: 48px;
}

/* أعلام بطاقات الدول */
.flag-container:has(.country-card-flag) {
    width: 80px;
    height: 60px;
}

.country-card-flag {
    width: 80px;
    height: 60px;
}

/* علم الجزائر الكبير */
.flag-container:has(.algeria-flag-large) {
    width: 96px;
    height: 72px;
}

.algeria-flag-large {
    width: 96px;
    height: 72px;
}

/* أعلام الخطط المستقبلية */
.flag-container:has(.future-country-flag) {
    width: 48px;
    height: 36px;
}

.future-country-flag {
    width: 48px;
    height: 36px;
}

/* تأثيرات التفاعل */
.flag-container:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.flag-container:hover .flag-image {
    filter: brightness(1.1) contrast(1.1) saturate(1.1);
}

/* تحسينات للأجهزة المحمولة */
@media (max-width: 768px) {
    .flag-container:has(.hero-flag) {
        width: 48px;
        height: 36px;
    }
    
    .hero-flag {
        width: 48px;
        height: 36px;
    }
    
    .flag-container:has(.country-card-flag) {
        width: 64px;
        height: 48px;
    }
    
    .country-card-flag {
        width: 64px;
        height: 48px;
    }
    
    .flag-container:has(.algeria-flag-large) {
        width: 72px;
        height: 54px;
    }
    
    .algeria-flag-large {
        width: 72px;
        height: 54px;
    }
}

/* تحسينات إمكانية الوصول */
@media (prefers-reduced-motion: reduce) {
    .flag-container,
    .flag-image {
        transition: none;
    }
    
    .flag-container:hover {
        transform: none;
    }
}

/* تحسين الأداء */
.flag-container {
    will-change: transform;
}

.flag-image {
    will-change: filter;
}

/* تحسين الظلال للموضوع المظلم */
@media (prefers-color-scheme: dark) {
    .flag-container {
        box-shadow: 0 2px 8px rgba(255, 255, 255, 0.1);
    }
    
    .flag-container:hover {
        box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
    }
}

/* تحسينات الأعلام الدائرية */
.flag-container {
    display: inline-block;
    position: relative;
}

.flag-image {
    border-radius: 50% !important;
    object-fit: cover;
    aspect-ratio: 1;
    transition: all 0.3s ease;
}

/* أحجام الأعلام حسب الموقع */
.hero-flag {
    width: 56px;
    height: 56px;
}

.algeria-flag-large {
    width: 96px;
    height: 96px;
}

.country-card-flag {
    width: 80px;
    height: 80px;
}

.future-country-flag {
    width: 48px;
    height: 48px;
}

/* تأثيرات hover للأعلام */
.flag-image:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* تحسينات للأعلام في الهيرو */
.country-flag-container .flag-image {
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.country-flag-container:hover .flag-image {
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* تحسينات للجزائر */
.algeria-flag-large {
    border: 4px solid rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* تحسينات بطاقات الدول */
.country-card-flag {
    border: 2px solid rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

/* تحسينات الدول المستقبلية */
.future-country-flag {
    border: 2px solid rgba(0, 0, 0, 0.1) !important;
    opacity: 0.7;
    filter: grayscale(0.3);
}

/* تحسينات الاستجابة */
@media (max-width: 768px) {
    .hero-flag {
        width: 48px;
        height: 48px;
    }
    
    .algeria-flag-large {
        width: 80px;
        height: 80px;
    }
    
    .country-card-flag {
        width: 64px;
        height: 64px;
    }
    
    .future-country-flag {
        width: 40px;
        height: 40px;
    }
}

/* تحسينات الأداء */
.flag-image {
    will-change: transform;
    backface-visibility: hidden;
}

/* تحسينات إمكانية الوصول */
@media (prefers-reduced-motion: reduce) {
    .flag-image {
        transition: none;
    }
    
    .flag-image:hover {
        transform: none;
    }
}

/* تحسينات الهيدر بنفس أسلوب صفحة اتصل بنا */

/* التأكد من تطابق التدرج مع صفحة اتصل بنا */
.gradient-bg {
    background: linear-gradient(135deg, #0ea5e9 0%, #22c55e 100%);
    position: relative;
    overflow: hidden;
}

/* تحسينات الهيدر الرئيسي */
.hero-section-simple {
    padding: 4rem 0;
    background: linear-gradient(135deg, #0ea5e9 0%, #22c55e 100%);
    color: white;
    text-align: center;
    position: relative;
}

.hero-section-simple h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-section-simple p {
    font-size: 1.25rem;
    max-width: 48rem;
    margin: 0 auto 2rem;
    opacity: 0.95;
    line-height: 1.6;
}

/* تحسينات أعلام الهيدر */
.country-flag-container {
    transition: all 0.3s ease;
    margin: 0.5rem;
}

.country-flag-container:hover {
    transform: scale(1.1);
}

.country-flag-container .flag-container {
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.country-flag-container:hover .flag-container {
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* تحسينات النصوص تحت الأعلام */
.country-flag-container span {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    display: block;
    margin-top: 0.5rem;
}

/* تحسين المربع الإحصائي */
.stats-box {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.stats-box i {
    margin-left: 0.5rem;
    color: #4ade80;
}

/* تحسينات الاستجابة للهيدر */
@media (max-width: 768px) {
    .hero-section-simple {
        padding: 3rem 0;
    }
    
    .hero-section-simple h1 {
        font-size: 2rem;
    }
    
    .hero-section-simple p {
        font-size: 1.125rem;
        padding: 0 1rem;
    }
    
    .country-flag-container {
        margin: 0.375rem;
    }
}

@media (min-width: 1024px) {
    .hero-section-simple h1 {
        font-size: 3rem;
    }
    
    .hero-section-simple p {
        font-size: 1.5rem;
    }
}

/* تحسينات إضافية للتناسق */
.section-padding {
    padding: 4rem 0;
}

.text-gradient {
    background: linear-gradient(135deg, #0ea5e9, #22c55e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* تحسين الانتقالات */
.smooth-transition {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* تحسين الظلال */
.enhanced-shadow {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.enhanced-shadow:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}
