header {
    padding: 5px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

header .logo {
    display: flex;
    align-items: center;
    margin-left: 1%;
    gap: 12px;
    box-shadow: 0 2px 16px #00000040;
    padding: 6px 12px;
    border-radius: 12px;
    transition: 0.3s ease-in-out;
}

header .logo:hover {
    box-shadow: 0 4px 24px #00000080;
}

.logo h2 {
    color: rgb(255, 255, 255);
    font-family: 'Amiri', serif;
    font-size: 24px;
    margin: 0;
}

.logo img {
    height: 60px;
    width: auto;
    border-radius: 10px;
    box-shadow: 0 0 10px #0000005d;
}

header a {
    text-decoration: none;
    color: rgb(255, 255, 255);
    background: #141414;
    box-shadow: 0 0 10px #0000005d;
    border-radius: 10px;
    transition: 0.3s;
    padding-left: 5px;
}

header a:hover {
    box-shadow: 0 0px 10px #000;
    transform: scale(1.08) translateY(-2px);
    transition: background 0.3s, box-shadow 0.3s, transform 0.3s; /* Smooth animation for hover */
}

header a:hover svg {
    box-shadow: 0 0 10px 0 #000000;
    transform: scale(1.15) rotate(-5deg);
    transition: background 0.3s, box-shadow 0.3s, transform 0.3s;
}

header ul {
    text-decoration: none;
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    float: inline-start;
}

header ul li {
    list-style: none;
    margin: 10px;
    font-size: 18px;
    display: flex;
    flex-direction: row;
    align-items: center;
    font-family: "Amiri", serif;
    transition: 0.3s;
}

header ul li svg {
    background: #141414;
    box-shadow: 0 0 10px #000;
    border-radius: 10px;
    padding: 7px;
    width: 1.5rem;
    height: 1.5rem;
    vertical-align: middle;
    transition: 0.3s;
}
/* Hamburger Menu */
.hamburger {
    display: none; /* دسکتاپ مخفی */
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 22px;
    cursor: pointer;
    margin-left: 20px;
}

.hamburger .bar {
    height: 4px;
    width: 100%;
    background-color: white;
    border-radius: 2px;
    transition: 0.3s;
}

/* نمایش در موبایل */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
        margin-top: 5%;
        margin-right: 1%;
    }


    header ul {
        position: absolute;
        top: 70px; /* پایین هدر */
        right: 5px;
        background: #14141400;
        flex-direction: column;
        width: 200px;
        padding: 10px;
        border-radius: 10px;
        box-shadow: 0 0 20px #000000;
        z-index: 2;
        backdrop-filter: blur(2px);
        display: none; /* اول مخفی */
    }

    header ul.show {
        display: flex; /* وقتی باز شد */
    }

    header ul li {
        margin: 10px 0;
    }
}
.hamburger.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}
.hamburger.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}
