﻿/* ===== Base ===== */
body {
    margin: 0;
    padding-top: 70px;
    font-family: Tahoma, sans-serif;
    direction: ltr;
}

.custom-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    z-index: 99999;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.logo img {
    height: 45px;
}

/* ===== Desktop Menu ===== */
nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 25px;
}

    nav ul li a {
        text-decoration: none;
        color: #333;
        padding: 10px 15px;
        display: block;
        font-weight: 600;
    }

        nav ul li a:hover {
            color: blue;
        }

/* ===== Dropdown ===== */
.custom-dropdown {
    position: relative;
}

.custom-dropdown-content {
    display: none;
    position: absolute;
    top: 100%; /* دقیقاً زیر آیتم */
    right: 0;
    background: #fff;
    min-width: 180px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    border-radius: 4px;
    z-index: 10000;
}

    .custom-dropdown-content li a:hover {
        background: #eee;
    }

/* Hover for desktop */
.custom-dropdown:hover .custom-dropdown-content {
    display: block;
}

/* ===== Hamburger ===== */
.hamburger {
    display: none;
    font-size: 32px;
    cursor: pointer;
    user-select: none;
}

/* ===== Mobile Mode ===== */
@media (max-width:768px) {
    .hamburger {
        display: block;
    }

    nav {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 250px;
        background: white;
        height: 100vh;
        transition: 0.3s;
        box-shadow: -2px 0 10px rgba(0,0,0,0.2);
    }

        nav.open {
            right: 0;
        }

        nav ul {
            flex-direction: column;
            padding: 20px;
            gap: 10px;
        }

    /* Dropdown in mobile: click to open */
    .custom-dropdown:hover .custom-dropdown-content {
        display: none; /* غیرفعال کردن Hover */
    }

    .custom-dropdown.open .custom-dropdown-content {
        display: block;
        position: relative;
        box-shadow: none;
        padding-left: 10px;
    }
}
