﻿.navbar * {
    direction: rtl;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "yekan";
}

.navbar {
    /*background: linear-gradient(135deg, #2c3e50, #1a2530);*/
    width: 80%;
    position: relative;
    /*box-shadow: 0 2px 10px rgba(0,0,0,0.2);*/
}

.navbar-container {
    display: flex;
    align-items: center;
    height: 60px;
    max-width: 1200px;
    margin: 0 auto;
    /*padding: 0 15px;*/
}

.logo {
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    display: flex;
    align-items: center;
    margin-left: 15px;
    padding: 5px 10px;
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.1);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    /*margin-right: auto;*/
}

    .menu-toggle span {
        height: 3px;
        width: 25px;
        /*background: white;*/
        background-color: black;
        margin: 2px 0;
        border-radius: 2px;
        transition: all 0.3s ease;
    }

.nav-menu {
    display: flex;
    list-style: none;
    /*margin-right: auto;*/
}

.nav-item {
    position: relative;
}

.nav-link {
    color: #000;
    text-decoration: none;
    padding: 11px 11px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

    .nav-link:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }

/* مثلث برای آیتم‌های دارای زیرمنو */
.has-submenu::after {
    content: "";
    width: 0;
    height: 0;
    margin-right: 5px;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid black;
    transition: transform 0.3s ease;
}

.nav-item:hover .has-submenu::after {
    transform: rotate(180deg);
}

.sub-menu {
    display: none;
    position: absolute;
    background: white; /*linear-gradient(135deg, #34495e, #2c3e50);*/
    list-style: none;
    min-width: 200px;
    top: 100%;
    /*box-shadow: 0 5px 15px rgba(0,0,0,0.2);*/
    border-radius: 0 0 4px 4px;
    overflow: hidden;
    z-index: 1000;
}

.nav-item:hover > .sub-menu {
    display: block;
    animation: fadeIn 0.3s ease;
}

.sub-menu .nav-link {
    padding: 12px 20px;
    white-space: nowrap;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

    .sub-menu .nav-link:last-child {
        border-bottom: none;
    }

/* حالت RTL (پیش‌فرض) */
html[dir="rtl"] .sub-menu {
    right: 0;
}

/* حالت LTR */
html[dir="ltr"] .navbar-container {
    direction: ltr;
}

html[dir="ltr"] .nav-menu {
    margin-right: 0;
    margin-left: auto;
}

html[dir="ltr"] .logo {
    margin-left: 0;
    margin-right: 15px;
}

html[dir="ltr"] .menu-toggle {
    margin-right: 0;
    margin-left: auto;
}

html[dir="ltr"] .sub-menu {
    left: 0;
}

html[dir="ltr"] .has-submenu::after {
    margin-right: 0;
    margin-left: 5px;
}

/* ریسپانسیو برای موبایل */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: absolute;
        top: 60px;
        right: 0;
        left: 0;
        background: #fff; /* linear-gradient(135deg, #2c3e50, #1a2530);*/
        flex-direction: column;
        display: none;
        z-index: 1000;
        box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    }

        .nav-menu.activex {
            display: flex;
        }

        .nav-menu .activex {
            background-color: #fff !important;
        }

    .sub-menu {
        position: static;
        box-shadow: none;
        width: 100%;
        display: none;
        background: rgba(0, 0, 0, 0.2);
        border-radius: 0;
        animation: none !important;
    }

        /*.nav-item:hover > .sub-menu {
                display: none;
            }*/

        .sub-menu.activex {
            display: block;
            animation: slideDown 0.3s ease !important;
        }

    /* مثلث برای آیتم‌های دارای زیرمنو در حالت موبایل */
    .has-submenu.activex::after {
        transform: rotate(180deg);
    }
}

/* انیمیشن‌ها */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }

    to {
        opacity: 1;
        max-height: 300px;
    }
}

/* دکمه تغییر جهت */
.direction-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #2c3e50;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 1000;
    font-size: 14px;
}





/* استایل فوتر */
footer {
    background: #373737; /*linear-gradient(to right, #2c3e50, #4a6580) !important;*/
    color: white;
    padding: 40px 20px;
    margin-top: auto;
}

    footer p {
        color: white !important;
        font-size: 2vh !important;
    }

.footerx-container {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
}

.footerx-section {
    padding: 0 15px;
}

.footerx-section-1 {
    width: 50%;
}

.footerx-section-2 {
    width: 25%;
}

.footerx-section-3 {
    width: 25%;
}

.footerx-title {
    font-size: 1.2rem;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.footerx-links {
    list-style: none;
}

    .footerx-links li {
        margin-bottom: 10px;
    }

    .footerx-links a {
        color: #ecf0f1;
        text-decoration: none;
        transition: color 0.3s;
    }

        .footerx-links a:hover {
            color: #3498db;
        }

/* طراحی ریسپانسیو */
@media (max-width: 768px) {
    .footerx-container {
        flex-wrap: wrap;
    }

    .footerx-section-1 {
        width: 100%;
        margin-bottom: 30px;
    }

    .footerx-section-2 {
        width: 50%;
    }

    .footerx-section-3 {
        width: 50%;
    }
}

@media (max-width: 480px) {
    .footerx-section-1,
    .footerx-section-2,
    .footerx-section-3 {
        width: 100%;
        margin-bottom: 30px;
    }
}

.copyrightx {
    text-align: center;
    padding-top: 20px;
    margin-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.9rem;
    color: #ecf0f1;
}


#txtTarget {
    /*background-color: var(--rmdp-lightGreen) !important;*/
    border-radius: 10px;
}

.fa-solid, .fas {
    font-size: 7vh;
    cursor:pointer;
}
