:root {
    writing-mode: horizontal-tb;
    text-orientation: mixed;
}

.custom-header{
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    left: 0 !important;
    direction: rtl !important;
    background: rgba(0, 0, 0, 0.514) !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2) !important;
    backdrop-filter: blur(10px) !important;
    color: white !important;
    padding: 10px 50px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    z-index: 1000 !important;
}

.logo img {
    width: 50px;
    height: 50px;
}

.menu {
    display: flex;
    gap: 15px;
    margin-right: 10px;
    margin-left: auto;
}

.menu a {
    color: white;
    text-decoration: none;
    font-size: 16px;
    margin-top: 0 !important;
}

.buttons {
display: flex;
gap: 10px;
}

.buttons a {
padding: 10px 20px;
color: white;
background-color: #ff5f5f;
border-radius: 5px;
text-decoration: none;
font-size: 14px;
}

.buttons a.get-started {
background-color: white;
color: black;
}

/* مخفی کردن دکمه‌های موبایل به طور پیش‌فرض */
#mobile-buttons {
    display: none; /* به طور پیش‌فرض مخفی است */

}
.buttons a.log-in {
     margin-left: 0 !important;
}
/* وقتی منو باز است، دکمه‌ها نمایش داده می‌شوند */
.menu.active + #mobile-buttons {
    display: flex; /* نمایش دکمه‌ها */
    gap: 10px; /* فاصله بین دکمه‌ها */
    flex-direction: column; /* چینش عمودی */
    margin-top: 10px; /* فاصله از منو */
    justify-content: center;
}

/* استایل رسپانسیو */
@media (max-width: 1024px) {
   .custom-header {
        padding: 10px 20px;
    }
}
@media (max-width: 650px) {
    .menu {
        position: absolute;
        top: 100%;
        right: 0;
        width: 100%;
        height: 0; /* شروع از ارتفاع صفر */
        overflow: hidden; /* مخفی کردن محتوای اضافی */
        background: rgba(0, 0, 0, 0.8); /* رنگ مشکی با شفافیت */
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
        backdrop-filter: blur(10px);
        flex-direction: column;
        align-items: flex-start; /* قرار دادن منو در سمت چپ */
        justify-content: flex-start; /* تراز کردن محتوا در سمت راست */
        transition: height 0.5s ease; /* ایجاد افکت باز و بسته شدن */
        z-index: 999;
        margin-right: 0;
        padding-right: 10px; /* افزودن فضای خالی از سمت راست */
    }
    .menu a {
        font-size: 24px;
        text-align: right; /* تراز کردن متن به سمت راست */
        padding-top: 10px;

    }
    .menu-toggle {
        display: flex;
        flex-direction: column;
        gap: 5px;
        cursor: pointer;
        margin-right: 0;
    }
    .menu-toggle span {
        width: 22px;
        height: 3px;
        background-color: white;
        display: block;
    }
    /* وقتی منو باز است */
    .menu.active {
        height: 35vh;
    }
    /* مخفی کردن دکمه‌های "شروع کنید" و "ورود" در موبایل */
    .buttons {
        display: none;
    }
    #mobile-buttons {
        display: flex;
        position: absolute; /* قرار دادن دکمه‌ها به صورت ثابت در پایین */
        bottom: 10px; /* فاصله دکمه‌ها از پایین */
        left: 0;
        right: 0;
        gap: 10px; /* فاصله بین دکمه‌ها */
        flex-direction: column; /* چینش عمودی دکمه‌ها */
        align-items: center; /* قرار دادن دکمه‌ها در مرکز به صورت افقی */
        width: 100%; /* عرض کامل برای تراز در مرکز */
    }
    #mobile-buttons a {
        width: 90%; /* عرض دکمه‌ها را تنظیم کنید تا کمی از لبه‌ها فاصله بگیرند */
        text-align: center; /* تراز کردن متن در مرکز دکمه‌ها */
        justify-content: flex-end; /* قرار دادن دکمه‌ها در مرکز به صورت افقی */

    }
    .buttons a.log-in {
        margin-left: 0;
    }
    .buttons a {
        padding: 10px 20px;
        color: white;
        background: rgba(0, 0, 0, 0.514); /* رنگ مشکی با شفافیت */
        border-radius: 5px;
        text-decoration: none;
        font-size: 14px;
    }
}
@media (max-width: 460px) {
    .custom-header{
        padding:10px 15px !important;
    }
}