
/* قاعدة الأمان للصور - لحماية التصميم من تغيير الأبعاد */
img {
    max-width: 100%;
    height: auto !important;
}

/* إعدادات أساسية */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* زر العودة للرئيسية */
.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: 10px;
    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;
    }

    /* تحسين التجاوب للهواتف - محسن 101% */
    body {
        font-size: 16px;
        line-height: 1.5;
    }

    h1 {
        font-size: 1.8rem;
        padding: 15px;
    }

    h2 {
        font-size: 1.4rem;
        margin-top: 30px;
    }

    .gallery-section,
    .articles-section {
        padding: 25px 15px;
    }

    .article-box {
        padding: 20px;
    }

    .article-title {
        font-size: 1.3rem;
    }

    .floating-phone,
    .back-to-home,
    .nav-tree-btn {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .floating-phone {
        bottom: 25px;
        left: 25px;
    }

    .back-to-home {
        top: 55px;
        right: 15px;
    }

    .nav-tree-btn {
        top: 115px;
        right: 15px;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .gallery-item img {
        height: 200px;
    }

    .image-title {
        font-size: 12px;
        padding: 6px 10px;
    }

    /* تحسين إضافي للهواتف الصغيرة */
    h1 {
        font-size: 1.5rem;
        padding: 12px;
    }

    h2 {
        font-size: 1.2rem;
    }

    .article-box {
        padding: 15px;
    }

    .article-title {
        font-size: 1.1rem;
    }

    #navTree {
        width: 90%;
        right: 5%;
        left: 5%;
    }
}

/* زر شجرة التنقل تحت زر الرئيسية */
.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;
    }
}




@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);
    }
}





/* تنسيقات قسم المقالات */
.articles-section {
    padding: 40px 20px;
    background-color: white;
    margin: 20px 0;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.articles-section h2 {
    color: #2c3e50;
    font-size: 2rem;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid #3498db;
    text-align: center;
}

.articles-section h2 i {
    margin-left: 10px;
    color: #3498db;
}

.article-box {
    background-color: #f8f9fa;
    border-right: 4px solid #3498db;
    padding: 25px;
    margin: 30px 0;
    border-radius: 4px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.article-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.article-title {
    color: #2c3e50;
    font-size: 1.8rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
    line-height: 1.4;
}

.article-date {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.article-date i {
    color: #3498db;
}

.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
    text-align: justify;
    margin-bottom: 20px;
}

.article-content p {
    margin-bottom: 15px;
}

.article-subtitle {
    color: #2980b9;
    font-size: 1.3rem;
    margin: 20px 0 10px 0;
    padding-right: 10px;
    border-right: 3px solid #3498db;
}

.article-content ul {
    padding-right: 25px;
    margin-bottom: 20px;
}

.article-content li {
    color: #444;
    margin-bottom: 10px;
    padding-right: 5px;
    line-height: 1.6;
}

.article-content strong {
    color: #2c3e50;
}

.article-highlight {
    background-color: #ecf0f1;
    padding: 20px;
    border-right: 4px solid #2ecc71;
    margin: 20px 0;
    border-radius: 4px;
    font-style: italic;
    line-height: 1.7;
}

.article-highlight strong {
    color: #27ae60;
    display: block;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

/* تنسيقات الروابط داخل المقالات */
.article-content a {
    color: #3498db;
    text-decoration: none;
    border-bottom: 1px solid #3498db;
    transition: all 0.3s ease;
}

.article-content a:hover {
    color: #2980b9;
    border-bottom: 2px solid #2980b9;
}

/* تنسيقات للأرقام والقوائم المرقمة */
.article-content ol {
    padding-right: 25px;
    margin-bottom: 20px;
}

.article-content ol li {
    margin-bottom: 8px;
    padding-right: 5px;
}

/* تنسيقات للجداول داخل المقالات */
.article-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background-color: white;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.article-table th {
    background-color: #3498db;
    color: white;
    padding: 12px;
    text-align: right;
    font-weight: bold;
}

.article-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    text-align: right;
}

.article-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.article-table tr:hover {
    background-color: #f1f8ff;
}

/* تنسيقات للصور داخل المقالات */
.article-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    margin: 20px 0;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* تنسيقات للأقسام الفرعية */
.article-section {
    margin: 25px 0;
    padding: 20px;
    background-color: white;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
}

.article-section-title {
    color: #2c3e50;
    font-size: 1.4rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

/* تنسيقات للاقتباسات */
.article-quote {
    border-right: 3px solid #3498db;
    padding: 15px 20px;
    margin: 20px 0;
    background-color: #f8fafc;
    font-style: italic;
    line-height: 1.7;
    color: #555;
}

.article-quote-author {
    text-align: left;
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-top: 10px;
    font-style: normal;
}

/* تنسيقات للأزرار داخل المقالات */
.article-button {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 10px 25px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    margin: 15px 0;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.article-button:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(41, 128, 185, 0.3);
}

.article-button.secondary {
    background: #95a5a6;
}

.article-button.secondary:hover {
    background: #7f8c8d;
}

/* تنسيقات للتنقل بين المقالات */
.article-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.article-nav-link {
    color: #3498db;
    text-decoration: none;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.article-nav-link:hover {
    color: #2980b9;
    transform: translateX(-5px);
}

.article-nav-link.prev i {
    order: 1;
}

.article-nav-link.next i {
    order: -1;
}

/* تنسيقات للعلامات والتصنيفات */
.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.article-tag {
    background: #ecf0f1;
    color: #2c3e50;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.article-tag:hover {
    background: #3498db;
    color: white;
    transform: translateY(-2px);
}

/* تنسيقات للتعليقات */
.article-comments {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid #eee;
}

.article-comments-title {
    color: #2c3e50;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

/* تنسيقات للشريط الجانبي للمقالات */
.article-sidebar {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 4px;
    margin: 20px 0;
    border-right: 3px solid #3498db;
}

.article-sidebar-title {
    color: #2c3e50;
    font-size: 1.3rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

.article-sidebar ul {
    padding-right: 15px;
}

.article-sidebar li {
    margin-bottom: 10px;
    padding: 8px 0;
    border-bottom: 1px dashed #ddd;
}

.article-sidebar li:last-child {
    border-bottom: none;
}

/* تنسيقات للوسائط الاستجابة */
@media (max-width: 768px) {
    .articles-section {
        padding: 30px 15px;
    }

    .articles-section h2 {
        font-size: 1.6rem;
    }

    .article-box {
        padding: 20px;
        margin: 20px 0;
    }

    .article-title {
        font-size: 1.4rem;
    }

    .article-content {
        font-size: 1rem;
        text-align: right;
    }

    .article-subtitle {
        font-size: 1.1rem;
    }

    .article-navigation {
        flex-direction: column;
        gap: 15px;
    }

    .article-table {
        font-size: 0.9rem;
    }

    .article-table th,
    .article-table td {
        padding: 8px;
    }
}

@media (max-width: 480px) {
    .articles-section {
        padding: 20px 10px;
    }

    .article-box {
        padding: 15px;
    }

    .article-title {
        font-size: 1.2rem;
    }

    .article-content ul,
    .article-content ol {
        padding-right: 15px;
    }

    .article-highlight {
        padding: 15px;
    }

    .article-button {
        padding: 8px 20px;
        font-size: 0.9rem;
    }
}

/* تنسيقات للرسومات البيانية داخل المقالات */
.article-chart {
    width: 100%;
    height: 300px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 8px;
    margin: 20px 0;
    padding: 20px;
    position: relative;
}

.article-chart-title {
    text-align: center;
    color: #2c3e50;
    font-weight: bold;
    margin-bottom: 15px;
}

/* تنسيقات للفيديو داخل المقالات */
.article-video {
    width: 100%;
    height: 400px;
    border-radius: 8px;
    overflow: hidden;
    margin: 20px 0;
    background-color: #000;
}

/* تنسيقات للصور المصغرة */
.article-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
    margin: 10px 0;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.article-thumbnail:hover {
    transform: scale(1.03);
}

/* تنسيقات للأيقونات داخل المقالات */
.article-icon {
    color: #3498db;
    margin-left: 10px;
    font-size: 1.2rem;
}

/* تنسيقات للفقرات المميزة */
.article-featured {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    padding: 25px;
    border-radius: 8px;
    margin: 25px 0;
}

.article-featured .article-title {
    color: white;
    border-bottom-color: rgba(255, 255, 255, 0.3);
}

.article-featured .article-content {
    color: rgba(255, 255, 255, 0.9);
}

/* تنسيقات للأقسام المطوية */
.article-collapsible {
    margin: 20px 0;
}

.article-collapsible-header {
    background: #3498db;
    color: white;
    padding: 15px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
}

.article-collapsible-content {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 0 0 4px 4px;
    display: none;
}

.article-collapsible.active .article-collapsible-content {
    display: block;
}

/* تنسيقات للأقسام المتدرجة */
.article-steps {
    counter-reset: step-counter;
    margin: 20px 0;
}

.article-step {
    position: relative;
    padding-right: 60px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px dashed #ddd;
}

.article-step:last-child {
    border-bottom: none;
}

.article-step::before {
    counter-increment: step-counter;
    content: counter(step-counter);
    position: absolute;
    right: 0;
    top: 0;
    width: 40px;
    height: 40px;
    background: #3498db;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
}

/* تنسيقات للتقدم الزمني */
.article-timeline {
    position: relative;
    padding-right: 30px;
    margin: 30px 0;
}

.article-timeline::before {
    content: '';
    position: absolute;
    right: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #3498db;
}

.article-timeline-item {
    position: relative;
    margin-bottom: 30px;
    padding-bottom: 15px;
}

.article-timeline-item::before {
    content: '';
    position: absolute;
    right: 3px;
    top: 0;
    width: 15px;
    height: 15px;
    background: #3498db;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 0 0 3px #3498db;
}

.article-timeline-date {
    color: #3498db;
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

