/* Variables */
:root {
    --primary-color: #1a5276;
    --secondary-color: #d4ac0d;
    --dark-color: #2c3e50;
    --light-color: #f8f9fa;
    --text-color: #333;
    --text-muted: #6c757d;
    --white: #ffffff;
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.9);
    --glass-border: 1px solid rgba(255, 255, 255, 0.3);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    
    /* Fonts */
    --font-ar: 'Cairo', sans-serif;
    --font-en: 'Poppins', sans-serif;
}

/* Global Styles */
body {
    font-family: var(--font-ar);
    color: var(--text-color);
    background-color: #f0f2f5;
    overflow-x: hidden;
}

body.ltr {
    font-family: var(--font-en);
}

a {
    text-decoration: none;
    transition: all 0.3s ease;
}

/* Navbar */
.navbar {
    background: rgba(26, 82, 118, 0.95);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    padding: 15px 0;
}

.navbar.scrolled {
    padding: 10px 0;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.navbar-brand img {
    height: 50px;
    transition: transform 0.3s ease;
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

.nav-link {
    color: rgba(255,255,255,0.9) !important;
    font-weight: 500;
    margin: 0 10px;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link:hover {
    color: var(--secondary-color) !important;
}

/* Language Switcher */
.lang-switcher button {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    margin-left: 5px;
    transition: all 0.3s ease;
}

.lang-switcher button.active,
.lang-switcher button:hover {
    background: var(--secondary-color);
    color: var(--primary-color);
    border-color: var(--secondary-color);
    font-weight: bold;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    background: linear-gradient(135deg, rgba(26, 82, 118, 0.9) 0%, rgba(44, 62, 80, 0.9) 100%),
                url('https://images.unsplash.com/photo-1523050854058-8df90110c9f1?ixlib=rb-4.0.3');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    padding-top: 80px;
    position: relative;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-section h1 {
    font-weight: 800;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* Buttons */
.btn {
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #f1c40f;
    border-color: #f1c40f;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(212, 172, 13, 0.3);
}

.btn-outline-light:hover {
    background-color: white;
    color: var(--primary-color);
    transform: translateY(-3px);
}

/* Stats Section */
.stats-section {
    background: white;
    margin-top: -50px;
    position: relative;
    z-index: 10;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.05);
}

.stat-item {
    text-align: center;
    padding: 20px;
}

.stat-item h3 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.stat-item p {
    color: var(--text-muted);
    font-weight: 600;
}

/* Cards (Glassmorphism & Hover) */
.link-card, .feature-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(0,0,0,0.05);
}

.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1) !important;
}

.icon-box, .icon-wrapper {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    background: rgba(26, 82, 118, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.link-card:hover .icon-box,
.feature-card:hover .icon-wrapper {
    background: var(--primary-color);
    color: white !important;
}

/* About Section */
.about-image-wrapper {
    position: relative;
    padding: 20px;
}

.about-image-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 2px solid var(--secondary-color);
    border-radius: 20px;
    transform: translate(-15px, -15px);
    z-index: -1;
}

.about-image-wrapper img {
    border-radius: 15px;
}

/* Section Titles */
.section-title {
    font-weight: 800;
    color: var(--primary-color);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 4px;
    background: var(--secondary-color);
    margin-top: 10px;
    border-radius: 2px;
}

.text-center .section-title::after {
    margin: 10px auto 0;
}

/* Footer */
.footer {
    background-color: var(--primary-color);
    color: rgba(255,255,255,0.8);
}

.footer h5 {
    color: white;
    font-weight: 700;
    position: relative;
    padding-bottom: 15px;
}

.footer h5::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0; /* RTL default */
    width: 40px;
    height: 3px;
    background-color: var(--secondary-color);
}

.ltr .footer h5::after {
    right: auto;
    left: 0;
}

.footer a {
    color: rgba(255,255,255,0.7);
}

.footer a:hover {
    color: var(--secondary-color);
    padding-right: 5px; /* RTL */
}

.ltr .footer a:hover {
    padding-right: 0;
    padding-left: 5px;
}

.social-icons a {
    display: inline-flex;
    width: 35px;
    height: 35px;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    margin-right: 10px;
    color: white;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background: var(--secondary-color);
    color: var(--primary-color);
    transform: translateY(-3px);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 40px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .stats-section {
        margin-top: 0;
        border-radius: 0;
    }
}