@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', sans-serif;
}

:root {
    --primary-color: #0056b3;
    --secondary-color: #495057;
    --dark-color: #212529;
    --light-color: #f8f9fa;
    --success-color: #28a745;
    --text-color: #333333;
    --bg-light: #f0f2f5;
    --bg-dark: #343a40;
    --text-light: #ffffff;
    --text-dark: #212529;
    --border-color: #dee2e6;
    --hover-color: #004494;
}

body {
    font-family: 'Cairo', sans-serif;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--light-color);
    padding-top: 76px; /* لتعويض ارتفاع القائمة العلوية الثابتة */
}

/* Header Styles */
header {
    background: var(--primary-color);
    color: white;
    padding: 1rem 0;
}

.logo h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

nav a {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
}

/* التنقل العلوي */
.navbar {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

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

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: #ffffff;
    transform: translateY(-2px);
}

.navbar-scrolled {
    background-color: var(--primary-color) !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Hero Section */
#hero {
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('../images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 100px 0;
}

/* قسم العرض الرئيسي */
.hero-section {
    background: linear-gradient(to bottom, #f8f9fa, #e9ecef);
    padding-top: 80px;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-section h1 {
    font-weight: 800;
    margin-bottom: 20px;
}

.hero-section img {
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.hero-section img:hover {
    transform: translateY(-10px);
}

/* About Section */
#about {
    padding: 4rem 0;
    background: #f9f9f9;
}

.features {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.feature {
    text-align: center;
    padding: 1rem;
}

.feature img {
    width: 80px;
    height: 80px;
    margin-bottom: 1rem;
}

/* مميزات الشركة */
.feature-box {
    padding: 20px;
    border-radius: 10px;
    background-color: #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.feature-box:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 26px;
    position: relative;
    z-index: 2;
}

.feature-icon i {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.icon-round {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 26px;
}

/* Products Section */
#products {
    padding: 4rem 0;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    text-align: center;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.product-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

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

/* Contact Section */
#contact {
    background: var(--primary-color);
    color: white;
    padding: 4rem 0;
}

.contact-info {
    text-align: center;
    margin-top: 2rem;
}

/* Footer */
footer {
    background-color: var(--bg-dark);
    color: var(--text-light);
    padding: 50px 0 0;
}

footer h5 {
    color: #ffffff;
    font-weight: 700;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

footer h5::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 3px;
    background-color: var(--primary-color);
}

footer p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 10px;
}

footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
}

footer a:hover {
    color: #ffffff;
    text-decoration: none;
    padding-right: 5px;
}

footer .social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    margin-right: 10px;
    transition: all 0.3s ease;
}

footer .social-icon:hover {
    background-color: var(--primary-color);
    transform: translateY(-5px);
}

.border-top.border-secondary {
    border-top-color: rgba(255, 255, 255, 0.1) !important;
}

/* قسم النشرة البريدية */
.bg-primary {
    background-color: var(--primary-color) !important;
}

.bg-primary h2 {
    color: #ffffff;
    font-weight: 700;
}

.bg-primary p {
    color: rgba(255, 255, 255, 0.9);
}

.btn-light {
    background-color: #ffffff;
    color: var(--primary-color);
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-light:hover {
    background-color: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* قسم تواصل معنا */
.contact-info-card {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 25px;
    height: 100%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.contact-info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.card-icon {
    width: 60px;
    height: 60px;
    background-color: var(--primary-color);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 24px;
}

.contact-info-card h3 {
    color: #ffffff;
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
}

.address-details p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 10px;
}

.location-coordinates {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 8px;
    border-radius: 5px;
    text-align: center;
    margin: 15px 0;
    font-family: monospace;
    color: var(--primary-color);
}

.btn-outline-light {
    border-color: rgba(255, 255, 255, 0.5);
    color: #ffffff;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-light:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* أيقونات التواصل الاجتماعي */
.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.social-icon:hover {
    transform: translateY(-3px);
    color: var(--primary-color) !important;
}

/* العناوين الرئيسية */
.section-title {
    position: relative;
    margin-bottom: 40px;
    font-weight: 700;
    color: var(--text-dark);
}

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

/* بطاقات الخدمات */
.service-card {
    border: none;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.service-card img {
    height: 200px;
    object-fit: cover;
}

/* أنماط معرض الصور */
.gallery-item {
    display: block;
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.gallery-item img {
    transition: transform 0.5s ease;
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover::after {
    opacity: 1;
}

/* أنماط علامات التبويب للمعرض */
.nav-pills .nav-link {
    color: #0d6efd;
    background-color: white;
    margin: 0 5px;
    border-radius: 30px;
    padding: 8px 20px;
}

.nav-pills .nav-link.active {
    background-color: #0d6efd;
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        text-align: center;
    }
    
    .features {
        flex-direction: column;
    }
    
    .feature {
        margin-bottom: 2rem;
    }

    .hero-section {
        padding-top: 120px;
        text-align: center;
    }

    .hero-section img {
        margin-top: 30px;
    }

    .section-title {
        text-align: center;
    }

    .section-title::after {
        right: 50%;
        transform: translateX(50%);
    }
}

/* الشرائح */
.carousel-item {
    height: 500px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.carousel-caption {
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 10px;
    padding: 20px;
    bottom: 100px;
}

.carousel-caption h5 {
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
}

.carousel-caption p {
    font-size: 1.1rem;
    color: #f8f9fa;
}

/* بطاقات المنتجات والخدمات */
.card {
    border: none;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    background-color: #ffffff;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.card-img-top {
    height: 200px;
    object-fit: cover;
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.card-text {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 600;
    padding: 0.5rem 1.5rem;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--hover-color);
    border-color: var(--hover-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* الأقسام ذات الخلفية الداكنة */
.bg-dark {
    background-color: #1a1e21 !important;
}

.bg-dark .card-text,
.bg-dark p,
.bg-dark .address-details p {
    color: rgba(255, 255, 255, 0.9) !important;
}

.bg-dark .card-title,
.bg-dark h3,
.bg-dark h2,
.bg-dark .section-title {
    color: #ffffff !important;
}

.bg-primary {
    background-color: #0056b3 !important;
}

.bg-primary h2,
.bg-primary p {
    color: #ffffff !important;
}

.bg-light {
    background-color: #f0f2f5 !important;
}

.bg-light .card-text,
.bg-light p {
    color: #333333 !important;
}

.bg-light .card-title,
.bg-light h3,
.bg-light h2,
.bg-light .section-title {
    color: #212529 !important;
}

/* تحسين تباين الألوان للأزرار */
.btn-primary {
    background-color: #0056b3;
    border-color: #0056b3;
    color: #ffffff;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: #004494;
    border-color: #004494;
    color: #ffffff;
}

.btn-outline-light {
    border-color: #ffffff;
    color: #ffffff;
}

.btn-outline-light:hover,
.btn-outline-light:focus {
    background-color: #0056b3;
    border-color: #0056b3;
    color: #ffffff;
}

/* تحسين تباين الألوان للخرائط */
.map-popup h5 {
    color: #0056b3;
    font-weight: 700;
}

.map-popup p {
    color: #333333;
}

.leaflet-popup-content-wrapper {
    background-color: #ffffff;
}

/* تحسين تباين الألوان للأيقونات */
.feature-icon {
    background-color: #0056b3;
    color: #ffffff;
}

.card-icon {
    background-color: #0056b3;
    color: #ffffff;
}

/* تحسين تباين الألوان للقائمة العلوية */
.navbar-dark {
    background-color: #0056b3 !important;
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.95);
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link:focus {
    color: #ffffff;
}

/* تخصيص للشاشات الصغيرة */
@media (max-width: 768px) {
    .hero {
        padding-top: 60px;
        padding-bottom: 60px;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
    }
}

/* زر العودة للأعلى */
.back-to-top {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 1000;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--dark-color);
}

/* تنسيق للصور في معرض الصور */
.modal-content {
    border: none;
    border-radius: 10px;
    overflow: hidden;
}

.modal-body {
    padding: 0;
}

.btn-close {
    background-color: white;
    opacity: 0.8;
    border-radius: 50%;
    padding: 10px;
    margin: 10px;
    z-index: 1050;
}

.btn-close:hover {
    opacity: 1;
}

/* معرض الصور */
.gallery-card {
    margin-bottom: 30px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 250px;
    position: relative;
    background-color: #fff;
}

.gallery-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
}

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

#gallery {
    background-color: #f0f2f5;
    padding: 60px 0;
}

#gallery .section-title {
    color: #212529;
    margin-bottom: 40px;
}

/* Modal للصور */
.modal-content {
    border: none;
    border-radius: 10px;
    overflow: hidden;
}

.modal-body {
    padding: 0;
}

.btn-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: white;
    border-radius: 50%;
    padding: 10px;
    z-index: 1050;
}

/* تنسيقات قسم لماذا تختارنا */
.feature-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    border-radius: 50%;
    background-color: #0d6efd;
    color: white;
    transition: all 0.3s ease;
}

.card:hover .feature-icon {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(13, 110, 253, 0.4);
}

.feature-details {
    height: 40px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.card:hover .feature-details {
    color: #0d6efd !important;
}

.card-text {
    color: #495057;
    font-weight: 500;
}

.card:hover .card-text {
    color: #0d6efd;
}

.card-title.h5 {
    font-weight: 700;
    color: #212529;
    transition: all 0.3s ease;
}

.card:hover .card-title.h5 {
    color: #0d6efd;
}

/* تنسيقات خاصة بالخرائط */
.map-container {
    width: 100%;
    height: 250px;
    margin: 20px 0;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.map-display {
    width: 100%;
    height: 250px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    z-index: 1;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

.map-display:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* تنسيقات النافذة المنبثقة للخريطة */
.map-popup {
    text-align: center;
    direction: rtl;
    font-family: 'Cairo', sans-serif;
}

.map-popup h5 {
    margin-bottom: 5px;
    font-weight: 700;
    color: #0d6efd;
}

.map-popup p {
    margin-bottom: 10px;
    font-size: 14px;
}

.leaflet-popup-content-wrapper {
    border-radius: 8px;
    direction: rtl;
    text-align: center;
}

.leaflet-popup-content {
    margin: 10px;
    min-width: 200px;
}

.leaflet-container {
    font-family: 'Cairo', sans-serif !important;
}

/* تذييل الصفحة */
footer {
    background-color: var(--dark-color);
    color: white;
}

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

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