﻿.hero .menu-toggle{
    display: none;
    position: fixed;
    top: 20px;
    right: 30px;
    z-index: 999;
    background-color: #D9D9D9;
    color: #2C3E50;
    width: 40px;
    height: 40px;
    border-radius: 20px;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
    &:hover{
        transform: scale(1.1); /* grows without affecting siblings */
    }
}

@media screen and (max-width: 1200px ) {

    .header {
        width: 350px;
        top: 0;
        right: 0;
        transform: translateX(100%);
        transition: transform  0.5s ease-in-out;
        height: 100dvh;
        overflow-y: auto;
        box-shadow: rgba(50, 50, 93, 0.25) 0px 6px 12px -2px, rgba(0, 0, 0, 0.3) 0px 3px 7px -3px;
    }

    .header.active {
        transform: translateX(0);
        right: 0;
    }

    .header .ch-header {
        flex-direction: column;
        height: 100dvh;
    }

    .header .ch-header .ch-header-right .logo {
        margin-top: 20px;
        margin-bottom: 20px;
        padding-bottom: 20px;
        padding-left: 0;
        margin-left: 0;
        border-left: 0;
        border-bottom: 1px solid #FFFFFF;
    }

    .header .ch-header .ch-header-right {
        flex-direction: column;
        align-items: start;
        margin-top: 60px;
    }

    .header .ch-header .ch-header-left {
        flex-direction: column-reverse;
        align-items: center;
        margin: auto 10px 10px;
        text-align: center;
        & .register a{
            padding: 10px 60px;
        }
    }

    .header .ch-header .ch-header-right .main-menu ul {
        flex-direction: column;
        gap: 30px;
    }

    .hero-title{
        display: flex;
    }

    .hero .menu-toggle{
        display: block;
    }
    .portal {
        top: calc(80px + 9vw);
    }

    .portal-button {
        width: 25vw;
        height: 12.5vw;

        & h2 {
            font-size: 1.5vw;
        }
    }

    .parallax {
        min-width: 120vw;
        left: -10vw;
    }

}

@media (max-aspect-ratio: 1/1) {
    .portal {
        flex-direction: column;
    }

    .portal-button {
        width: 40vh;
        height: 20vh;
        border-radius: 0.8vh;

        & h2 {
            font-size: 2.3vh;
            margin-bottom: 1.5vh;
        }
    }

}

@media screen and (max-width: 992px) {
    .iran-map-ch{
        /*flex-direction: column;*/
        justify-items: center;
        align-items: center;
        flex-wrap: wrap;
        gap: 10px;
    }
    .iran-map-svg{
        flex: 1 1 90%;
        width: 90%;
        height: 90%;
    }
    .iran-province{
        flex: 1 1 45%;
        width: 45%;
        height: 45%;
        aspect-ratio: 1/1;
        & a{
            width: 100%;
            height: 100%;
        }
    }
    .iran-province img{
        width: 100%;
        height: 100%;
        object-fit: scale-down;  /* scale and crop to fill container */
        display: block;
    }
    .iran-province-det{
        flex: 1 1 45%;
        width: 45%;
        height: 45%;
    }

}

@media screen and (max-width: 768px) {


    .hero-title {
        margin-top: 50px;
        & h1 {
            font-size: 4vw;
        }

        & img {
            width: 8vw;
        }
    }

    .portal {
        top: calc(80px + 16vw);
        gap: 2vh;
    }

    .parallax {
        min-width: 140vw;
        left: -20vw;

        &.front {
            bottom: -20px;
        }

        &.middle {
            bottom: 0;
        }

        &.back {
            bottom: 20px;
        }
    }

    .footer .footer-ch {
        flex-wrap: wrap;
    }

    .footer .footer-ch .footer-widgets {
        flex: 1 1 50%;
    }

}

@media screen and (max-height: 576px) {
    .parallax {
        &.front {
            bottom: -20px;
        }

        &.middle {
            bottom: -10px;
        }

        &.back {
            bottom: 0;
        }
    }

}

@media screen and (max-width: 576px) {

    .iran-map .iran-map-ch {
        padding: 0 10px;
    }

    .iran-map-svg{
        flex: 1 1 100%;
        width: 100%;
        height: 100%;
    }
    .iran-province{
        flex: 1 1 90%;
        width: 90%;
        height: 90%;
    }
    .iran-province-det{
        flex: 1 1 90%;
        width: 90%;
        height: 90%;
    }

    .footer .footer-ch {
        gap:20px;
        text-align: center;
    }

    .footer .footer-ch .footer-widgets {
        flex: 1 1 100%;
    }

}

@media screen and (max-width: 440px) {
    body.menu-open {
        overflow: hidden;
    }

    .header {
        width: 100%;
        transform: translateX(100%);
    }

    .portal-button {
        width: 40vh;
        height: 20vh;
        border-radius: 0.8vh;

        & h2 {
            font-size: 2.3vh;
            margin-bottom: 1.5vh;
        }
    }

}


@media (max-aspect-ratio: 45/100) {
    .portal-button {
        width: 30vh;
        height: 15vh;
        border-radius: 0.6vh;

        & h2 {
            font-size: 1.725vh;
            margin-bottom: 1.125vh;
        }
    }
}
