/* استایل ورودی جستجو */
#searchModal .form-control {
    border: 2px solid #0d6efd;
    padding: 15px 20px;
    font-size: 1.1rem;
    border-radius: 0.5rem;
    transition: all 0.3s;
}

    #searchModal .form-control:focus {
        box-shadow: 0 0 15px rgba(13,110,253,0.4);
        border-color: #0a58ca;
    }

/* استایل دکمه */
#searchModal .btn-primary {
    font-size: 1.1rem;
    transition: all 0.3s;
    border-radius: 0.5rem;
}

    #searchModal .btn-primary:hover {
        background-color: #0a58ca;
        box-shadow: 0 0 15px rgba(13,110,253,0.5);
    }



/* هدر سرمه‌ای گرادیانی جدید */
.navbar-custom {
    background: linear-gradient(90deg, #0a1a33, #122b52) !important;
}

/* لینک‌ها */
.navbar-nav .nav-link {
    color: #ffffff !important;
}

.navbar-nav .nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #e63946 !important; /* قرمز */
}
.main-navbar .nav-link.active::after {
    content: '';
    display: block;
    height: 3px;
    width: 100%;
    background: linear-gradient(90deg, #fcd34d, #f59e0b, #d97706);
    border-radius: 2px;
    position: absolute;
    bottom: -5px;
    left: 0;
}

/* رنگ عنوان‌های مگا منو */
.mega-title {
    color: #0a1a33 !important;
    border-bottom: 3px solid #e63946 !important;
}

.mega-title::after {
    background: #ff4d5a !important;
}

/* لینک‌های داخل مگا منو */
.mega-links a i {
    color: #122b52 !important;
}

.mega-links a:hover {
    background: #122b52 !important;
    color: #fff !important;
}

.mega-links a:hover i {
    color: #e63946 !important;
}

/* کارت ویژه */
.featured-card {
    border-color: #e63946 !important;
}

.btn-primary {

    border: none !important;
}

    .btn-primary:hover {
        background: #0b5ed7 !important;
        border-color: #0b5ed7 !important;
        box-shadow: 0 6px 15px rgba(13,110,253,.4);
        transform: translateY(-2px);
    }
.navbar-brand {
    display: flex;
    align-items: center;
}

.navbar-logo {
    height: 40px; /* دسکتاپ */
    width: auto;
    max-height: 40px;
}

/* موبایل */
@media (max-width: 576px) {
    .navbar-logo {
        height: 28px;
        max-height: 28px;
    }
}


        * {
            font-family: 'Vazirmatn', sans-serif;
        }

.navbar-custom {
    background: linear-gradient( 135deg, #1b355d 0%, #244a86 50%, #356fdc 100% ) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}


        .navbar-brand:hover {
            color: #ffd700 !important;
        }

        .navbar-brand i {
            color: #ffd700;
            margin-left: 0.5rem;
        }

        .navbar-nav .nav-link {
            color: #ffffff !important;
            font-weight: 500;
            font-size: 1.1rem;
            transition: all 0.3s ease;
            position: relative;
            padding: 0.7rem 1.2rem !important;
            margin: 0 0.2rem;
            border-radius: 8px;
        }

        .navbar-nav .nav-link:hover {
            color: #ffd700 !important;
            background: rgba(255, 255, 255, 0.1);
            transform: none !important;
        }

        .navbar-nav .nav-link::after {
            content: '';
          
            width: 0;
            height: 3px;
            bottom: 5px;
            left: 50%;
            background: linear-gradient(90deg, #ffd700, #ffed4e);
            transition: all 0.3s ease;
            border-radius: 2px;
        }

     .navbar-nav .nav-link:hover::after {
    width: 0 !important;
}


        .navbar-toggler {
            border: 2px solid #ffffff;
            padding: 0.5rem;
        }

        .navbar-toggler:focus {
            box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
        }

        .navbar-toggler-icon {
            background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='m4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
        }

        /* تنظیمات راست چینی */
        .navbar-nav {
            text-align: right;
        }

        .navbar-nav.ms-auto {
            margin-right: 0 !important;
            margin-left: auto !important;
        }

        /* مگا منو */
        .mega-dropdown {
            position: static;
        }

        .mega-menu {
            width: 100%;
            left: 0 !important;
            right: 0 !important;
            border: none;
            border-radius: 0 0 20px 20px;
            box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
            background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 50%, #f1f3f5 100%);
            padding: 2.5rem 0;
            margin-top: 0;
             transform: none !important;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.3s ease, transform 0.3s ease;
            border-top: 4px solid #3b82f6;
            z-index: 9999;
        }



        .mega-title {
            color: #1e3c72;
            font-weight: 700;
            font-size: 1.2rem;
            margin-bottom: 1.5rem;
            padding-bottom: 0.8rem;
            border-bottom: 3px solid #3b82f6;
            position: relative;
            text-align: right;
        }

        .mega-title::after {
            content: '';
            position: absolute;
            bottom: -3px;
            right: 0;
            width: 40px;
            height: 3px;
            background: linear-gradient(90deg, #ffd700, #ffed4e);
            border-radius: 2px;
        }

        .mega-links {
            list-style: none;
            padding: 0;
            margin: 0;
        }

        .mega-links li {
            margin-bottom: 0.8rem;
        }

        .mega-links a {
            text-decoration: none;
            color: #495057;
            display: flex;
            align-items: center;
            padding: 0.8rem 1rem;
            transition: all 0.3s ease;
            border-radius: 10px;
            font-weight: 500;
            font-size: 1rem;
            justify-content: flex-start;
        }

        .mega-links a:hover {
            color: #ffffff;
            background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
            transform: translateX(8px);
            box-shadow: 0 5px 15px rgba(59, 130, 246, 0.3);
        }

        .mega-links a i {
            margin-left: 0.8rem;
            width: 24px;
            text-align: center;
            color: #3b82f6;
            font-size: 1.1rem;
        }

        .mega-links a:hover i {
            color: #ffd700;
        }

        .mega-featured {
            height: 100%;
            display: flex;
            align-items: center;
        }

        .featured-card {
            background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
            border-radius: 20px;
            padding: 2rem;
            text-align: center;
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
            transition: all 0.3s ease;
            border: 2px solid transparent;
        }

        .featured-card:hover {
            transform: translateY(-8px);
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
            border-color: #3b82f6;
        }

        .featured-card img {
            width: 100%;
            border-radius: 15px;
            margin-bottom: 1.5rem;
        }

        .featured-card h6 {
            color: #1e3c72;
            font-weight: 700;
            font-size: 1.1rem;
            margin-bottom: 0.8rem;
        }

        .featured-card p {
            color: #6c757d;
            font-size: 1rem;
            margin-bottom: 1.5rem;
        }

        .btn-primary {
            background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
            border: none;
            padding: 0.6rem 1.5rem;
            border-radius: 25px;
            font-weight: 500;
            transition: all 0.3s ease;
        }

        .btn-primary:hover {
            background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
            transform: translateY(-2px);
            box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
        }



        .navbar-nav .nav-link .fas {
            font-size: 1.1rem;
        }

        /* اصلاح موبایل */


        @media (max-width: 991px) {
    .navbar-custom {
        background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%) !important;
        padding: 0.5rem 0;
    }

            .navbar-collapse {
                background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
                margin-top: 1rem;
                border-radius: 15px;
                padding: 1rem;
                box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
                transition: all 0.3s ease;
                transform-origin: top;
            }

            .navbar-collapse.show {
                animation: slideDown 0.3s ease forwards;
            }

            @keyframes slideDown {
                from {
                    opacity: 0;
                    transform: translateY(-20px) scaleY(0.8);
                }
                to {
                    opacity: 1;
                    transform: translateY(0) scaleY(1);
                }
            }

            .mega-menu {
                position: relative !important;
                width: 100% !important;
                left: 0 !important;
                right: 0 !important;
                box-shadow: none;
                background: rgba(255, 255, 255, 0.95);
                padding: 1.5rem;
                margin-top: 0.5rem;
                border-radius: 15px;
                transform: none !important;
                opacity: 1 !important;
                visibility: visible !important;
                border-top: 3px solid #ffd700;
                position: static !important;
                display: none;
                transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
                transform-origin: top;
            }

            .mega-menu.show {
                animation: slideDownMega 0.3s ease forwards;
            }

            @keyframes slideDownMega {
                from {
                    opacity: 0;
                    transform: translateY(-10px) scaleY(0.9);
                }
                to {
                    opacity: 1;
                    transform: translateY(0) scaleY(1);
                }
            }

            .dropdown:hover .mega-menu,
            .dropdown.show .mega-menu {
                display: block !important;
                animation: slideDownMega 0.3s ease forwards;
            }

            .mega-dropdown .dropdown-toggle {
                width: 100%;
                text-align: right;
                background: rgba(255, 255, 255, 0.1);
                margin-bottom: 0.5rem;
                border-radius: 8px;
            }

            .mega-dropdown .dropdown-toggle:hover {
                background: rgba(255, 255, 255, 0.2);
            }

            .featured-card {
                margin-top: 1.5rem;
            }

            .mega-links a {
                color: #1e3c72;
                background: rgba(255, 255, 255, 0.8);
                margin-bottom: 0.5rem;
                border-radius: 8px;
            }

            .mega-links a:hover {
                background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
                color: #ffffff;
                transform: translateX(5px);
            }

            .navbar-nav {
                text-align: right;
                width: 100%;
            }

            .navbar-nav .nav-item {
                width: 100%;
                margin-bottom: 0.5rem;
            }

            .navbar-nav .nav-link {
                padding: 1rem !important;
                border-radius: 8px;
                background: rgba(255, 255, 255, 0.1);
                margin-bottom: 0.5rem;
                text-align: right;
            }
        }

        .dropdown-toggle::after {
            margin-right: 0.5rem;
            border-top: 0.4em solid;
            border-right: 0.4em solid transparent;
            border-left: 0.4em solid transparent;
        }

        @keyframes fadeInDown {
            from {
                opacity: 0;
                transform: translateY(-30px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .navbar {
            animation: fadeInDown 0.6s ease;
        }

        ::-webkit-scrollbar {
            width: 10px;
        }

        ::-webkit-scrollbar-track {
            background: #f1f1f1;
            border-radius: 5px;
        }

        ::-webkit-scrollbar-thumb {
            background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
            border-radius: 5px;
        }

        ::-webkit-scrollbar-thumb:hover {
            background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
        }


