﻿/* ==========================================
   الشركة الألمانية - CSS الموحد والمستقر (معدل بدون تداخل)
   ========================================== */
:root {
    /* الألوان الجديدة المتناسقة مع اللوجو الأحمر الداكن */
    --primary-color: #8B0000;       /* أحمر عنابي غامق يطابق اللوجو */
    --primary-hover: #A52A2A;       /* أحمر عند التمرير بالماوس */
    --dark-color: #1F2937;          /* رمادي غامق للنصوص بدلاً من الأسود الصريح */
    --light-bg: #F9FAFB;            /* خلفية فاتحة ومريحة للعين */
    --white: #FFFFFF;
    --border-color: #E5E7EB;
    
    /* ألوان التواصل */
    --whatsapp-color: #25D366;
    
    /* التناسق والخطوط */
    --font-main: 'Cairo', sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    color: var(--dark-color);
    background-color: var(--white);
    line-height: 1.6;
    direction: rtl;
    text-align: right;
    margin: 0;
    padding: 0;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --- COMPANY BAR --- */
.company-bar {
    background-color: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 6px 10px;
    font-size: 0.85rem;
    font-weight: 700;
}

/* --- HEADER & NAVIGATION FIX --- */
.main-header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    overflow: visible !important;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* تمنع تداخل العناصر إذا ضاقت الشاشة */
    gap: 15px;
    overflow: visible !important;
}

.nav-links {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
    overflow: visible !important;
}

.nav-links > a, 
.dropdown > a {
    display: inline-flex;
    align-items: center;
    padding: 10px 8px;
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 700;
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

/* DROPDOWN MENU */
.dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #ffffff;
    min-width: 240px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    z-index: 99999;
    padding: 8px 0;
    list-style: none;
    margin: 0;
    border: 1px solid #e0e0e0;
}

.dropdown-menu::before {
    content: "";
    position: absolute;
    top: -20px;
    left: 0;
    right: 0;
    height: 20px;
    background: transparent;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li {
    width: 100%;
    margin: 0;
}

.dropdown-menu li a {
    color: var(--dark-color) !important;
    padding: 10px 18px;
    display: block;
    text-decoration: none;
    font-size: 14px;
    text-align: right;
    white-space: nowrap;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.dropdown-menu li a:hover {
    background-color: var(--light-bg);
    color: var(--primary-color) !important;
}

/* --- HERO BANNER & SLIDER --- */
.hero-section {
    background-color: var(--dark-color);
    color: var(--white);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px 20px;
    min-height: 220px;
}

/* حاوية السلايدر الرئيسية */
.hero-slider-section {
    position: relative;
    width: 100%;
    overflow: hidden;
    background-color: #111; /* لون احتيافي لو الصورة اتأخرت في التحميل */
}

/* المسار اللي بيحرك الشرايح بجانب بعضها */
.slide-track {
    display: flex;
    width: 100%;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

/* الشريحة الوافدة (تأخذ عرض الشاشة بالكامل) */
/* إعدادات الشرايح الأساسية مع تفعيل الخلفيات المتدرجة الفخمة */
.slide-item {
    min-width: 100%;
    width: 100%;
    flex-shrink: 0;
    box-sizing: border-box;
    min-height: 550px;
    display: flex;
    align-items: center;
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* الألوان الهندسية المتدرجة لكل شريحة */
.slide1 {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
}

.slide2 {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%) !important;
}

.slide3 {
    background: linear-gradient(135deg, #0f172a 0%, #0f172a 100%) !important;
}

/* حاوية المحتوى والكلام داخل السلايدر */
.hero-container-slider {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    z-index: 2;
}

.hero-content-slider {
    color: #ffffff;
    max-width: 700px;
}

.hero-content-slider h1, 
.hero-content-slider h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #ffffff;
}

.hero-content-slider p {
    font-size: 1.15rem;
    margin-bottom: 30px;
    line-height: 1.6;
    color: #f1f1f1;
}

/* تنسيق أسهم السلايدر والنقاط عشان تظهر فوق المحتوى بوضوح */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 12px 16px;
    cursor: pointer;
    z-index: 10;
    border-radius: 4px;
    font-size: 18px;
    transition: background 0.3s;
}

.slider-arrow:hover {
    background-color: var(--primary-color, #007bff);
}

.prev-btn { right: 20px; } /* بحكم الـ RTL السهم اليمين للرجوع */
.next-btn { left: 20px; }  /* السهم الشمال للتقدم */

.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.slider-dots .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.3s;
}

.slider-dots .dot.active {
    background-color: #ffffff;
    width: 30px;
    border-radius: 6px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.3s, width 0.3s;
}

.dot.active {
    background: var(--primary-color);
    width: 30px;
    border-radius: 10px;
}

/* ================= SERVICES SECTION GRID FIX (حل تداخل خدمات جميع الصفحات) ================= */
.services-section {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.section-title {
    text-align: center;
    margin-bottom: 35px;
}

.section-title h2 {
    font-size: 26px;
    color: var(--dark-color);
    margin-bottom: 8px;
}

.section-title p {
    color: #6c757d;
    font-size: 15px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 كروت متساوية متراصة في شاشات الكمبيوتر */
    gap: 25px;
    margin-bottom: 40px;
}

.service-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.03);
    height: 100%;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    border-color: var(--primary-color);
}

.service-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.service-card-body {
    padding: 20px;
    text-align: center;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-card-body h3 {
    font-size: 18px;
    color: var(--dark-color);
    margin: 0;
}

/* ================= INSECTS SERVICES GRID ================= */
.insects-grid-section {
    padding: 50px 20px;
    background-color: #f9fbfd;
}

.insects-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.insect-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 25px 20px;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.03);
}

.insect-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    border-color: var(--primary-color);
}

.insect-icon {
    width: 60px;
    height: 60px;
    background-color: #eef5ff;
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin-bottom: 15px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.insect-card:hover .insect-icon {
    background-color: var(--primary-color);
    color: #ffffff;
}

.insect-card h3 {
    font-size: 19px;
    margin-bottom: 8px;
    color: #1e293b;
}

.insect-card p {
    font-size: 13.5px;
    color: #64748b;
    line-height: 1.5;
    margin: 0;
}

/* --- ABOUT SECTION --- */
.about-section {
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

/* ==========================================
   BLOG & PAGINATION STYLING (المدونة والتنقل)
   ========================================== */
.blog-section {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 أعمدة في الشاشات الكبيرة */
    gap: 30px;
    margin-bottom: 40px;
}

.article-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 6px rgba(0,0,0,0.03);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    border-color: var(--primary-color);
}

.article-img-link {
    display: block;
    overflow: hidden;
}

.article-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-card:hover img {
    transform: scale(1.03);
}

.article-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.article-meta {
    font-size: 0.82rem;
    color: #6c757d;
    margin-bottom: 12px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.article-meta i {
    color: var(--primary-color);
    margin-left: 4px;
}

.article-card h3 {
    font-size: 1.15rem;
    line-height: 1.4;
    margin-bottom: 10px;
}

.article-card h3 a {
    color: var(--dark-color);
    transition: color 0.2s ease;
}

.article-card h3 a:hover {
    color: var(--primary-color);
}

.article-card p {
    font-size: 0.92rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.read-more {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    transition: gap 0.2s ease;
}

.article-card:hover .read-more {
    gap: 10px;
}

/* ================= PAGINATION (عداد التنقل) ================= */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 50px;
    flex-wrap: wrap;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    background-color: var(--white);
    color: var(--dark-color);
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.page-link:hover:not(.disabled) {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.page-link.active {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.page-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #f1f1f1;
}

/* ================= BLOG MEDIA QUERIES ================= */
@media (max-width: 992px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr); /* كارتين في الصف للشاشات المتوسطة */
    }
}

@media (max-width: 576px) {
    .blog-grid {
        grid-template-columns: 1fr; /* كارت واحد في الصف للموبايل */
    }
    .pagination {
        gap: 5px;
    }
    .page-link {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
}

/* --- CTA BUTTONS & FOOTER --- */
.cta-section {
    background-color: var(--dark-color);
    color: var(--white);
    text-align: center;
    padding: 50px 20px;
}

.cta-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

.btn-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.btn-cta.btn-wa {
    background-color: #25d366 !important;
    color: #ffffff !important;
    border: 2px solid #25d366;
}

.btn-cta.btn-wa:hover {
    background-color: #1ebc57 !important;
    border-color: #1ebc57;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(37, 211, 102, 0.3);
}

.btn-cta.btn-call {
    background-color: var(--primary-color) !important;
    color: #ffffff !important;
    border: 2px solid var(--primary-color);
}

.btn-cta.btn-call:hover {
    background-color: var(--primary-hover) !important;
    transform: translateY(-2px);
}

footer {
    background-color: #111;
    color: #aaa;
    text-align: center;
    padding: 20px;
    font-size: 0.9rem;
}

/* ================= RESPONSIVE MEDIA QUERIES ================= */
@media (max-width: 992px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .insects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .about-section {
        grid-template-columns: 1fr;
    }
    .hero-content-slider h1 { font-size: 1.7rem; }
    .hero-content-slider p { font-size: 0.95rem; }
    .slider-arrow { width: 35px; height: 35px; font-size: 1rem; }
}

@media (max-width: 576px) {
    .services-grid,
    .insects-grid {
        grid-template-columns: 1fr; /* كارت واحد بالشاشة على الموبايل */
    }
}
/* إجبار الخلفيات والمتدرجات تظهر فوراً وتلغي أي صور قديمة */
.hero-slider-section .slide-item.slide1 {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
    background-image: none !important;
}

.hero-slider-section .slide-item.slide2 {
    background: linear-gradient(135deg, #1e293b 100%, #334155 0%) !important;
    background-image: none !important;
}

.hero-slider-section .slide-item.slide3 {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
    background-image: none !important;
}

/* إظهار زر القائمة في الشاشات الصغيرة فقط */
@media (max-width: 992px) {
    .menu-toggle {
        display: block !important;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #ffffff;
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        display: none !important; /* مخفية افتراضياً حتى يتم النقر */
        z-index: 1000;
    }

    .nav-links.mobile-active {
        display: flex !important; /* تظهر عند تفعيل الكلاس */
    }

    .nav-links a {
        padding: 10px 0;
        width: 100%;
        border-bottom: 1px solid #f1f5f9;
    }
}

/* على الشاشات الكبيرة الكمبيوتر تظهر القائمة طبيعية ويختفي الزر */
@media (min-width: 993px) {
    .menu-toggle {
        display: none !important;
    }
    .nav-links {
        display: flex !important;
        align-items: center;
        gap: 20px;
    }
}