/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* General Styles */
body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background-color: #f5f5f5;
}

/* Navigation Bar */
.navbar {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 40px;
    background-color: rgba(0, 0, 0, 0.8);
    color: #ffffff;
    height: 100px;
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.1);
    position: relative;
}

.navbar .logo {
    position: absolute;
    left: 20px;
    display: flex;
    align-items: center;
}

.navbar .logo img {
    width: 90px;
    margin-right: 10px;
}

.navbar ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 0;
    padding: 0;
}

.nav-links li a {
    color: white;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: bold;
    position: relative;
    transition: color 0.3s ease;
}

.nav-links li a::after {
    content: "";
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 4px;
    background-color: white;
    transition: width 0.3s ease;
}

.nav-links li a:hover::after {
    width: 100%;
}

.nav-links li a:hover {
    color: #009385;
}

/* Sections */
section {
    padding: 0px;
    text-align: center;
}

.section-title h2 {
    font-size: 2.5rem;
    color: #009385;
    margin-bottom: 20px;
}

/* Accueil Section */
.acceuil {
    position: relative;
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    font-size: 1.5rem;
}

.acceuil .moving-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 100%;
    display: flex;
    animation: moveBackground 20s linear infinite alternate;
    z-index: -1;
}

.acceuil .moving-background img {
    width: 100vw;
    height: 100%;
    object-fit: cover;
}

@keyframes moveBackground {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

.acceuil .content {
    z-index: 1;
    padding: 20px;
}

/* Services Section */
.services {
    background-color: #ffffff;
}

.services-content {
    display: flex;
    justify-content: space-around;
    gap: 20px;
    flex-wrap: wrap;
}

.service {
    max-width: 300px;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.service:hover {
    transform: translateY(-5px);
}

.service h3 {
    font-size: 1.5rem;
    color: #009385;
    margin-bottom: 100px;
}

.service p {
    font-size: 1rem;
    color: #666;
}

/* About Section */
.about {
    background-color: #f5f5f5;
}

.about-content p {
    max-width: 600px;
    margin: 0 auto;
    color: #333;
    font-size: 1rem;
    line-height: 1.8;
}

/* Contact Section */
.contact {
    padding: 50px 20px;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('images/bandeau.jpg') no-repeat center center/cover;    color: white;
    display: flex;
    flex-direction: column;
    align-items: right;
    text-align: center;
}

.contact-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    max-width: 1200px;
    width: 100%;
    gap: 20px;
}

.contact-info {
    flex: 1;
    max-width: 350px;
    text-align: left;
    margin: 0;
    padding: 30px 20px;
}

.contact-info h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.contact-info ul {
    list-style: none;
    padding: 0;
    line-height: 1.8;
}

.contact-info li {
    margin-bottom: 10px;
}

.contact-form button:hover {
    background-color: #007c63;
}

.contact-map {
    flex: 1;
    max-width: 350px;
}

/* Footer */
.footer {
    background-color: #333333;
    color: #ffffff;
    text-align: center;
    padding: 20px 0;
}

.footer-content p {
    margin: 0;
}

.footer-content a {
    color: #009385;
    text-decoration: none;
}

.footer-content a:hover {
    text-decoration: underline;
}

/* Map Modal */
.map-button {
    margin-top: 20px;
    padding: 10px 20px;
    background-color: #009385;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.map-button:hover {
    background-color: #00695c;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
}

.modal-content iframe {
    width: 100%;
    height: 400px;
    border: none;
}

.close {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 2rem;
    color: #333;
    cursor: pointer;
}

/* Responsive Styles */
@media (max-width: 200px) {
    .navbar ul {
        flex-direction: column;
        background-color: #009385;
        position: absolute;
        top: 60px;
        left: -100%;
        width: 100%;
        transition: left 0.3s;
        padding: 20px;
    }
    .navbar ul.active {
        left: 0;
    }
    .hero h1 {
        font-size: 2rem;
    }
    .hero p {
        font-size: 1.25rem;
    }
    .services-content {
        flex-direction: column;
        align-items: center;
    }
    .service {
        width: 100%;
        margin-bottom: 20px;
    }
}

/* Gallery Section */
.gallery-section {
    padding: 40px 20px;
    text-align: center;
    background-color: #f5f5f5;
}

.gallery-section h2 {
    font-size: 2rem;
    color: #009385;
    margin-bottom: 40px;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 50px;
    justify-items: center;
    padding: 20px;
}

.gallery-item {
    position: center;
    overflow: hidden;
    height: 300px;
    width: 300px;
    border-radius: 40px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.gallery-item:hover {
    transform: scale(1.05);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.gallery-item {
    text-align: center;
    margin: 15px;
}

.product-price {
    font-size: 1.2em;
    font-weight: bold;
    color: #009385;
    margin-top: 10px;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.lightbox-img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 10px;
}

.lightbox .close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 2rem;
    color: white;
    cursor: pointer;
}

/* Mobile Responsiveness */
@media (max-width: 100%) {
    .gallery {
        grid-template-columns: repeat(auto-fit, minmax(50px, 20%));
    }
}

#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
}

.acceuil .content h1 {
    font-size: 4rem;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 20px;
}

/* Search Bar */
.search-bar {
    display: flex;
    align-items: center;
    position: absolute;
    right: 20px;
    background-color: #ffffff;
    border-radius: 20px;
    padding: 5px 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.search-input {
    border: none;
    outline: none;
    background: transparent;
    color: #333;
    font-size: 1rem;
    padding: 5px;
    width: 150px;
    margin-right: 5px;
}

.search-button {
    background: none;
    border: none;
    cursor: pointer;
    color: #009385;
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.search-button:hover {
    color: #00695c;
}

/* Highlighted Text */
.highlight {
    background-color: rgb(0, 247, 255);
    transition: background-color 0.3s ease;
}

/* Typed Text */
#typed-text {
    font-size: 2.5rem;
    font-weight: bold;
    color: white;
    margin-bottom: 20px;
}

/* Gallery Image Hover Effect */
.gallery-item img {
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* Map Button Hover Effect */
.map-button:hover {
    background-color: #007c63;
}

/* Sticky Navigation Bar */
.navbar {
    position: sticky;
    top: 0;
    z-index: 999;
    transition: background-color 0.3s ease;
}

.navbar.scrolled {
    background-color: rgba(0, 0, 0, 0.9);
}

/* Responsive Design */
@media (max-width: 768px) {
    .services-content {
        flex-direction: column;
        align-items: center;
    }
    .search-bar {
        right: 10px;
    }
}

/* Clients Section */
#nos-clients {
    padding: 60px 0;
    background-color: #f7f7f7;
    position: relative;
}

#nos-clients .section-title {
    text-align: center;
    font-size: 30px;
    margin-bottom: 40px;
    font-weight: bold;
    color: #333;
}

.client-list {
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: auto;
    padding: 10px 0;
    scroll-behavior: smooth;
}

.client-item {
    margin: 0 20px;
}

.client-item img {
    max-width: 150px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.client-item img:hover {
    transform: scale(1.1);
}

/* Products Section */
.products-section {
    padding: 50px 20px;
    background-color: #f9f9f9;
    text-align: center;
}

.products-section h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #009385;
}

.products-section .gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    justify-items: center;
    padding: 20px;
}

.products-section .gallery-item {
    width: 100%;
    max-width: 250px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease-in-out;
}

.products-section .gallery-item:hover {
    transform: translateY(-5px);
}

.products-section .gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px 10px 0 0;
}

.products-section .product-details {
    padding: 15px;
    text-align: center;
}

.products-section .product-details h3 {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 10px;
}

.products-section .product-price {
    font-size: 1rem;
    color: #009385;
    font-weight: bold;
}

/* Lightbox Styles */
#product-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

#product-lightbox .lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#product-lightbox .lightbox-main-img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5);
}

#product-lightbox .close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 2rem;
    color: white;
    cursor: pointer;
    transition: color 0.3s ease-in-out;
}

#product-lightbox .close:hover {
    color: #ff0000;
}

#product-lightbox .prev,
#product-lightbox .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: background-color 0.3s ease-in-out;
}

#product-lightbox .prev:hover,
#product-lightbox .next:hover {
    background-color: rgba(255, 255, 255, 0.8);
    color: #000;
}

#product-lightbox .prev {
    left: 20px;
}

#product-lightbox .next {
    right: 20px;
}
/* تنسيق صفحة التطبيقات */
.applications-page {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow-y: auto;
}

.applications-page h2 {
    color: white;
    margin-bottom: 20px;
    text-align: center;
}

.applications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    width: 30%;
    max-width: 1200px;
}

.application-item {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.application-item:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.application-item p {
    padding: 10px;
    font-size: 1.2rem;
    color: #333;
    margin: 0;
}

.phone-frame {
    position: relative;
    width: 100%;
    height: 250px;
    background: #f0f0f0;
    border-radius: 20px;
    padding: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
}

.phone-frame img {
    width: 90%;
    height: 90%;
    object-fit: contain;
}

/* تنسيق صفحة تفاصيل التطبيق */
#app-details {
    display: none; /* يتم تغييره إلى flex عند الفتح */
    position: fixed;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    margin: 20;
    padding: 20px;
    overflow-y: auto;
}

#app-details .lightbox-content {
    padding: 10;
    margin: 20;
    text-align: center;
}

#app-details .app-intro h2 {
    font-size: 2.5rem;
    color: #ffffff;
    margin-top: 10px;
}

#app-details .app-intro p {
    font-size: 1.2rem;
    color: #ffffff;
    line-height: 1.6;
}

/* تنسيق قسم الصور مع النص */
#app-details .app-gallery {
    margin: 40;
}

#app-details .app-gallery h3 {
    font-size: 2rem;
    color: #ffffff;
    margin-bottom: 20px;
}

#app-details .app-gallery .gallery-grid {
    display: flex;
    flex-direction: column;
    margin: 20;
}

#app-details .app-gallery .gallery-item {
    width: 100%;
    display: flex;
    border-radius: 0%;
    gap: 40px; /* زيادة المسافة بين الصورة والنص */
}

#app-details .app-gallery .gallery-image {
    height: auto;
    display: block;
    object-fit: contain; /* الحفاظ على نسبة العرض إلى الارتفاع */
}

#app-details .app-gallery .gallery-text {
    text-align: right; /* محاذاة النص إلى اليمين */
}

#app-details .app-gallery .gallery-text h4 {
    font-size: 1.8rem;
    color: #ffffff;
    margin-bottom: 15px;
}

#app-details .app-gallery .gallery-text p {
    font-size: 1.1rem;
    color: #ffffff;
    line-height: 1.6;
}

/* زر الإغلاق */
#app-details .close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2rem;
    color: white;
    cursor: pointer;
    transition: color 0.3s;
}

#app-details .close:hover {
    color: #ff0000;
}
/* تنسيق صفحة تفاصيل التطبيق */
#app-details {
    display: none; /* يتم تغييره إلى flex عند الفتح */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow-y: auto;
    z-index: 1000; /* للتأكد من ظهورها فوق كل العناصر */
}

#app-details .lightbox-content {
    padding: 20px;
    margin: 0 auto;
    text-align: center;
    max-width: 1200px; /* لمنع توسع المحتوى بشكل مفرط */
}

#app-details .app-intro h2 {
    font-size: 2.5rem;
    color: #ffffff;
    margin-top: 10px;
}

#app-details .app-intro p {
    font-size: 1.2rem;
    color: #ffffff;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* تنسيق قسم الصور مع النص */
#app-details .app-gallery {
    margin: 40px 0;
}

#app-details .app-gallery h3 {
    font-size: 2rem;
    color: #ffffff;
    margin-bottom: 20px;
}

#app-details .app-gallery .gallery-grid {
    display: flex;
    flex-direction: column;
    gap: 40px; /* زيادة المسافة بين العناصر */
    margin: 0 auto;
    width: 100%;
}

#app-details .app-gallery .gallery-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 40px; /* المسافة بين الصورة والنص */
    background-color: rgba(255, 255, 255, 0.1); /* خلفية فاتحة للعناصر */
    padding: 20px;
    border-radius: 10px; /* زوايا مدورة */
    margin-bottom: 20px; /* إضافة مسافة بين العناصر */
}

#app-details .app-gallery .gallery-image {
    max-width: 300px; /* تحديد عرض الصورة */
    height: 200px; /* ارتفاع ثابت للصور */
    display: block;
    object-fit: contain; /* تغيير object-fit إلى cover لجعل الصورة تملأ المساحة بشكل أفضل */
    border-radius: 10px; /* زوايا مدورة للصور */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* إضافة ظل للصور */
}

#app-details .app-gallery .gallery-text {
    text-align: right; /* محاذاة النص إلى اليمين */
    flex: 1; /* لجعل النص يأخذ المساحة المتبقية */
}

#app-details .app-gallery .gallery-text h4 {
    font-size: 1.8rem;
    color: #ffffff;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); /* إضافة ظل للنص */
}

#app-details .app-gallery .gallery-text p {
    font-size: 1.1rem;
    color: #ffffff;
    line-height: 1.6;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); /* إضافة ظل للنص */
}

/* زر الإغلاق */
#app-details .close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2rem;
    color: white;
    cursor: pointer;
    transition: color 0.3s;
}

#app-details .close:hover {
    color: #ff0000;
}
/* Media Queries للهواتف */
@media (max-width: 768px) {
    /* شريط التنقل */
    .navbar {
        flex-direction: column;
        height: auto;
        padding: 10px;
    }

    .navbar .logo {
        position: static;
        margin-bottom: 10px;
    }

    .navbar ul {
        flex-direction: column;
        gap: 10px;
    }

    .nav-links li a {
        font-size: 1rem;
    }

    .search-bar {
        position: static;
        margin-top: 10px;
        width: 100%;
    }

    .search-input {
        width: 100%;
    }

    /* قسم الترحيب */
    .acceuil {
        height: auto;
        padding: 20px;
    }

    .acceuil .content h1 {
        font-size: 2rem;
    }

    .acceuil .content p {
        font-size: 1rem;
    }

    .acceuil .moving-background {
        width: 300%;
        animation: moveBackground 30s linear infinite alternate;
    }

    /* قسم الخدمات */
    .services-content {
        flex-direction: column;
        align-items: center;
    }

    .service {
        width: 100%;
        margin-bottom: 20px;
    }

    /* قسم المعرض */
    .gallery {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 10px;
    }

    .gallery-item {
        width: 100%;
        height: auto;
    }

    /* قسم المنتجات */
    .products-section .gallery {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 10px;
    }

    .products-section .gallery-item {
        width: 100%;
    }

    /* قسم العملاء */
    .client-list {
        flex-direction: column;
        align-items: center;
    }

    .client-item {
        margin: 10px 0;
    }

    /* قسم الاتصال */
    .contact-container {
        flex-direction: column;
        align-items: center;
    }

    .contact-info {
        text-align: center;
    }

    .contact-map {
        width: 100%;
        margin-top: 20px;
    }

    .contact-map iframe {
        width: 100%;
        height: 300px;
    }

    /* Lightbox */
    .lightbox-img, .lightbox-main-img {
        max-width: 90%;
        max-height: 90%;
    }

    /* صفحة التطبيقات */
    .applications-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 10px;
    }

    .application-item {
        width: 100%;
    }

    /* صفحة تفاصيل التطبيق */
    #app-details .gallery-item {
        flex-direction: column;
        gap: 20px;
    }

    #app-details .gallery-image {
        max-width: 100%;
        height: auto;
    }

    #app-details .gallery-text {
        text-align: center;
    }
}