html {
    font-size: 100%;
}

@font-face {
    font-family: "vazir";
    src: url(./fonts/Vazir.eot)format("embedded-opentype");
    src: url(./fonts/Vazir.ttf)format("truetype");
    src: url(./fonts/Vazir.woff)format("woff");
    src: url(./fonts/Vazir.woff2)format("woff2");
}

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

body,
html {
    height: 100%;
    font-family: 'vazir', sans-serif;
}

header {
    width: 100%;
    height: 12rem;
    background: gray;
    border-top: solid 1.5rem black;
    background-image: url(./img/3/header3.webp);
    background-repeat: no-repeat;
    background-size: cover;
}

.header {
    position: relative;
    display: flex;
    align-items: center;
}

.header img {
    width: auto;
    height: 70px;
    margin: 1rem 3rem 0 0;
}

nav {
    background: #1b2e42;
    padding: 1rem;
    text-align: center;
    height: auto;
    margin-top: 0.1rem;
}

.menu-toggle {
    background: none;
    border: none;
    font-size: 2rem;
    color: #fff;
    cursor: pointer;
    display: none;
}

.menu {
    display: flex;
    flex-wrap: wrap;
    margin-right: 1rem;
}

a.navbar,
.custom-select {
    display: block;
    padding: 10px 12px;
    font-weight: bold;
    font-family: "vazir";
    font-size: .9rem;
    color: #fff;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    position: relative;
    text-align: center;
    margin-left: .5rem;
    background: linear-gradient(120deg,
            #1b2e42,
            #2a4868,
            #375e86,
            #2a4868,
            #1b2e42);
    cursor: pointer;
}

.custom-select:hover,
a.navbar:hover {
    color: #f0a8a8;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: linear-gradient(120deg, #1b2e42, #2a4868, #375e86, #2a4868, #1b2e42);
    border-radius: 6px;
    padding: 0;
    list-style: none;
    z-index: 100;
    font-size: 14px;
    font-weight: normal;
}

.custom-select:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li a {
    display: block;
    padding: 10px;
    color: white;
    text-decoration: none;
}

.dropdown-menu li a:hover {
    background: #2a4868;
    color: #f5cccc;
}

a.navbar span,
.custom-select span {
    position: relative;
    z-index: 1;
}

a.navbar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: auto;
    transition: left 0.4s ease;
    z-index: 0;
}

@media (max-width: 768px) {
    header {
        height: auto;
        padding: 1rem 0;
        background-size: auto 100px;
    }

    .header {
        margin-right: 2.5rem;
    }

    .header img {
        height: 50px;
        margin: 0 0.5rem;
    }

    .menu {
        display: none;
        flex-direction: column;
        align-items: center;
        align-items: right;
        width: 20rem;
    }

    .menu a {
        margin: 0.5rem;
        width: 15rem;
    }

    .custom-select {
        margin: 0.5rem;
        width: 15rem;
    }

    .menu-toggle {
        display: block;
    }

    .menu.active {
        display: flex;
        background: none;
    }
}

@media (max-width: 480px) {
    header {
        height: 5rem;
        padding: 1rem 0;
        background-size: auto 70px;
    }

    .header img {
        height: 40px;
        margin: -0.7rem 0.2rem;
    }

    .name {
        width: 200px;
    }

    .menu {
        display: none;
        flex-direction: column;
        align-items: center;
        align-items: right;
        width: 20rem;
    }

    .menu a {
        margin: 0.5rem;
        width: 15rem;
    }

    .menu-toggle {
        display: block;
    }

    .menu.active {
        display: flex;
        background: none;
    }
}

.main {
    width: 60%;
    height: 30rem;
    background-image: url(./img/3/content3.webp);
    background-repeat: no-repeat;
    background-size: contain;
    border: #1b2e42 0.5rem solid;
    border-radius: 0.5rem;
    margin: 0.5rem auto;
}

.main img {
    width: 40%;
    margin: 2rem 4rem;
}

.main p {
    font-size: 100%;
    margin-right: 1rem;
    font-weight: bold;
    line-height: 2;
}

.gallery {
    overflow: hidden;
    /* جلوگیری از خروج تصاویر از محدوده والد */
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-right: 1rem;
}

.gallery img {
    width: 150px;
    height: 150px;
    cursor: pointer;
    border: 2px solid #fc510d;
    border-top-right-radius: 1.75rem;
    border-bottom-left-radius: 1.75rem;
}

.gallery img:hover {
    border: 4px solid #adbe0d;
    border-top-right-radius: 0rem;
    border-bottom-left-radius: 0rem;
    box-shadow: 5px 5px 40px red;
}

.pic {
    margin: 1rem 1rem 0 0rem;
    border-top-right-radius: 2rem;
    border-bottom-left-radius: 2rem;
    text-align: center;

}

.description {
    margin-top: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    background-color: #f9f9f9;
    font-size: 16px;
    margin-bottom: 4rem;
    text-align: justify;
}


@media (max-width: 768px) {
    .main {
        width: 88%;
        height: 30rem;
        background-size: contain;
        border: #1b2e42 0.5rem solid;
        margin: 0.5rem auto;
    }

    .main p {
        font-size: 15px;
    }


    .gallery {
        margin: 1rem;
    }

    .description {
        font-size: 14px;
    }

    .pic p {
        font-size: 14px;
    }

}

@media (max-width: 480px) {
    .main {
        margin: 1rem 1rem;
        height: 28rem;
    }

    .main p {
        font-size: 13px;
    }

    .gallery img {
        width: 100px;
        height: 100px;
        border: 1px solid #fc510d;
        border-top-right-radius: 1rem;
        border-bottom-left-radius: 1rem;
    }

    .description {
        font-size: 12px;
    }

    .pic p {
        font-size: 14px;
    }

}

footer {
    height: auto;
    background-image: url(./img/fixed/footerback.png);
    background-repeat: no-repeat;
    background-size: 1500px 380px;
    margin-top: 2rem;
    padding: 3rem 2rem 1rem 2rem;
}

footer h2 {
    font-size: 1rem;
    text-align: center;
    font-weight: bold;
    color: white;
    border-bottom: 0.1rem solid white;
}

footer h3 {
    font-size: 0.9rem;
    color: white;
    margin: 0;
    text-align: center;
}

.masengers {
    color: rgb(182, 174, 255);
    margin: 0;
}

.page {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}

.page img {
    width: 2rem;
    margin: 0.5rem;
    opacity: 0.5;
}

.page img:hover {
    opacity: 1;
}

.contact {
    display: flex;
    margin-bottom: 1rem;
}

.contact img {
    width: 1.5rem;
    margin: 0 0.5rem;
}

.contact p {
    font-size: 0.9rem;
}


@media screen and (max-width: 768px) {
    footer {
        background-size: cover;
    }

}

@media screen and (max-width: 480px) {

    footer h2 {
        text-align: right;
        font-size: 0.9rem;
    }

    footer h3 {
        text-align: right;
        font-size: 0.7rem;
    }

    .page {
        justify-content: right;
        margin-right: 2rem;
    }

    .contact img {
        width: 1rem;
    }

    .contact p {
        font-size: 0.5rem;
    }

}