/* إعدادات أساسية */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* قاعدة أمان الصور */
img {
    max-width: 100%;
    height: auto !important;
}

/* زر العودة للرئيسية */
.back-to-home {
    position: fixed;
    top: 60px;
    right: 20px;
    background-color: #3498db;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    text-decoration: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    transition: all 0.3s ease;
}

.back-to-home:hover {
    background-color: #2980b9;
    transform: scale(1.1);
}

/* شريط التنقل */
.main-nav {
    background-color: #2c3e50;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 999;
}

.main-nav ul {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    list-style: none;
    gap: 20px;
}

.main-nav a {
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.main-nav a:hover {
    background-color: #3498db;
}

/* رأس الصفحة */
.header-image {
    width: 100%;
    height: auto;
    display: block;
}

/* العناوين الرئيسية */
h1,
h2,
h3 {
    color: #2c3e50;
    margin: 20px 0;
    text-align: center;
}

h1 {
    font-size: 2.5rem;
    padding: 20px;
    background-color: #ecf0f1;
}

h2 {
    font-size: 2rem;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
    margin-top: 40px;
}

/* معرض الصور */
.gallery-section {
    padding: 40px 20px;
    background-color: white;
    margin: 20px 0;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.gallery-item {
    background-color: #f9f9f9;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    position: relative;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

/* الأيقونات الصغيرة في الزاوية */
.image-icons {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    gap: 8px;
    z-index: 2;
}

.icon-btn {
    background-color: rgba(255, 255, 255, 0.9);
    color: #333;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.icon-btn:hover {
    background-color: white;
    transform: scale(1.1);
}

.icon-btn.phone {
    color: #3498db;
}

.icon-btn.whatsapp {
    color: #25D366;
}

.image-title {
    position: absolute;
    bottom: 10px;
    right: 180px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    max-width: 80%;
}

/* شريط أدوات التطوير */
.dev-tools-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: #202124;
    color: white;
    padding: 8px 15px;
    font-size: 12px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 9999;
    border-bottom: 1px solid #3c4043;
}

.dev-tools-left,
.dev-tools-center,
.dev-tools-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.dev-select {
    background-color: #3c4043;
    color: white;
    border: 1px solid #5f6368;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 11px;
}

.dev-tab {
    color: #9aa0a6;
    font-size: 11px;
}

.dev-active-tab {
    color: white;
    border-bottom: 2px solid #8ab4f8;
    padding-bottom: 2px;
}

.dev-switch {
    color: #8ab4f8;
    font-size: 11px;
    cursor: pointer;
}

/* التذييل */
footer {
    background-color: #1a252f;
    color: white;
    padding: 40px 20px;
    text-align: center;
    margin-top: 40px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.copyright {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #95a5a6;
}

/* زر الاتصال العائم */
.floating-phone {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background-color: #2ecc71;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transition: all 0.3s ease;
}

.floating-phone:hover {
    background-color: #27ae60;
    transform: scale(1.1);
}

/* مساحة المحتوى الرئيسي */
.main-content {
    margin-top: 40px;
}

/* وسائط الاستجابة */
@media (max-width: 768px) {
    .main-nav ul {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .back-to-home {
        top: 50px;
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .dev-tools-bar {
        flex-direction: column;
        height: auto;
        padding: 5px;
    }

    .dev-tools-left,
    .dev-tools-center,
    .dev-tools-right {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .icon-btn {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .gallery-item img {
        height: 200px;
    }

    .image-title {
        font-size: 12px;
        padding: 6px 10px;
    }
}

/* زر شجرة التنقل تحت زر الرئيسية */
.nav-tree-btn {
    position: fixed;
    top: 120px;
    right: 20px;
    background-color: #e74c3c;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.nav-tree-btn:hover {
    background-color: #c0392b;
    transform: scale(1.1);
}

/* شجرة التنقل */
#navTree {
    display: none;
    position: fixed;
    top: 180px;
    right: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    padding: 20px;
    z-index: 1002;
    width: 300px;
    max-height: 400px;
    overflow-y: auto;
    direction: rtl;
}

#navTree.active {
    display: block;
}

#navTree h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
    text-align: center;
}

#navTree ul {
    list-style: none;
    padding: 0;
}

#navTree li {
    margin-bottom: 10px;
}

#navTree a {
    color: #3498db;
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.3s;
    font-weight: bold;
}

#navTree a:hover {
    background-color: #f0f7ff;
    transform: translateX(-5px);
}

#navTree a i {
    margin-left: 10px;
    color: #3498db;
}

/* تجاوبية */
@media (max-width: 768px) {
    .nav-tree-btn {
        top: 105px;
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }

    #navTree {
        top: 160px;
        right: 15px;
        width: 280px;
    }
}

@media (max-width: 480px) {
    #navTree {
        width: 90%;
        right: 5%;
        left: 5%;
    }
}

/* أنيميشن للخلفية المتغيرة */
@keyframes slideChange {
    0% {
        opacity: 0;
    }

    33% {
        opacity: 0.15;
    }

    66% {
        opacity: 0;
    }

    100% {
        opacity: 0;
    }
}

/* إضافة أنماط للمقالات */
.article-content {
    padding: 20px;
    background: white;
    border-top: 3px solid #3498db;
    margin-top: 0;
}

.article-content h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.4rem;
    text-align: right;
    border-bottom: 2px solid #f1f1f1;
    padding-bottom: 10px;
}

.article-content p {
    color: #555;
    line-height: 1.8;
    margin-bottom: 20px;
    text-align: justify;
}

.specs {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
}

.specs h4 {
    color: #3498db;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.specs ul {
    padding-right: 20px;
    margin: 0;
}

.specs li {
    margin-bottom: 8px;
    color: #555;
    line-height: 1.5;
}

.gallery-item {
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
    .article-content h3 {
        font-size: 1.2rem;
    }

    .article-content {
        padding: 15px;
    }
}

.seo-articles-section article {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.seo-articles-section article:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
    .seo-articles-section {
        padding: 20px 10px;
    }

    .seo-articles-section h2 {
        font-size: 1.8rem;
    }

    .seo-articles-section article {
        padding: 25px 15px;
    }

    .seo-articles-section h3 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .seo-articles-section h2 {
        font-size: 1.5rem;
    }

    .seo-articles-section h3 {
        font-size: 1.3rem;
    }

    table {
        font-size: 0.8rem;
    }

    th,
    td {
        padding: 8px !important;
    }
}

@keyframes pulse-whatsapp {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}
