/* ==========================================
   Polymex - Main Stylesheet
   ========================================== */

/* إعدادات عامة */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header & Navbar */
header {
    background-color: #1e293b;
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo span {
    font-size: 24px;
    font-weight: bold;
    color: #38bdf8;
    letter-spacing: 1px;
}

.nav-menu {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-menu a {
    color: #fff;
    text-decoration: none;
    font-size: 15px;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: #38bdf8;
}

.lang-btn {
    background-color: #38bdf8;
    color: #1e293b !important;
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: bold;
}

.menu-toggle {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: #fff;
    transition: 0.3s;
}

/* ==========================================
   Carousel Section (التعديل الجديد والمضبوط)
   ========================================== */
.carousel-container {
    position: relative;
    width: 100%;
    height: 500px; /* ارتفاع ثابت ومحدد لمنع تداخل المقاسات */
    overflow: hidden;
    background-color: #f9f9f9;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out; /* تلاشي لمدة ثانية واحدة */
    display: flex;
    justify-content: flex-start; /* محاذاة لليسار */
}

.carousel-slide.active {
    opacity: 1;
    z-index: 2;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: left; /* محاذاة محتوى الصورة نحو اليسار حصراً */
}

/* إخفاء أسهم التنقل نهائياً */
.carousel-prev, .carousel-next {
    display: none !important;
}

/* Sections General */
.section {
    padding: 60px 0;
}

.bg-light {
    background-color: #f8fafc;
}

.section-title {
    font-size: 28px;
    margin-bottom: 25px;
    color: #1e293b;
    text-align: center;
}

.intro-box p, .section p {
    margin-bottom: 15px;
    color: #475569;
}

.styled-list {
    margin: 15px 20px;
    color: #475569;
}

.styled-list li {
    margin-bottom: 8px;
}

/* Cards Grid */
.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

.card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
}

.card h3 {
    color: #0284c7;
    margin-bottom: 8px;
}

/* Partners Badges */
.partner-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.badge {
    background-color: #e0f2fe;
    color: #0369a1;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
}

/* Vision & Mission */
.vision-mission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.vm-box {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border-top: 4px solid #0284c7;
}

.vm-box h3 {
    color: #1e293b;
    margin-bottom: 12px;
}

/* Gallery Section */
.text-center {
    text-align: center;
}

.image-grid-2x3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.img-frame {
    background: #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.placeholder-box {
    width: 300px;
    height: 300px;
    background: #cbd5e1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #475569;
    font-weight: bold;
    border-radius: 6px;
}

.placeholder-box .dimensions {
    font-size: 14px;
    opacity: 0.7;
    margin-bottom: 5px;
}

/* Contact Section */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.contact-card {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
}

.contact-card h3, .contact-card h4 {
    color: #1e293b;
    margin-bottom: 12px;
}

.contact-card hr {
    border: 0;
    border-top: 1px solid #e2e8f0;
    margin: 15px 0;
}

.contact-card p {
    margin-bottom: 10px;
}

.contact-card a {
    color: #0284c7;
    text-decoration: none;
}

.contact-card a:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    background-color: #0f172a;
    color: #94a3b8;
    text-align: center;
    padding: 25px 0;
    font-size: 14px;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    left: 20px; /* تعديل ليتناسب مع الجهتين أو اليمين حسب الرغبة */
    background-color: #0284c7;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: background 0.3s;
    z-index: 999;
}

.back-to-top:hover {
    background-color: #0369a1;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .carousel-container {
        height: 250px; /* تقليل ارتفاع الكاروسيل على الموبايل */
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #1e293b;
        padding: 20px 0;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    }

    .nav-menu.active {
        display: flex;
    }

    .menu-toggle {
        display: flex;
    }
}
<!-- تأثيرات الحركة والـ Hover (يمكنك وضعها داخل ملف style.css أو هنا) -->
<style>
    .product-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 20px rgba(0,0,0,0.15) !important;
    }
    .product-card:hover img {
        transform: scale(1.1);
    }
    .product-card:hover h3 {
        color: #38bdf8 !important;
    }
    /* الاستجابة للشاشات الصغيرة لتصبح عمود واحد أو عمودين */
    @media (max-width: 768px) {
        #products .grid-cards {
            grid-template-columns: 1fr !important;
        }
    }
</style>