@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;700;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700;900&display=swap');

:root {
    --primary-color: #0d47a1;
    --secondary-color: #1565c0;
    --accent-color: #1976d2;
    --text-dark: #2d3748;
    --text-light: #718096;
    --background-light: #f7f9fc;
    --white: #ffffff;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--background-light);
    color: var(--text-dark);
    scroll-behavior: smooth;
    line-height: 1.6;
}

.header-bg {
    background-color: var(--primary-color);
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
}

.text-primary {
    color: var(--primary-color);
}

.bg-primary {
    background-color: var(--primary-color);
}

.btn-primary {
    background-color: var(--secondary-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(13, 71, 161, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

[lang="en"] .rtl { 
    text-align: left; 
}

[lang="en"] .rtl .text-right { 
    text-align: left; 
}

[lang="en"] body { 
    font-family: 'Inter', sans-serif; 
}

/* شريط التقدم */
#progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    z-index: 9999;
    transition: width 0.3s ease;
    box-shadow: 0 2px 8px rgba(13, 71, 161, 0.3);
}

/* زر العودة للأعلى */
#back-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background-color: var(--primary-color);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 2px solid white;
}

#back-to-top.show {
    opacity: 1;
    visibility: visible;
}

#back-to-top:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* تحسين الظلال والتأثيرات */
.service-card, .article-card, .testimonial-card, .clinic-card {
    transition: all 0.3s ease;
    position: relative;
}

.service-card:hover, .article-card:hover, .testimonial-card:hover, .clinic-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.service-card::before, .article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 8px 8px 0 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-card:hover::before, .article-card:hover::before {
    opacity: 1;
}

/* تحسين النموذج */
.form-input {
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.form-input:focus {
    box-shadow: 0 0 0 3px rgba(13, 71, 161, 0.2);
    border-color: var(--primary-color);
    outline: none;
}

/* تحسين التنقل */
.nav-link {
    position: relative;
    padding: 5px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 0;
    width: 0;
    height: 2px;
    background-color: white;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* تحسين الأيقونات */
.service-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    margin-bottom: 15px;
    color: white;
    box-shadow: 0 4px 12px rgba(13, 71, 161, 0.3);
}

/* تحسين صورة الطبيب */
.doctor-image {
    border: 8px solid white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.doctor-image:hover {
    transform: scale(1.03);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

/* تحسين البطاقات الإحصائية */
.stats-card {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.stats-card:hover::before {
    transform: scaleX(1);
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(13, 71, 161, 0.15);
}

/* تحسين أزرار التواصل العائمة */
.floating-buttons a {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.floating-buttons a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    transform: scale(0);
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.floating-buttons a:hover::before {
    transform: scale(1);
}

/* تحسين العناوين */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
}

/* تحسين الاستجابة للشاشات الصغيرة */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    #back-to-top {
        bottom: 20px;
        left: 20px;
        width: 45px;
        height: 45px;
    }
    
    .service-icon {
        width: 50px;
        height: 50px;
    }
}

/* تحسينات للرسوم المتحركة */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* تحسينات إضافية للقراءة */
p {
    margin-bottom: 1rem;
}

ul, ol {
    margin-bottom: 1rem;
    padding-right: 1.5rem;
}

li {
    margin-bottom: 0.5rem;
}

/* تحسينات للألوان في الوضع الداكن */
@media (prefers-color-scheme: dark) {
    .bg-white {
        background-color: #1a202c;
        color: #e2e8f0;
    }
    
    .bg-gray-50 {
        background-color: #2d3748;
    }
    
    .text-gray-700, .text-gray-600 {
        color: #cbd5e0;
    }
}

/* تحسينات للوصول */
.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;
}

/* تحسينات للطباعة */
@media print {
    .floating-buttons,
    #back-to-top,
    #progress-bar {
        display: none !important;
    }
    
    .btn-primary {
        background-color: #000 !important;
        color: #fff !important;
    }
}

/* تحسين وضوح أيقونات SVG */
.floating-buttons svg {
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.2));
}

.floating-buttons a:hover svg {
    filter: drop-shadow(0 3px 3px rgba(0,0,0,0.3));
}

/* تحسين عرض الخطوط في الأيقونات */
.floating-buttons svg path {
    stroke-width: 0.5;
}

/* تحسينات لمعرض الصور والفيديوهات */
.gallery-item, .video-item {
    transition: all 0.3s ease;
}

.gallery-item:hover, .video-item:hover {
    transform: translateY(-5px);
}

.gallery-item img {
    transition: transform 0.3s ease;
}

/* تحسين الظلال للفيديوهات */
.video-item iframe {
    border-radius: 8px 8px 0 0;
}

/* تحسين الاستجابة للفيديوهات */
@media (max-width: 768px) {
    .video-item {
        margin-bottom: 2rem;
    }
}



.service-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    color: white;
    border-radius: 50%;
    margin-bottom: 15px;
}

/* أنماط الهيرو سلايدر */
.hero-slider {
    position: relative;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-slide.active {
    opacity: 1;
}

/* تأثيرات الحركة */
@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fade-in-up 0.8s ease-out;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-400 {
    animation-delay: 0.4s;
}

/* تحسينات للاستجابة */
@media (max-width: 768px) {
    .hero-slider {
        height: 70vh;
        min-height: 500px;
    }
    
    .hero-slide h1 {
        font-size: 2.5rem !important;
    }
    
    .hero-slide p {
        font-size: 1.2rem !important;
    }
}

/* تحسينات للأزرار */
.slider-prev, .slider-next {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.slider-prev:hover, .slider-next:hover {
    backdrop-filter: blur(20px);
    border-color: rgba(255, 255, 255, 0.4);
}

.slider-dot {
    transition: all 0.3s ease;
    cursor: pointer;
}

.slider-dot.active {
    background-color: white;
    transform: scale(1.2);
}

/* أنماط السلايدر */
.hero-slider {
    position: relative;
    height: 600px;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-slide.active {
    opacity: 1;
    z-index: 1;
}

.slider-nav {
    z-index: 10;
}

.slider-prev, .slider-next {
    z-index: 10;
}

/* تأثيرات الحركة */
.animate-fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-400 {
    animation-delay: 0.4s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}