:root {
    --primary: #0B1F3A;
    --primary-light: #163a6e;
    --secondary: #d93838;
    --secondary-hover: #b82e2e;
    --bg-color: #FFFFFF;
    --light-section: #F7F8FA;
    --text-color: #1A1A1A;
    --text-muted: #6c757d;
    --transition: all 0.3s ease-in-out;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --shadow-sm: 0 2px 10px rgba(0,0,0,0.05);
    --shadow-md: 0 5px 20px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.15);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
}

body.lang-ar { font-family: 'Cairo', sans-serif; text-align: right; }
body.lang-en { font-family: 'Poppins', sans-serif; text-align: left; }

/* Typography */
h1, h2, h3, h4, h5, h6 { color: var(--primary); font-weight: 700; }
a { text-decoration: none; color: inherit; transition: var(--transition); }
img { max-width: 100%; height: auto; }

/* Override Bootstrap warning color to match brand red */
.text-warning { color: var(--secondary) !important; }
.bg-warning { background-color: var(--secondary) !important; }
.bg-warning.text-dark { color: #ffffff !important; }
.border-warning { border-color: var(--secondary) !important; }
.badge.bg-warning { background-color: var(--secondary) !important; color: #fff !important; }
.btn-warning { background-color: var(--secondary) !important; border-color: var(--secondary) !important; color: #fff !important; }
.btn-warning:hover { background-color: var(--secondary-hover) !important; }
.btn-outline-warning { border-color: var(--secondary) !important; color: var(--secondary) !important; }

/* Text contrast helpers */
.text-on-light { color: var(--text-color) !important; }
.text-on-dark { color: #ffffff !important; }

/* Buttons */
.btn-primary-custom {
    background: var(--secondary);
    color: white !important;
    border: none;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.btn-primary-custom:hover {
    background: var(--secondary-hover);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(217, 56, 56, 0.4);
}
.btn-outline-custom {
    background: transparent;
    color: white !important;
    border: 2px solid white;
    padding: 10px 28px;
    border-radius: 30px;
    font-weight: 600;
    transition: var(--transition);
}
.btn-outline-custom:hover {
    background: white;
    color: var(--primary) !important;
}

/* Loading Screen */
.loading-screen {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--primary);
    display: flex; justify-content: center; align-items: center;
    z-index: 9999; color: white; transition: opacity 0.5s ease;
}
.loading-screen.hidden { opacity: 0; pointer-events: none; }
.spinner {
    width: 60px; height: 60px;
    border: 5px solid rgba(255,255,255,0.2);
    border-top-color: var(--secondary);
    border-radius: 50%;
    animation: spin 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
    margin: 0 auto 20px;
}
@keyframes spin { 100% { transform: rotate(360deg); } }

/* Navbar */
.navbar {
    background: transparent;
    padding: 20px 0;
    transition: var(--transition);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}
.navbar.scrolled {
    padding: 10px 0;
    background: rgba(11, 31, 58, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
}
.navbar-brand img { height: 50px; transition: var(--transition); }
.navbar.scrolled .navbar-brand img { height: 40px; }
.nav-link {
    color: rgba(255,255,255,0.8) !important;
    font-weight: 500; margin: 0 10px; position: relative;
    font-size: 1.05rem;
}
.nav-link:hover, .nav-link.active { color: white !important; }
.nav-link::after {
    content: ''; position: absolute;
    bottom: -5px; left: 0; width: 0; height: 2px;
    background: var(--secondary); transition: var(--transition);
}
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

/* Dropdown */
.dropdown-menu {
    background: var(--primary);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    padding: 10px;
}
.dropdown-item {
    color: white;
    border-radius: 5px;
    transition: var(--transition);
}
.dropdown-item:hover {
    background: rgba(255,255,255,0.1);
    color: var(--secondary);
}

/* Hero Section */
.hero-section {
    height: 100vh;
    background-color: #0B1F3A;
    background-image: linear-gradient(to right, rgba(11, 31, 58, 0.9), rgba(11, 31, 58, 0.7)), url('../images/hero_bg.png');
    background-position: center;
    background-size: cover;
    display: flex; align-items: center; position: relative; overflow: hidden;
}
.hero-particles {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none;
}
.hero-content {
    position: relative; z-index: 2; color: white;
}
.hero-title {
    font-size: 4rem; font-weight: 800; margin-bottom: 20px; line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}
.hero-subtitle {
    font-size: 1.2rem; font-weight: 300; margin-bottom: 40px; max-width: 600px;
    color: rgba(255,255,255,0.9);
}
.hero-shapes {
    position: absolute; bottom: -50px; right: -50px; opacity: 0.1;
    width: 400px; height: 400px; background: var(--secondary); border-radius: 50%; filter: blur(50px);
}

/* Stats Section */
.stats-wrapper {
    background: var(--bg-color);
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow-lg);
    margin-top: -80px;
    position: relative;
    z-index: 10;
}
.stat-item {
    text-align: center;
    padding: 20px;
}
.stat-icon {
    font-size: 2.5rem;
    color: var(--secondary);
    margin-bottom: 15px;
}
.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 5px;
}
.stat-text {
    color: var(--text-muted);
    font-weight: 500;
}

/* Section Titles */
.section-title {
    text-align: center; margin-bottom: 50px;
}
.section-title h2 {
    font-size: 2.5rem; font-weight: 800; position: relative; display: inline-block; padding-bottom: 15px;
}
.section-title h2::after {
    content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
    width: 80px; height: 3px; background: var(--secondary); border-radius: 5px;
}
.section-title p {
    color: var(--text-muted); margin-top: 15px; max-width: 600px; margin-inline: auto;
}

/* Services Section */
.services-section { padding: 100px 0; background: var(--light-section); }
.service-card {
    background: var(--bg-color);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
    position: relative;
    border: 1px solid rgba(0,0,0,0.05);
}
.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}
.service-img {
    height: 200px; overflow: hidden; position: relative;
}
.service-img img {
    width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease;
}
.service-card:hover .service-img img { transform: scale(1.1); }
.service-icon-wrapper {
    position: absolute; bottom: -25px; right: 20px;
    width: 60px; height: 60px; background: var(--secondary); color: white;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; font-size: 1.5rem; box-shadow: 0 5px 15px rgba(217, 56, 56, 0.4);
    z-index: 2;
}
body.lang-ar .service-icon-wrapper { right: auto; left: 20px; }
.service-content { padding: 40px 20px 20px; }
.service-content h3 { font-size: 1.25rem; margin-bottom: 15px; transition: var(--transition); }
.service-card:hover .service-content h3 { color: var(--secondary); }
.service-content p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 20px; }
.read-more { font-weight: 600; color: var(--primary); display: inline-flex; align-items: center; gap: 5px; }
.read-more:hover { color: var(--secondary); }

/* About Section */
.about-section { padding: 100px 0; }
.about-img-wrapper { position: relative; }
.about-img-1 { border-radius: 20px; width: 80%; box-shadow: var(--shadow-md); }
.about-img-2 {
    position: absolute; bottom: -30px; right: 0; width: 50%; border-radius: 20px;
    border: 10px solid var(--bg-color); box-shadow: var(--shadow-lg);
}
body.lang-ar .about-img-2 { right: auto; left: 0; }
.about-features { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 30px; }
.feature-item { display: flex; align-items: center; gap: 15px; }
.feature-icon {
    width: 50px; height: 50px; background: var(--light-section); border-radius: 50%;
    display: flex; align-items: center; justify-content: center; color: var(--secondary); font-size: 1.2rem;
}
.feature-item h4 { font-size: 1.1rem; margin: 0; }

/* Why Choose Us */
.why-us-section {
    padding: 100px 0;
    background-color: #0B1F3A;
    background-image: linear-gradient(rgba(11, 31, 58, 0.95), rgba(11, 31, 58, 0.95)), url('../images/hero_bg.png');
    background-position: center;
    background-size: cover;
    background-attachment: fixed;
    color: white;
}
.why-us-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 20px;
    transition: var(--transition);
}
.why-us-card:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-5px);
}
.why-us-card i { font-size: 2.5rem; color: var(--secondary); margin-bottom: 20px; }
.why-us-card h4 { color: white !important; margin-bottom: 15px; }
.why-us-section h2,
.why-us-section h3,
.why-us-section h4,
.why-us-section span,
.why-us-section li { color: #ffffff !important; }
.why-us-section .section-title h2::after { background: var(--secondary); }

/* Floating Buttons */
.floating-buttons {
    position: fixed; bottom: 30px; z-index: 999; display: flex; flex-direction: column; gap: 15px;
}
body.lang-en .floating-buttons { right: 30px; }
body.lang-ar .floating-buttons { left: 30px; }

.float-btn {
    width: 60px; height: 60px; border-radius: 50%; display: flex; justify-content: center; align-items: center;
    color: white !important; font-size: 24px; box-shadow: var(--shadow-lg); transition: var(--transition);
    position: relative;
}
.float-whatsapp { background: #25D366; }
.float-phone { background: var(--primary); }
.float-up { background: var(--secondary); opacity: 0; visibility: hidden; width: 50px; height: 50px; font-size: 20px; }
.float-up.visible { opacity: 1; visibility: visible; }

.float-btn:hover { transform: scale(1.1); }
.float-btn::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 50%; border: 2px solid currentColor; animation: pulse 2s infinite;
}
@keyframes pulse {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.5); opacity: 0; }
}

/* Footer */
.footer {
    background: var(--primary); color: white; padding: 80px 0 20px; position: relative; overflow: hidden;
}
.footer-shape { position: absolute; top: 0; left: 0; width: 100%; height: auto; opacity: 0.1; }
.footer-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 25px; position: relative; padding-bottom: 10px; }
.footer-title::after {
    content: ''; position: absolute; bottom: 0; left: 0; width: 50px; height: 2px; background: var(--secondary);
}
body.lang-ar .footer-title::after { left: auto; right: 0; }
.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 12px; }
.footer-links a { color: rgba(255,255,255,0.7); display: inline-flex; align-items: center; gap: 10px; }
.footer-links a:hover { color: var(--secondary); padding-left: 5px; }
body.lang-ar .footer-links a:hover { padding-left: 0; padding-right: 5px; }
.social-links { display: flex; gap: 15px; margin-top: 20px; }
.social-links a {
    width: 40px; height: 40px; background: rgba(255,255,255,0.1); border-radius: 50%;
    display: flex; justify-content: center; align-items: center; color: white; transition: var(--transition);
}
.social-links a:hover { background: var(--secondary); transform: translateY(-3px); }
.newsletter-form .input-group { background: rgba(255,255,255,0.1); border-radius: 30px; padding: 5px; }
.newsletter-form input {
    background: transparent; border: none; color: white; box-shadow: none !important; padding-left: 20px;
}
.newsletter-form input::placeholder { color: rgba(255,255,255,0.6); }
.newsletter-form button { border-radius: 30px !important; }
.footer-bottom {
    margin-top: 50px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center; color: rgba(255,255,255,0.6);
}

/* Contact Page Specifics */
.contact-info-card {
    background: var(--bg-color); padding: 30px; border-radius: 15px; box-shadow: var(--shadow-md);
    text-align: center; margin-bottom: 30px; transition: var(--transition);
}
.contact-info-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.contact-icon {
    width: 70px; height: 70px; background: var(--light-section); color: var(--secondary);
    border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 2rem;
    margin: 0 auto 20px; transition: var(--transition);
}
.contact-info-card:hover .contact-icon { background: var(--secondary); color: white; }

.contact-form-wrapper {
    background: var(--bg-color); padding: 40px; border-radius: 20px; box-shadow: var(--shadow-lg);
}
.form-control {
    border: 1px solid #eee; padding: 15px 20px; border-radius: 10px; background: #fafafa;
    transition: var(--transition);
}
.form-control:focus {
    background: white; border-color: var(--secondary); box-shadow: 0 0 0 0.25rem rgba(217, 56, 56, 0.25);
}

/* Page Header */
.page-header {
    background-color: #0B1F3A;
    background-image: linear-gradient(rgba(11, 31, 58, 0.8), rgba(11, 31, 58, 0.8)), url('../images/hero_bg.png');
    background-position: center;
    background-size: cover;
    padding: 150px 0 80px; text-align: center; color: white; position: relative;
}
.breadcrumb { justify-content: center; background: transparent; padding: 0; margin-top: 20px; }
.breadcrumb-item a { color: var(--secondary); }
.breadcrumb-item.active { color: rgba(255,255,255,0.7); }
.breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,0.5); }

/* Responsive adjustments */
@media (max-width: 991px) {
    .hero-title { font-size: 2.5rem; }
    .navbar { background: rgba(11, 31, 58, 0.95) !important; padding: 10px 0; }
    .stats-wrapper { margin-top: 30px; }
    .about-img-2 { width: 70%; right: -20px; bottom: -20px; }
}

@media (max-width: 768px) {
    .hero-title { font-size: 2rem; margin-top: 30px; }
    .hero-subtitle { font-size: 1.1rem; }
    .section-title h2 { font-size: 2rem; }
    .services-section, .about-section, .why-us-section, .py-5 { padding: 60px 0 !important; }
    .stats-wrapper { padding: 20px; }
    .stat-icon { font-size: 2rem; margin-bottom: 10px; }
    .stat-number { font-size: 2rem; }
    .about-img-1 { width: 100%; margin-bottom: 20px; }
    .about-img-2 { display: none !important; }
    .footer { padding-top: 50px; }
    .page-header { padding: 120px 0 50px; }
    .float-btn { width: 50px; height: 50px; font-size: 20px; }
    .floating-buttons { bottom: 20px; }
    body.lang-ar .floating-buttons { left: 20px; }
    body.lang-en .floating-buttons { right: 20px; }
}

@media (max-width: 576px) {
    .hero-title { font-size: 1.7rem; }
    .section-title h2 { font-size: 1.6rem; }
    .hero-subtitle { font-size: 1rem; }
    .btn-primary-custom { padding: 10px 20px; }
}
