@import url('https://www.freefontdownload.org/en/avenir-lt-std-85-heavy.font');
@import url('https://www.download-free-fonts.com/index.php?page=details&id=94265');
/*@import url('https://fonnts.com/font_weights/arquitectabold-otf/');*/

body {
    margin: 0;
    font-family: "Avenir LT Std", sans-serif;
    box-sizing: border-box;
    overflow-x: hidden;
}

.main {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Логотип */
.logo {
    position: absolute;
    top: 2vh;
    left: 5vw;
    font-family: "Avenir LT Std", sans-serif;
    font-weight: bold;
    font-size: 1.5vw;
    color: #000;
    z-index: 10;
}

/* Меню */
.nav-links {
    position: absolute;
    top: 2vh;
    right: 3.9vw;
    display: flex;
    flex-direction: row;
    font-weight: bold;
    gap: 7vw;
    z-index: 10;
}

.nav-links a {
    font-family: "Avenir LT Std", sans-serif;
    font-size: 1.5vw;
    color: #000;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #666;
}

/* Адаптивный дизайн */
@media (max-width: 768px) {
    .PHOTOGRAPHER {
        margin: 10vw 5vw 0vw 5vw;
        font-family: "Avenir LT Std", sans-serif;
        font-size: 5vw;
        line-height: 1.2;
    }
    .main {
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        position: relative;
    }
    /* Меню */
    .menu-toggle {
        display: flex;
        position: absolute;
        top: 1.5vh;
        right: 2vw;
        width: 24px;
        height: 18px;
        flex-direction: column;
        justify-content: space-between;
        cursor: pointer;
        z-index: 10;
        transition: transform 0.3s;
    }

    .menu-toggle .bar {
        width: 100%;
        height: 2px;
        background: #1b1b1b;
        transition: transform 0.3s, opacity 0.3s;
        transform-origin: center;
    }

    /* Состояние крестика */
    .menu-toggle.open .bar:nth-child(1) {
        transform: translate(6px, -1px) rotate(45deg); /* Смещение и вращение */
        transform-origin: left top; /* Точка вращения: верхний левый угол */
    }

    .menu-toggle.open .bar:nth-child(2) {
        transform: scale(0); /* Скрываем среднюю полоску, уменьшая ее размер */
    }

    .menu-toggle.open .bar:nth-child(3) {
        transform: translate(-3px, -20px) rotate(-45deg); /* Смещение и вращение */
        transform-origin: right bottom; /* Точка вращения: нижний правый угол */
    }

    .nav-links {
        display: none;
        top: 2vh;
        left: 5vw;
        gap: 5vw;
        padding: 0;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        font-size: 4vw;
    }

    .logo.hidden {
        display: none;
    }

    /* Логотип */
    .logo {
        position: absolute;
        top: 2vh;
        left: 5vw;
        font-family: "Avenir LT Std", sans-serif;
        font-size: 4vw;
        color: #000;
        z-index: 10;
    }
    /* Портфолио */
    /* Портфолио */
    .portfolio {
        width: 100%;
        margin: 0 auto; /* Center the entire portfolio container */
        padding: 1rem;
        display: flex;
        justify-content: center; /* Center the grid horizontally */
        align-items: center; /* Center the grid vertically if needed */
        flex-direction: column; /* Ensure rows stack vertically */
    }

    .grid {
        display: flex;
        flex-direction: column;
        gap: 1vw;
        align-items: center; /* Ensure grid rows are centered */
        justify-content: center;
        width: 100%;
    }

    .grid-row {
        width: 100%;
        display: flex;
        justify-content: center; /* Center images in each row */
        flex-wrap: wrap; /* Ensure images wrap correctly on smaller screens */
    }

    .grid-row img {
        height: auto;
        max-width: 100%;
        margin: 1px;
    }


    .grid-row:nth-child(1) img {
        flex: 1;
        max-width: calc(19.4%);
    }

    .grid-row:nth-child(2) img {
        width: 99%;
        max-width: none;
    }

    /*.grid-row:nth-child(3) #center {*/
    /*    flex: 2;*/
    /*    max-width: calc(50%);*/
    /*}*/

    /*.grid-row:nth-child(3) img {*/
    /*    flex: 1;*/
    /*    max-width: calc(24%);*/
    /*}*/

    .grid-row:nth-child(3) img {
        flex: 1;
        max-width: calc(49.4%);
    }

    .grid-row:nth-child(4) img {
        width: 99%;
        max-width: none;
    }

    .grid-row:nth-child(5) img {
        flex: 1;
        max-width: calc(32.7%);
    }
}

/* Класс для скрытия логотипа */
.hidden {
    display: none;
}
a {
    font-family: "Avenir LT Std", sans-serif;
    font-size: 1.2vw;
    color: #000;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.3s;
}

@media (min-width: 768px) {
    .PHOTOGRAPHER {
        margin: 5vw 5vw 0vw 3vw;
        font-family: "Avenir LT Std", sans-serif;
        font-size: 5vw;
        line-height: 1.2;
    }
    /* Портфолио */
    .portfolio {
        width: 100%;
        margin: 0 auto; /* Center the entire portfolio container */
        padding: 1rem;
        display: flex;
        justify-content: center; /* Center the grid horizontally */
        align-items: center; /* Center the grid vertically if needed */
        flex-direction: column; /* Ensure rows stack vertically */
    }

    .grid {
        display: flex;
        flex-direction: column;
        gap: 1vw;
        align-items: center; /* Ensure grid rows are centered */
        justify-content: center;
        width: 100%;
    }

    .grid-row {
        width: 95%;
        display: flex;
        justify-content: center; /* Center images in each row */
        flex-wrap: wrap; /* Ensure images wrap correctly on smaller screens */
    }

    .grid-row img {
        height: auto;
        max-width: 100%;
        margin: 1px;
    }


    .grid-row:nth-child(1) img {
        flex: 1;
        max-width: calc(20%);
    }

    .grid-row:nth-child(2) img {
        width: 100%;
        max-width: none;
    }

    /*.grid-row:nth-child(3) #center {*/
    /*    flex: 2;*/
    /*    max-width: calc(50%);*/
    /*}*/

    /*.grid-row:nth-child(3) img {*/
    /*    flex: 1;*/
    /*    max-width: calc(25%);*/
    /*}*/

    .grid-row:nth-child(3) img {
        flex: 1;
        max-width: calc(50%);
    }

    .grid-row:nth-child(4) img {
        width: 100%;
        max-width: none;
    }

    .grid-row:nth-child(5) img {
        flex: 1;
        max-width: calc(33.3333%);
    }
}
