* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@font-face {
    font-family: Hero_light;
    src: url(../Fonts/Hero\ light.ttf);
}

@font-face {
    font-family: Hero_regular;
    src: url(../Fonts/Hero\ regular.ttf);
}

@font-face {
    font-family: BonaNova;
    src: url(../Fonts/BonaNovaSC-Regular.ttf);
}

.container {
    margin: 0 8.5vw;
}

body {
    background-color: #F6F9FA;
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    width: 100%;
}

header {
    background-color: #595D5E;
    height: 5vw;
}

/* Мобильный header */
.mobile-header {
    display: none;
}

.mobile-menu {
    margin: 0 4vw;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 5vw;
}

.mobile-menu h1 {
    font-family: BonaNova;
    font-weight: 100;
    font-size: 3vw;
    color: #F6F9FA;
    padding-top: 0.5vw;
}

/* Стили для десктопного меню */
.main_menu {
    display: flex;
    list-style-type: none;
    align-items: center;
    gap: 2vw;
}

.main_menu a {
    text-decoration: none;
    font-family: Hero_regular;
    font-size: 1.2vw;
    color: #F6F9FA;
}

.menu-search, .menu-header {
    display: none;
}

.desktop-icons {
    display: flex;
    gap: 1vw;
}

.desktop-icons img {
    height: 1.5vw;
}

/* Мобильные стили */
@media (max-width: 768px) {
    .mobile-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 10px 5px 10px;
        background-color: #595D5E;
        position: relative;
        z-index: 1001;
        width: 100%;
    }

    .mobile-header h1 {
        font-family: BonaNova;
        font-weight: 100;
        font-size: 9vw;
        color: #F6F9FA;
        margin: 0;
        padding: 0;
    }

    .burger-menu {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        height: 20px;
        width: 30px;
        cursor: pointer;
        z-index: 1000;
    }

    .burger-menu span {
        width: 100%;
        height: 2px;
        background-color: #F6F9FA;
        transition: all 0.3s;
    }

    .search-icon {
        height: 24px;
    }

    .mobile-controls {
        display: flex;
        align-items: center;
        gap: 20px;
    }

    .mobile-menu {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: #595D5E;
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 80px 20px 20px;
        transition: left 0.3s ease;
        z-index: 999;
        margin: 0;
        box-sizing: border-box;
    }

    .mobile-menu.active {
        display: block;
    }

    .mobile-menu h1 {
        display: none;
    }

    .desktop-icons {
        display: none;
    }
}
h2 {
    font-family: Hero_regular;
    font-size: 2.5vw;
    color: #12171D;
    font-weight: 100;
}

.line {
    width: 9vw;
    height: 0.2vw;
    background-color: #595D5E;
}
.photo_main {
    display: flex;
    /* justify-content: center; */
    flex-direction: column;
    align-items: center;
    gap: 1vw;
    margin-top: 2vw;
    margin-bottom: 2vw;
    flex: 1;
}
.photo {
    height: 22vw;
    width: 22vw;
    position: relative;
    overflow: hidden;
}
.photo img{
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.photos{
    display: flex;
    flex-wrap: wrap;
    gap: 7.95vw;
    row-gap: 5vw;
    margin-top: 2vw;
    margin-bottom: 2vw;
}
footer {
    background-color: #595D5E;
    height: 5vw;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: auto;
}
footer p {
    font-family: Hero_regular;
    font-size: 1vw;
    color: #F6F9FA;
}
.copyright {
    font-size: 2vw !important;
    margin-right: 0.3vw;
}

/* Модальное окно для просмотра фотографий */
.photo-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease;
}

.photo-modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.photo-modal-content {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.photo-modal img {
    border-radius: 10px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s ease;
    max-width: 85vw;
    max-height: 85vh;
}

.photo-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: #F6F9FA;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.photo-modal-close:hover {
    color: #595D5E;
}

.photo-clickable {
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.photo-clickable:hover {
    opacity: 0.8;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoomIn {
    from { 
        opacity: 0;
        transform: scale(0.5);
    }
    to { 
        opacity: 1;
        transform: scale(1);
    }
}

/* Мобильные стили */
@media (max-width: 768px) {
    .container {
        margin: 0 20px;
        width: calc(100% - 40px);
    }

    body {
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        position: relative;
        overflow-x: hidden;
        width: 100%;
    }

    /* Мобильный header */
    .mobile-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 10px 5px 10px;
        background-color: #595D5E;
        position: relative;
        z-index: 1001;
        width: 100%;
        box-sizing: border-box;
    }

    .mobile-header h1 {
        font-family: BonaNova;
        font-weight: 100;
        font-size: 9vw;
        color: #F6F9FA;
        margin: 0;
        padding: 0;
    }

    /* Бургер меню */
    .burger-menu {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        height: 20px;
        width: 30px;
        cursor: pointer;
        z-index: 1000;
    }

    .search-icon {
        height: 24px;
    }

    .burger-menu span {
        width: 100%;
        height: 2px;
        background-color: #F6F9FA;
        transition: all 0.3s;
    }

    .burger-menu.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .burger-menu.active span:nth-child(2) {
        opacity: 0;
    }

    .burger-menu.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    /* Скрытие десктопного меню */
    header {
        height: auto;
    }

    .mobile-menu {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: #595D5E;
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 80px 20px 20px;
        transition: left 0.3s ease;
        z-index: 999;
        margin: 0;
        box-sizing: border-box;
    }

    .mobile-menu.active {
        display: block;
    }

    .mobile-menu h1 {
        display: none;
    }

    .menu-search, .menu-header {
        display: block;
        margin-bottom: 20px;
    }

    .menu-search {
        position: absolute;
        top: 80px;
        left: 20px;
    }

    .menu-search img {
        width: 24px;
        height: 24px;
    }

    .menu-header {
        position: absolute;
        top: 100px;
        left: 50%;
        transform: translateX(-50%);
    }

    .menu-header a {
        display: flex;
        align-items: center;
        gap: 5px;
        text-decoration: none;
        font-family: Hero_regular;
        font-size: 20px;
        color: #F6F9FA;
    }



    .menu-header img {
        width: 32px;
        height: 32px;
    }

    .mobile-controls {
        display: flex;
        align-items: center;
        gap: 20px;
    }

    .main_menu {
        position: relative;
        top: 95px;
        transform: none;
        text-align: center;
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }

    .main_menu li {
        width: 100%;
        margin: 0;
        padding: 18px 0;
        border-bottom: 1px solid #f6f9fa3f;
    }

    .main_menu li:last-child {
        border-bottom: none;
    }

    .main_menu a {
        font-size: 20px;
        font-weight: 100;
        font-family: Hero_light;
    }

    .sub_menu {
        display: none;
    }

    .desktop-icons {
        display: none;
    }

    /* Контент photo_template */
    .photo_main {
        margin-top: 30px;
        margin-bottom: 30px;
        gap: 20px;
        flex: 1;
        padding: 0 20px;
        justify-content: flex-start;
    }

    h2 {
        font-size: 32px;
        text-align: center;
    }

    .line {
        width: 80px;
        height: 2px;
        margin-bottom: 20px;
    }

    .photos {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 20px;
        /* margin: 20px 0; */
        align-items: center;
        flex-wrap: nowrap;
    }

    .photo {
        width: 320px;
        height: 320px;
        position: relative;
        overflow: hidden;
        box-shadow: 0 4px 15px rgba(0,0,0,0.1);

    }

    .photo img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        position: absolute;
        top: 0;
        left: 0;
        transform: none;
    }

    /* Footer */
    footer {
        height: auto;
        padding: 20px;
        margin-top: auto;
        position: relative;
        bottom: auto;
        left: auto;
        width: auto;
    }

    footer p {
        font-size: 14px;
    }

    .copyright {
        font-size: 20px !important;
        margin-right: 5px;
    }

    /* Модальное окно для мобильных */
    .photo-modal img {
        max-width: 90vw;
        max-height: 80vh;
    }
    
    .photo-modal-close {
        top: -50px;
        font-size: 25px;
        width: 35px;
        height: 35px;
    }
}

/* Прокрутка мобильного меню и списка пунктов */
@media screen and (max-width: 768px) {
    .mobile-menu {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        max-height: 100vh;
        padding: 60px 16px 16px; /* если уже есть — можно не дублировать */
    }
    .mobile-menu .main_menu {
        max-height: calc(100vh - 120px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Усиление для горизонтальной ориентации маленьких телефонов */
@media screen and (max-width: 768px) and (orientation: landscape) {
    .mobile-menu {
        padding-top: 56px;
        max-height: 100vh;
        overflow-y: auto;
    }
    .mobile-menu .main_menu {
        top: 30px; /* если используется относительное позиционирование */
        max-height: calc(100vh - 120px);
        overflow-y: auto;
    }
}