/* --- إعدادات عامة --- */
body {
    font-family: 'Roboto', sans-serif;
    background-color: #fff;
}

/* --- 1. الناف بار (الشريط العلوي) --- */
.navbar {
    background-image: linear-gradient(to right, #1955df, #22438a); 
    background-color: #1c52b5; /* لون احتياطي */
    padding: 10px 0;
}
.navbar-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
}
.nav-link {
    color: rgba(255,255,255,0.9) !important;
    font-size: 1rem;
    margin-left: 20px;
}
.nav-link:hover {
    color: #ffffff !important;
    text-decoration: underline;
}

/* --- 2. السلايدر الرئيسي (Hero Carousel) --- */
/* === HERO CAROUSEL RESPONSIVE FIX === */
#heroCarousel {
    width: 100%;
    overflow: hidden;
}

#heroCarousel .carousel-item {
    position: relative;
    width: 100%;
}



/* Image behavior */
#heroCarousel .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#heroCarousel .carousel-item img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    opacity: 1; 
}
#heroCarousel .carousel-caption {
    top: 50%;
    transform: translateY(-50%);
    bottom: initial;
    text-align: center;
    z-index: 2; /* رفع النص فوق طبقة التدرج */
}
.hero-title {
    font-size: 3.5rem;
    font-weight: 500;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
    text-transform: capitalize;
}

/* تنسيق التدرج (Overlay) فوق الصورة في السلايدر */
.carousel-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%; /* ارتفاع التدرج من الأسفل */
    /* التدرج: من الأزرق الشفاف (1c52b5) إلى الشفاف تماماً */
    /*background: linear-gradient(to top, rgba(28, 82, 181, 0.7) 0%, rgba(28, 82, 181, 0) 100%);*/
    z-index: 1; /* يظهر فوق الصورة (opacity: 0.7) */
}

/* --- 3. قسم الخدمات (Horizontal Scroll - التمرير الأفقي) --- */
.products-section {
    padding: 60px 0;
}

/* الحاوية التي ستسمح بالتمرير الأفقي */
.products-container {
    display: flex; 
    overflow-x: auto; 
    padding: 10px 0; 
    scroll-snap-type: x mandatory; 
    -webkit-overflow-scrolling: touch; 
}

/* تنسيق كل صندوق خدمة داخل التمرير */
.service-box {
    flex: 0 0 auto; 
    width: 14.28%; 
    text-align: center;
    padding: 15px 10px;
    scroll-snap-align: start; 
}

/* تنسيق الأيقونة (مخصص لـ icon-wrapper1 التي تستخدم صور) */
.icon-wrapper1 {
    width: 80px;
    height: 80px;
    /* تم إزالة الحدود والدائرة لتناسب استخدام الصور */
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px auto;
}
.service-title {
    color: #1c52b5;
    font-weight: 700;
    font-size: 1.1rem;
    margin-top: 10px;
}

/* --- 4. الفوتر (Footer) --- */
footer {
    background-color: #22448c;
    color: white;
    padding-top: 40px;
}
.footer-links a {
    color: #ddd;
    text-decoration: none;
    margin: 0 15px;
    font-size: 0.95rem;
}
.footer-links a:hover {
    color: white;
}
.footer-bottom {
    background-image: linear-gradient(to right, #22438a, #1955df); 
    background-color: #1e60cd;
    padding: 15px 0;
    margin-top: 30px;
    text-align: center;
    font-size: 0.9rem;
}
.scroll-top-btn {
    border: 2px solid white;
    border-radius: 5px;
    padding: 5px 12px;
    color: white;
    text-decoration: none;
    display: inline-block;
    transition: 0.3s;
}
.scroll-top-btn:hover {
    background-color: white;
    color: #263a57;
}

/* --- التجاوب مع الموبايل والأجهزة اللوحية --- */
@media (max-width: 992px) {
    .service-box {
        width: 25%;
    }
}
@media (max-width: 768px) {
    .hero-title { font-size: 2rem; }
    #heroCarousel .carousel-item { height: 50vh; }
    .footer-links {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin: 20px 0;
    }
}
@media (max-width: 576px) {
    .service-box {
        width: 33.3%;
    }
}


/* === Page Load Animation === */
.fade-load {
    opacity: 0;
    transform: translateY(25px);
    animation: fadeUp 0.9s ease-out forwards;
}

.fade-load.delay-1 { animation-delay: .2s; }
.fade-load.delay-2 { animation-delay: .4s; }
.fade-load.delay-3 { animation-delay: .6s; }

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.icon-active {
    transform: scale(1.12);
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.25));
    opacity: 1;
    transition: .3s ease;
}

.icon-wrapper1 img.icon-active {
    border-radius: 12px;
    background-color: rgba(28, 82, 181, 0.1); /* لمسة بسيطة من لونك */
    padding: 6px;
}

/* === Hover Animation for Icons === */
.icon-wrapper1 img {
    transition: transform .3s ease, filter .3s ease;
}

.icon-wrapper1:hover img {
    transform: scale(1.08);
    filter: drop-shadow(0 3px 6px rgba(0,0,0,0.25));
}


/* Desktop */
@media (min-width: 992px) {
    #heroCarousel .carousel-item {
        height: 90vh;
    }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 991px) {
    #heroCarousel .carousel-item {
        height: 65vh;
    }
}

/* Mobile */
@media (max-width: 767px) {
    #heroCarousel .carousel-item {
        height: 45vh;
    }

    #heroCarousel .carousel-item {
        height: 26vh;
    }

    #heroCarousel .carousel-item img {
        object-fit: cover;
        object-position: center center;
    }

    .products-section {
        padding: 10px 0;
    }    
        
}
