/* المتغيرات الافتراضية للألوان للوضع العادي */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #e67e22;
    --accent-color: #f1c40f;
    --bg-color: #f7f9fc;
    --header-bg: radial-gradient(circle at center, #16a085, #1abc9c);
    --section-bg: #f6f6f6;
    --text-color: #2c3e50;
    --footer-text-color:white;
    --icon-color:black;
}
/* المتغيرات للوضع الداكن */
:root.dark-mode {
    --primary-color: #ecf0f1;
    --secondary-color: #e67e22;
    --accent-color: #f1c40f;
    --bg-color: #121212;
    --header-bg: radial-gradient(circle at center, #2c3e50, #34495e);
    --section-bg: #1e1e1e;
    --text-color: #ecf0f1;
    --footer-text-color: black;
    --icon-color:black;
}
.social-icons a i{
    color: var(--icon-color);
}
/* إعادة تعيين القيم الافتراضية */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background 0.3s, color 0.3s;
}

/* زر تبديل الوضع الداكن */
#darkModeToggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--secondary-color);
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    color: #fff;
    cursor: pointer;
    z-index: 1100;
    transition: background 0.3s;
}
#app{
    position: fixed;
    top: 20px;
    right: calc(100% - 100px);
    background: var(--secondary-color);
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    color: #fff;
    cursor: pointer;
    z-index: 1100;
    transition: background 0.3s;
}
#app:hover{
    background: var(--accent-color);
}
#app a{
    color: #fff;
    text-decoration: none;
}
#darkModeToggle:hover {
    background: var(--accent-color);
}

/* تحسين الهيدر والـ Heading */
header {
    background: var(--header-bg);
    color: #fff;
    text-align: center;
    padding: 80px 20px;
    position: relative;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}
header h1 {
    font-size: 4em;
    background: linear-gradient(45deg, var(--accent-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
    animation: fadeInDown 1s ease-in-out;
}

/* تنسيق قائمة التنقل */
nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: transparent;
    transition: background-color 0.3s;
}
nav ul {
    list-style: none;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    padding: 10px 0;
}
nav ul li a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    padding: 10px 20px;
    border-radius: 30px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}
nav  ul  li{
    margin-bottom: 20px;
}
nav ul li a {
    width: 20px;
    height: 20px;
}

nav ul li a:hover {
    background: var(--accent-color);
    border-color: var(--secondary-color);
    transform: translateY(-3px);
}
nav ul li a i {
    margin-left: 5px;
    font-size: 1.2em;
    transition: transform 0.3s;
}

nav ul li a:hover i {
    transform: scale(1.2);
}
/* تنسيق المحتوى الرئيسي */
main {
    max-width: 1200px;
    margin: 100px auto 60px;
    padding: 40px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transition: background 0.3s, box-shadow 0.3s;
}

/* تأثير الظهور التدريجي للأقسام */
section {
    margin-bottom: 60px;
    padding: 40px;
    border-radius: 20px;
    background: var(--section-bg);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}
section.visible {
    opacity: 1;
    transform: translateY(0);
}
section h2 {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: var(--primary-color);
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
}
section:hover {
    transform: scale(1.06);
}
section p {
    font-size: 1.2rem;
    margin-bottom: 20px;
}
section ul {
    margin: 20px 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
section ul li {
    background: var(--secondary-color);
    color: #fff;
    padding: 10px 15px;
    border-radius: 15px;
    font-size: 1em;
    transition: background 0.3s ease;
}
section ul li:hover {
    background: var(--accent-color);
}
#concept p{
    width: 71%;
}
/* استهداف قائمة الأمثلة على سبيل المثال */
#aiExamples ul {
    width:65% ;
    display: grid;                    /* تفعيل نظام Grid */
    grid-template-columns:repeat(auto-fill, minmax(300px, 1fr)); /* عمودان بعرض متساوٍ */
    gap: 20px;                        /* المسافة بين الأعمدة والصفوف */
    list-style-type: none;            /* إزالة النقط (اختياري) */
    padding: 0;                       /* إزالة المسافات الداخلية الافتراضية */
}
/* تنسيق قسم الروابط */
#aiLinks {
    background: var(--section-bg);
    padding: 2rem;
    border-radius: 15px;
}

.ai-links-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.ai-link-card {
    background: var(--bg-color);
    border-radius: 10px;
    padding: 1.5rem;
    transition: transform 0.3s ease;
    border: 1px solid rgba(0,0,0,0.1);
}

.ai-link-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.ai-link-card a {
    text-decoration: none;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ai-link-card i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}
.narrow_AI{
    display: none;
}
.public_AI{
    display: none;
}
.turbo_AI{
    display: none;
}
#types ul button li{
    width: 110%;
}
#types ul button{
    appearance: auto;
    writing-mode: horizontal-tb !important;
    text-rendering: auto;
    letter-spacing: normal;
    word-spacing: normal;
    line-height: normal;
    text-transform: none;
    text-indent: 0px;
    text-shadow: none;
    display: inline-block;
    text-align: center;
    align-items: flex-start;
    cursor: default;
    box-sizing: border-box;
    background-color: transparent;
    margin: 0em;
    padding: 1px 6px;
    border-width: 2px;
    border-style:none;
    border-color: transparent;
    border-image: initial;
}
.ai-link-card h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.ai-link-card p {
    font-size: 0.9rem;
    text-align: center;
    color: var(--text-color);
    opacity: 0.8;
}

@media (max-width: 768px) {
    .ai-links-container {
        grid-template-columns: 1fr;
    }
    .ai-link-card {
        padding: 1rem;
    }
}
.eimg{
    position: absolute;
    top: 45%;
    right: 66%;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    margin-bottom: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.eimg:hover{
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}
.conceptimg{
    width: 300px;
    height: 168px;
    position: absolute;
    top: 30%;
    right: 72%;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    margin-bottom: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.conceptimg:hover{
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}
.typesimage{
    position: absolute;
    top: 30%;
    right: 70%;
    width: 300px;
    height: 168px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    margin-bottom: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.typesimage:hover{
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}
/* معرض الصور */
.gallery-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}
.gallery-item {
    max-width: 300px;
    text-align: center;
}
.gallery-item img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    margin-bottom: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.gallery-item img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}
.gallery-item p {
    font-size: 1em;
    color: var(--text-color);
}

/* تنسيق الفوتر مع أيقونات التواصل */
footer {
    background: var(--primary-color);
    color: var(--footer-text-color);
    text-align: center;
    padding: 40px 20px;
    position: relative;
}
footer .social-icons {
    margin-bottom: 20px;
}
footer .social-icons a {
    color: #fff;
    margin: 0 10px;
    font-size: 1.5em;
    transition: color 0.3s;
}
footer .social-icons a:hover {
    color: var(--accent-color);
}
footer p {
    font-size: 1em;
}

/* زر الرجوع للأعلى */
#backToTop {
    position: fixed;
    bottom: 40px;
    left: 40px;
    background-color: var(--secondary-color);
    color: #fff;
    border: none;
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5em;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: background 0.3s, transform 0.3s;
    display: none;
}
#backToTop:hover {
    background-color: var(--accent-color);
    transform: scale(1.1);
}

/* تأثيرات CSS */
@keyframes fadeInDown {
    from {
    opacity: 0;
    transform: translateY(-20px);
    }
    to {
    opacity: 1;
    transform: translateY(0);
    }
}

/* التنسيق على الشاشات الصغيرة */
@media (max-width: 768px) {
    header h1 {
    font-size: 3em;
    }
    main {
    margin: 60px 20px;
    padding: 20px;
    }
    section {
    padding: 20px;
    }
    nav ul li a {
    padding: 8px 15px;
    }
    .gallery-item {
    max-width: 100%;
    }
    .typesimage{
        width: 270px;
        position: relative;
        top: 0;
        right: 0;
    }
    .conceptimg{
        width: 270px;
        position: relative;
        top: 0;
        right: 0;
    }
    .gallery-item img{
        width: 270px  !important;
    }
    .eimg{
    position: relative;
    top:0;
    right: 0;
    }
}
@media (max-width: 1190px) {
    .typesimage{
        position: relative;
        top: 0;
        right: 0;
    }
    .conceptimg{
        position: relative;
        top: 0;
        right: 0;
    }
    /* .eimg{
    position: relative;
    top:0;
    right: 0;
    } */
}
@media (max-width: 900px){
    .eimg{
        width: 270px !important;
    }
}