/*==================================
  الأنماط العامة (General Styles)
==================================*/
body {
    font-family: 'Arial', sans-serif;
    background-color: #f4f4f4;
    color: #333;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    direction: rtl; /* لضمان دعم اللغة العربية */
    text-align: right;
}

h1 {
    color: #440f65;
    text-align: center;
    margin-top: 12px;
    font-size: 33px;
    font-style: italic;
    font-family: sans-serif;
}
h2 {
    color: #440f65;

}

/*==================================
  أنماط القائمة (Navigation Menu)
==================================*/
.main-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #440f65;
    padding: 10px 20px;
    width: 100%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    margin-bottom: 20px;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 20px;
    padding: 15px 9px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    margin: 0px 9px;
    font-family: sans-serif;
}

.nav-link:hover {
    background-color: #fb81fb;
}

/*==================================
  أنماط المحتوى الرئيسي (Main Content)
==================================*/
.content {
    background-color: #fff;
    
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    max-width: 800px;
    margin: 20px auto;
    text-align: right;
    font-family: sans-serif;
}

.content h1 {
    text-align: right;
    margin-bottom: 20px;
    
}

.content p {
    line-height: 1.6;
    margin-bottom: 15px;
    
}

/*==================================
  أنماط عناصر التحكم (Controls)
==================================*/
.controls {
    margin-bottom: 20px;
    background-color: #f3cfff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: right;
    max-width: 500px;
    width: 100%;
}

label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
    font-family: sans-serif;
    color: #440f65;
    font-size: 19px;
}

select, input[type="text"] {

    padding: 10px 15px;
    margin-bottom: 10px;
    border-radius: 6px;
    border: 1px solid #ddd;
    font-size: 20px;
    width: 100%;
    box-sizing: border-box;
    color: #007bff;
    font-family: sans-serif;
}

.button-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

button {
    padding: 10px 15px;
    margin-bottom: 10px;
    border-radius: 5px;
    border: none;
    font-size: 16px;
    cursor: pointer;
    flex-grow: 1;
    transition: background-color 0.3s ease;
    color: white;
    box-sizing: border-box;
    font-family: sans-serif;
}

#downloadButton {
    background-color: #440f65;
}
#downloadButton:hover {
    background-color: #b62bb6;
}
#shareFacebookButton {
    background-color: #3b5998;
}
#shareFacebookButton:hover {
    background-color: #2d4373;
}
#shareTwitterButton {
    background-color: #1da1f2;
}
#shareTwitterButton:hover {
    background-color: #0c85d0;
}

/*==================================
  أنماط الكانفاس (Canvas)
==================================*/
canvas {
    border: 2px solid #007bff;
    background-color: #fff;
    max-width: 90%;
    height: auto;
    display: block;
    margin-top: 15px;
}
/*==================================
  أنماط إشعار ملفات تعريف الارتباط
==================================*/
#cookie-banner {
    position: fixed;
    bottom: 20px;
    right: 20px;
    left: 20px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: opacity 0.5s ease;
    text-align: right;
    flex-wrap: wrap;
}

#cookie-banner p {
    margin: 6px;
    font-size: 20px;
    text-align: center;
    font-family: sans-serif;
}

#cookie-accept-btn {
background-color: #007bff;
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 18px;
    cursor: pointer;
    font-weight: bold;
    flex-shrink: 0;
    transition: background-color 0.3s ease;
    font-family: sans-serif;
}

#cookie-accept-btn:hover {
    background-color: #0056b3;
}

@media screen and (max-width: 607px) {
 .controls {
    background-color: #f3cfff;
    padding: 23px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: right;
    max-width: 500px;
    width: 80%;
    margin: 10px;
}
}

/*==================================
  أنماط القائمة المتجاوبة (Responsive Navigation)
==================================*/

/* إعداد زر الهامبرغر */
.hamburger-btn {
    display: none; /* إخفاء الزر بشكل افتراضي على شاشات الكمبيوتر */
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger-btn span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: white;
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
}

/* تحريك زر الهامبرغر عند الفتح (اختياري) */
.hamburger-btn.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.hamburger-btn.open span:nth-child(2) {
    opacity: 0;
}
.hamburger-btn.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* تعديل القائمة لتكون عمودية على الهاتف */
.main-nav {
    /* ... الأنماط الحالية ... */
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #440f65;
    padding: 10px 20px;
    width: 100%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    margin-bottom: 20px;
}

    @media (max-width: 768px) {
    #img1 {
    display: none;
    margin-top: 15px;
}
    }
    
@media (max-width: 768px) {
    .main-nav {
        justify-content: space-between; /* لتحريك زر الهامبرغر إلى طرف الشاشة */
        padding: 16px 21px;
        display: inline;
        direction: rtl;
        max-width: -webkit-fill-available;
    }

    .hamburger-btn {
        display: flex; /* إظهار الزر على الشاشات الصغيرة */
    }

    .nav-link {
        display: none; /* إخفاء الروابط بشكل افتراضي */
        width: 100%;
        text-align: center;
        padding: 16px 0;
        margin: 4px;
        background-color: #a83dad;
        border-bottom: 1px solid #0056b3;
    }

    .main-nav.open .nav-link {
        display: block; /* إظهار الروابط عند فتح القائمة */
    }

    .main-nav.open {
        flex-direction: column; /* جعل القائمة عمودية */
        align-items: flex-start;
        position: fixed;
        top: 0;
        right: 0;
        width: 100%;
        height: 100%;
        background-color: #440f65;
        z-index: 1000;
        padding-top: 60px; /* لإعطاء مساحة لزر الهامبرغر */
    }
}

/*==================================
  أنماط تذييل الصفحة (Footer)
==================================*/
.main-footer {
    width: 100%;
    text-align: center;
    padding-bottom: 40px;
    padding-top: 7px;
    background-color: #440f65;
    color: #f4f4f4;
    margin-top: 15px;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
    font-family: sans-serif;
}

.main-footer p {
    margin: 5px 0;
    font-size: 16px;
}