/**
 * ملف CSS الرئيسي للموقع
 * Main CSS File for Website
 */

/* الخطوط */
:root {
    --font-arabic: 'Cairo', sans-serif;
    --font-english: 'Roboto', sans-serif;
    --primary-color: #4e73df;
    --secondary-color: #858796;
    --success-color: #1cc88a;
    --info-color: #36b9cc;
    --warning-color: #f6c23e;
    --danger-color: #e74a3b;
    --light-color: #f8f9fc;
    --dark-color: #5a5c69;
}

/* الإعدادات العامة */
body {
    font-family: var(--font-arabic);
    line-height: 1.6;
    color: var(--dark-color);
}

[dir="ltr"] body {
    font-family: var(--font-english);
}

/* شريط التنقل */
.navbar {
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    transition: all 0.3s ease;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.2rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* القسم الرئيسي */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.carousel-item {
    height: 100vh;
    position: relative;
}

.carousel-item img {
    object-fit: cover;
    height: 100%;
    width: 100%;
}

.carousel-caption {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.5);
    padding: 2rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.hero-content h1 {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-content p {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.hero-fallback {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--info-color) 100%);
    color: white;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

/* العناوين */
.section-title {
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 2rem;
    position: relative;
}

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

[dir="rtl"] .section-title::after {
    right: 50%;
    transform: translateX(50%);
}

/* البطاقات */
.card {
    border: none;
    border-radius: 15px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important;
}

/* بطاقات التحصيل الدراسي */
.achievement-card {
    background: linear-gradient(135deg, #fff 0%, #f8f9fc 100%);
}

.achievement-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.achievement-details {
    border-top: 1px solid #e3e6f0;
    padding-top: 1rem;
    margin-top: 1rem;
}

/* بطاقات البحوث */
.research-card {
    border-left: 4px solid var(--primary-color);
}

[dir="rtl"] .research-card {
    border-left: none;
    border-right: 4px solid var(--primary-color);
}

.research-details {
    border-top: 1px solid #e3e6f0;
    padding-top: 1rem;
}

.research-links .btn {
    margin-bottom: 0.5rem;
}

/* بطاقات مواقع العمل */
.location-card {
    border-top: 4px solid var(--success-color);
}

.contact-info .btn {
    margin-bottom: 0.5rem;
}

/* بطاقات أدوات الذكاء الاصطناعي */
.ai-tool-card {
    background: linear-gradient(135deg, #fff 0%, #f1f3ff 100%);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.ai-tool-card:hover {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, #f1f3ff 0%, #fff 100%);
}

.ai-tool-icon {
    margin-bottom: 1rem;
}

.tool-icon {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 10px;
}

/* الأزرار */
.btn {
    border-radius: 10px;
    font-weight: 500;
    padding: 0.5rem 1.5rem;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #2e59d9 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2e59d9 0%, var(--primary-color) 100%);
}

.btn-outline-primary {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* التذييل */
footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%) !important;
}

footer a {
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--primary-color) !important;
}

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

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

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

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.fade-in-left {
    animation: fadeInLeft 0.6s ease-out;
}

.fade-in-right {
    animation: fadeInRight 0.6s ease-out;
}

/* التجاوبية المحسنة */
@media (max-width: 1200px) {
    .container-fluid {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .card-body {
        padding: 1.5rem;
    }
}

@media (max-width: 992px) {
    .navbar-nav {
        text-align: center;
        margin-top: 1rem;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .col-lg-4,
    .col-lg-6 {
        margin-bottom: 2rem;
    }
}

@media (max-width: 768px) {
    .hero-section {
        min-height: 70vh;
    }
    
    .carousel-item {
        height: 70vh;
    }
    
    .carousel-caption {
        padding: 1rem;
        font-size: 0.9rem;
        width: 90%;
        left: 50%;
        transform: translate(-50%, -50%);
    }
    
    .hero-content h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .hero-content p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }
    
    .card-body {
        padding: 1.5rem;
    }
    
    .btn {
        font-size: 0.875rem;
        padding: 0.4rem 1rem;
        margin-bottom: 0.5rem;
        width: auto;
        display: inline-block;
    }
    
    .navbar-collapse {
        background-color: rgba(78, 115, 223, 0.95);
        margin-top: 0.5rem;
        border-radius: 10px;
        padding: 1rem;
    }
    
    .achievement-icon {
        font-size: 2rem;
    }
    
    .tool-icon {
        width: 50px;
        height: 50px;
    }
    
    .research-links .btn,
    .contact-info .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .row {
        margin-left: -10px;
        margin-right: -10px;
    }
    
    .col-md-6,
    .col-lg-4,
    .col-lg-6 {
        padding-left: 10px;
        padding-right: 10px;
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 576px) {
    .hero-content h1 {
        font-size: 1.5rem;
        line-height: 1.3;
    }
    
    .hero-content p {
        font-size: 0.9rem;
    }
    
    .section-title {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .carousel-caption {
        padding: 0.5rem;
        font-size: 0.8rem;
        width: 95%;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn {
        font-size: 0.8rem;
        padding: 0.3rem 0.8rem;
    }
    
    .achievement-icon {
        font-size: 1.8rem;
    }
    
    .tool-icon {
        width: 40px;
        height: 40px;
    }
    
    .navbar-brand {
        font-size: 1rem;
    }
    
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .row {
        margin-left: -5px;
        margin-right: -5px;
    }
    
    .col-md-6,
    .col-lg-4,
    .col-lg-6 {
        padding-left: 5px;
        padding-right: 5px;
    }
    
    .research-details,
    .achievement-details {
        font-size: 0.9rem;
    }
    
    .card-title {
        font-size: 1.1rem;
    }
    
    .card-text {
        font-size: 0.9rem;
    }
}

@media (max-width: 400px) {
    .hero-content h1 {
        font-size: 1.3rem;
    }
    
    .section-title {
        font-size: 1.3rem;
    }
    
    .carousel-caption {
        padding: 0.3rem;
        font-size: 0.7rem;
    }
    
    .card-body {
        padding: 0.8rem;
    }
    
    .btn {
        font-size: 0.75rem;
        padding: 0.25rem 0.6rem;
    }
    
    .navbar-brand {
        font-size: 0.9rem;
    }
    
    .achievement-icon,
    .tool-icon {
        width: 35px;
        height: 35px;
        font-size: 1.5rem;
    }
}

/* تحسينات للغة العربية */
[dir="rtl"] {
    text-align: right;
}

[dir="rtl"] .text-center {
    text-align: center !important;
}

[dir="rtl"] .text-start {
    text-align: right !important;
}

[dir="rtl"] .text-end {
    text-align: left !important;
}

[dir="rtl"] .me-2 {
    margin-right: 0 !important;
    margin-left: 0.5rem !important;
}

[dir="rtl"] .me-3 {
    margin-right: 0 !important;
    margin-left: 1rem !important;
}

[dir="rtl"] .ms-auto {
    margin-left: 0 !important;
    margin-right: auto !important;
}

/* تحسينات إضافية */
.smooth-scroll {
    scroll-behavior: smooth;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--info-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-custom {
    box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.1) !important;
}

.border-gradient {
    border: 2px solid;
    border-image: linear-gradient(135deg, var(--primary-color) 0%, var(--info-color) 100%) 1;
}

/* تأثيرات التمرير */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* تحسينات الأداء */
.card-img-top {
    transition: transform 0.3s ease;
}

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

/* تخصيصات للطباعة */
@media print {
    .navbar,
    .carousel-control-prev,
    .carousel-control-next,
    .carousel-indicators,
    footer {
        display: none !important;
    }
    
    .hero-section {
        min-height: auto;
    }
    
    .card {
        break-inside: avoid;
        margin-bottom: 1rem;
    }
}

