/* إعدادات إضافية للتصميم المطابق */

/* تحسينات الخط العربي */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;900&family=Amiri:wght@400;700&display=swap');

:root {
    --primary-dark: #1d1c32;
    --primary-orange: #ffb717;
    --secondary-dark: #222053;
    --light-orange: #ffd175;
    --gradient-primary: linear-gradient(135deg, #1d1c32 0%, #222053 100%);
    --gradient-orange: linear-gradient(135deg, #ffb717 0%, #ffd175 100%);
}

/* تحسينات أساسية */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', 'Arial', sans-serif;
    line-height: 1.6;
    direction: rtl;
    text-align: right;
    overflow-x: hidden;
}

/* تحسينات الهيدر */
.header-sticky {
    backdrop-filter: blur(15px);
    background: rgba(29, 28, 50, 0.95);
    border-bottom: 1px solid rgba(255, 183, 23, 0.2);
    transition: all 0.3s ease;
}

.header-sticky.scrolled {
    background: rgba(29, 28, 50, 0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* تحسينات القائمة */
.nav-link {
    position: relative;
    color: white;
    text-decoration: none;
    padding: 12px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 25px;
}

.nav-link:hover {
    color: var(--primary-orange);
    background: rgba(255, 183, 23, 0.1);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--primary-orange);
    transition: all 0.3s ease;
    transform: translateX(-50%);
    border-radius: 2px;
}

.nav-link:hover::after {
    width: 60%;
}

/* تحسينات القسم الرئيسي */
.hero-section {
    background: var(--gradient-primary);
    position: relative;
    overflow: hidden;
}

.hero-section::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="50" cy="50" r="1" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

/* تحسينات البطاقات المقلوبة */
.flip-card {
    height: 350px;
    margin-bottom: 2rem;
}

/* تحسينات الصور */
img {
    transition: all 0.3s ease;
}

img:hover {
    transform: scale(1.05);
}

/* تحسينات الصور في البطاقات */
.card-hover img {
    transition: transform 0.3s ease;
}

.card-hover:hover img {
    transform: scale(1.1);
}

/* تحسينات الصور في الأخبار */
.news-card img {
    transition: all 0.3s ease;
}

.news-card:hover img {
    transform: scale(1.1);
    filter: brightness(1.1);
}

/* تحسينات الصور في الخدمات */
.service-card img {
    transition: all 0.3s ease;
}

.service-card:hover img {
    transform: scale(1.1);
}

/* تأثيرات الصور */
.image-overlay {
    position: relative;
    overflow: hidden;
}

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

.image-overlay:hover::before {
    transform: translateX(100%);
}

.flip-card-front,
.flip-card-back {
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.flip-card-front {
    background: var(--gradient-primary);
    position: relative;
    overflow: hidden;
}

.flip-card-front::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.6s ease;
}

.flip-card:hover .flip-card-front::before {
    animation: shine 0.6s ease-in-out;
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.flip-card-back {
    background: var(--gradient-orange);
    border: 2px solid var(--primary-dark);
}

/* تحسينات الأزرار */
.btn-primary {
    background: var(--gradient-orange);
    color: var(--primary-dark);
    padding: 15px 35px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: all 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    background: var(--secondary-dark);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(29, 28, 50, 0.3);
}

.btn-secondary {
    background: var(--primary-dark);
    color: white;
    padding: 15px 35px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.3s ease;
    border: 2px solid var(--primary-orange);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-secondary:hover {
    background: var(--primary-orange);
    color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(255, 183, 23, 0.3);
}

/* تحسينات البطاقات */
.card-hover {
    transition: all 0.4s ease;
    border-radius: 20px;
    overflow: hidden;
}

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

/* تحسينات الأقسام */
.section-bg-dark {
    background: var(--gradient-primary);
    position: relative;
}

.section-bg-dark::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="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="rgba(255,183,23,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
    opacity: 0.3;
}

.section-bg-orange {
    background: var(--gradient-orange);
    position: relative;
}

.section-bg-orange::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="grid" width="20" height="20" patternUnits="userSpaceOnUse"><path d="M 20 0 L 0 0 0 20" fill="none" stroke="rgba(29,28,50,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.5;
}

/* تحسينات الإحصائيات */
.section-bg-orange h3 {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
}

.section-bg-orange h3::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    width: 50px;
    height: 3px;
    background: var(--primary-dark);
    transform: translateX(-50%);
    border-radius: 2px;
}

/* تحسينات النماذج */
input, textarea {
    transition: all 0.3s ease;
    font-family: 'Cairo', sans-serif;
}

input:focus, textarea:focus {
    outline: none;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 183, 23, 0.2);
}

/* تحسينات الفوتر */
footer {
    background: var(--gradient-primary);
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-orange);
}

/* تحسينات الرسوم المتحركة */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

.animate-fade-in {
    animation: fadeInUp 0.8s ease-out;
}

.animate-slide-up {
    animation: fadeInUp 1s ease-out;
}

.animate-slide-left {
    animation: fadeInLeft 0.8s ease-out;
}

.animate-slide-right {
    animation: fadeInRight 0.8s ease-out;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

/* تحسينات الاستجابة */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .flip-card {
        height: 300px;
    }
    
    .btn-primary, .btn-secondary {
        padding: 12px 25px;
        font-size: 14px;
    }
    
    .card-hover:hover {
        transform: translateY(-5px);
    }
}

@media (max-width: 640px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .section-bg-orange h3 {
        font-size: 3rem;
    }
    
    .flip-card {
        height: 280px;
    }
}

/* تحسينات إضافية للتفاعل */
.hover-lift {
    transition: all 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
}

.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.glow-effect {
    box-shadow: 0 0 20px rgba(255, 183, 23, 0.3);
}

/* تحسينات الخط العربي */
.arabic-text {
    font-feature-settings: "liga" 1, "kern" 1;
    text-rendering: optimizeLegibility;
}

/* تحسينات التحميل */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

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

/* تحسينات تحميل الصور */
img.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    opacity: 0.7;
}

img.loaded {
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* تأثيرات الصور المتقدمة */
.image-glow {
    box-shadow: 0 0 20px rgba(255, 183, 23, 0.3);
    transition: box-shadow 0.3s ease;
}

.image-glow:hover {
    box-shadow: 0 0 30px rgba(255, 183, 23, 0.5);
}

/* تأثير البوكيه للصور */
.bokeh-effect {
    position: relative;
    overflow: hidden;
}

.bokeh-effect::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 183, 23, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: float 6s ease-in-out infinite;
    pointer-events: none;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

/* تحسينات الوصولية */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* تحسينات التركيز */
button:focus,
input:focus,
textarea:focus,
a:focus {
    outline: 2px solid var(--primary-orange);
    outline-offset: 2px;
}

/* تحسينات الطباعة */
@media print {
    .header-sticky,
    footer,
    .btn-primary,
    .btn-secondary {
        display: none;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}
