:root {
    --dark: rgba(2, 23, 15, 1); /* Темный фон меню */
    --white: #fff;
    --gap: 20px;
    --overlay: rgba(0, 0, 0, 0.5); /* Затемнение фона страницы при открытом меню */
    --menu-text-color: #eee; /* Более светлый текст для меню, как на скриншоте */
    --menu-active-color: #fff; /* Цвет активного текста меню */
    --menu-submenu-link-color: #ccc; /* Цвет ссылок подменю */
    --menu-nested-header-color: #ccc; /* Цвет заголовков вложенных пунктов */
    --menu-nested-link-color: #aaa; /* Цвет ссылок вложенных подменю */
}

@font-face {
    font-family: "ABChanel Corpo Light";
    src: url("https://db.onlinewebfonts.com/t/08d38d30f8748388c11592e40dd0ad68.eot");
    src: url("https://db.onlinewebfonts.com/t/08d38d30f8748388c11592e40dd0ad68.eot?#iefix")format("embedded-opentype"),
    url("https://db.onlinewebfonts.com/t/08d38d30f8748388c11592e40dd0ad68.woff2")format("woff2"),
    url("https://db.onlinewebfonts.com/t/08d38d30f8748388c11592e40dd0ad68.woff")format("woff"),
    url("https://db.onlinewebfonts.com/t/08d38d30f8748388c11592e40dd0ad68.ttf")format("truetype"),
    url("https://db.onlinewebfonts.com/t/08d38d30f8748388c11592e40dd0ad68.svg#ABChanel Corpo Light")format("svg");
}

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

body {
    font-family: "ABChanel Corpo Light", sans-serif;
    overflow-x: hidden;
    transition: margin-left 0.3s ease;
}

body.no-scroll {
    overflow: hidden; /* Блокировка прокрутки фона при открытом меню */
}

/* Оверлей при открытом меню */
body.no-scroll::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--overlay);
}

.container {
    width: 85%;
    max-width: 1200px;
    margin: 0 auto;
}

.header {
    position: relative;
    z-index: 1;
    min-height: 400px;
    padding: 30px 0;
    display: flex;
    flex-direction: column;
    color: var(--white);
    overflow: hidden;
}

.header-bg {
    position: absolute;
    inset: 0;
    background: url('./images/bg.png') center/cover no-repeat;
    z-index: 0;
    overflow: hidden;
}
.header-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.65);
    z-index: 1;
}


.header-inner {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-between;
    align-items: start;
    gap: 70px;
}

/* Стили для бургер-иконки */
.burger {
    font-size: 1.8rem;
    background: url('./images/icons/burger menu.svg') center/contain no-repeat;
    border: none;
    color: var(--white);
    cursor: pointer;
    width: 40px;
    height: 30px;
    display: block;
    padding: 0;
}

.lang-location {
    text-align: right;
    font-size: 0.8rem;
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-between;
    width: 100%;
    align-items: center;
}

.lang-location a {
    color: var(--white);
    text-decoration: none;
}

.lang-location a span {
    color: rgba(255, 255, 255, 0.65);
    transition: color 0.3s ease;
}

.lang-location a span.active {
    color: var(--white);
    font-weight: bold;
}

.header-title {
    position: relative;
    z-index: 0;
    margin-top: 4rem;
    text-align: center;
}

.header-title h1 {
    font-size: clamp(1.8rem, 5vw, 3rem);
    margin-bottom: 0.5rem;
}
.header-title p {
    font-size: 1rem;
    line-height: 1.4;
}


.nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    background: var(--dark);
    color: var(--white);
    z-index: 999;
    padding: 20px 25px;
    box-sizing: border-box;
    overflow-y: auto;
    transition: right 0.3s ease;
    box-shadow: -4px 0 10px rgba(0, 0, 0, 0.2);
}

.nav.open {
    right: 0; /* Показать меню */
}

.nav ul {
    list-style: none;
    padding: 0;
}

.nav a {
    color: var(--white);
    text-decoration: none;
}

/* Стили для основного списка меню */
.menu {
    margin-top: 44px;
}


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

.menu-item > .menu-header-toggle,
.menu-item > a {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 17.5px 0;
    background: none;
    border: none;
    color: var(--menu-text-color);
    font-size: 22px;
    font-weight: 300;
    cursor: pointer;
    width: 100%;
    text-align: center;
    text-transform: uppercase;
    transition: color 0.2s ease;
}

.menu-item > .menu-header-toggle:hover,
.menu-item > a:hover {
    color: var(--menu-active-color);
}

/* Активный пункт меню на мобилке */
.menu-item.active > .menu-header-toggle,
.menu-item.active > a {
    color: var(--menu-active-color);
    font-weight: bold;
}

/* Стили для стрелок раскрытия */
.accordion-arrow {
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--menu-text-color);
    border-bottom: 2px solid var(--menu-text-color);
    transform: rotate(45deg);
    transition: transform 0.3s ease;
    margin-left: 10px;
    flex-shrink: 0; /* Чтобы стрелка не сжималась */
}

.menu-item.open .accordion-arrow {
    transform: rotate(-135deg);
    margin-top: 5px;
}

/* Подменю первого уровня */
.submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out; /* Плавное раскрытие */
    padding-bottom: 10px;
}

.menu-item.open .submenu {
    max-height: 1000px; /* Достаточно большое значение, чтобы вместить все подпункты */
}

.submenu li {
    padding: 7.5px 0;
}

.submenu a {
    color: var(--menu-submenu-link-color);
    font-size: 15px;
    font-weight: 300;
    padding-left: 20px;
    display: block;
}

.submenu a:hover {
    color: var(--menu-active-color);
}


/* Вложенные пункты (второй уровень) */
.nested-menu-item {
    margin-top: 12px;
}

.nested-menu-item:last-child {
    border-bottom: none;
}

.nested-menu-header-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    padding-left: 20px;
    color: var(--menu-nested-header-color);
    font-size: 14px;
    font-weight: 300;
    cursor: pointer;
    text-transform: uppercase;
    transition: color 0.2s ease;
}

.nested-menu-header-toggle:hover {
    color: var(--menu-active-color);
}

.nested-menu-header-toggle .accordion-arrow.nested-arrow {
    width: 8px;
    height: 8px;
    margin-right: 5px;
    transform: rotate(45deg);
}

.nested-menu-item.open .nested-menu-header-toggle .accordion-arrow.nested-arrow {
    transform: rotate(-135deg);
    margin-top: 3px;
}

.nested-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out;
    padding-bottom: 5px;
}

.nested-menu-item.open .nested-submenu {
    max-height: 500px; /* Достаточно большое значение */
}

.nested-submenu li {
    padding: 5px 0;
}

.nested-submenu a {
    color: var(--menu-nested-link-color);
    font-size: 14px;
    padding-left: 40px;
}

.nested-submenu a:hover {
    color: var(--menu-active-color);
}


/* Футер меню */
.menu-footer {
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    width: fit-content;
    margin: 85px auto 0;
}

.menu-footer .phone-number {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--menu-text-color);
    font-size: 1em;
    margin-bottom: 15px;
    gap: 10px;
    font-weight: 300;
}

.socials {
    display: flex;
    justify-content: center;
    gap: 15px;
    font-size:36px;
}

.socials a {
    color: var(--menu-text-color);
    transition: color 0.3s ease;

}

.socials a:hover {
    color: var(--menu-active-color);
}


/* Крестик закрытия */
.close-menu {
    background: url('./images/icons/close.svg') center/contain no-repeat;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: block;
    margin-left: auto;
    padding: 0;
    position: sticky; /* Чтобы крестик оставался видимым при прокрутке меню */
    top: 0;
    right: 0;
    z-index: 1000;
    background-color: var(--dark);
    padding-left: 10px;
    padding-bottom: 10px;
}


/* Страны (выпадающее меню) */
.country-selector {
    position: relative;
    user-select: none;
}

.country-selector div {
    display: flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    color: white;
    font-size: 0.85rem;
    cursor: pointer;
}

.country-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 5px);
    background: #0d2d31;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    z-index: 10;
    min-width: 120px; /* Минимальная ширина, чтобы текст не обрезался */
    text-align: left;
}

.country-menu.open {
    display: block;
}

.country-menu li {
    margin-bottom: 0.4rem;
    list-style: none;
}

.country-menu li:last-child {
    margin-bottom: 0;
}

.country-menu a {
    color: white;
    text-decoration: none;
    font-size: 0.85rem;
    display: block;
    padding: 2px 0;
}

.country-menu a:hover {
    text-decoration: underline;
}

.arrow {
    display: block;
    width: 10px;
    height: 5px;
    background: url('./images/icons/arrow.svg') center/contain no-repeat;
    transition: transform 0.3s ease;
}


.breadcrumbs {
    font-size: 0.85rem;
    margin: 1rem auto;
    padding: 25px 0 0 ;
    color: #555;
}
.breadcrumbs a {
    text-decoration: none;
    text-transform: none;
    color: #555;
}
.breadcrumbs span {
    color: #000;
    font-weight: 600;
}

@media (min-width: 769px) {
    .breadcrumbs {
        padding: 35px 0 0 ;
    }
}


@media (min-width: 1024px) {
    .breadcrumbs {
        padding: 50px 0 0 ;
    }
}
/* Desktop layout */
@media (min-width: 1024px) {

    .header {
        position: relative;
        min-height: 400px;
        padding: 30px 0 145px;
        display: flex;
        flex-direction: column;
        color: var(--white);
        overflow: hidden;
    }

    .header-title h1 {
        font-size: 55px;
        margin-bottom: 18px;
        font-weight: 500;
    }
    .header-title p {
        font-size: 30px;
        line-height: 1.3;
        color: rgba(255, 255, 255, 0.8);
    }

    .header-inner {
      flex-direction: row;
      align-items: flex-start;
    }

    .lang-location {
        font-size: 15px;
        flex-direction: column;
        justify-content: space-between;
        width: fit-content;
        align-items: end;
        gap: 25px;
    }

    /* Скрыть бургер и крестик на десктопе */
    .burger, .close-menu {
        display: none;
    }

    /* Стили для навигации на десктопе */
    .nav {
        all: unset; /* Сбросить все стили, примененные для мобильного меню */
        position: relative;
        z-index: 2;
        margin-top: 1rem;
        background: none;
        box-shadow: none;
        max-width: unset;
        height: auto;
        overflow-y: visible;
        padding: 0;
    }

    .nav ul.menu {
        display: flex;
        justify-content: start;
        gap: 20px;
        flex-wrap: wrap;
        border-bottom: none;
        align-items: center;
    }

    .menu {
      margin-top: 0;
    }

    .menu-item.active > .menu-header-toggle,
    .menu-item.active > a {
        color: var(--menu-active-color);
        font-weight: 300;
        padding: 5px 10px;
        background-color:rgba(255, 255, 255, 0.2);
        border-radius: 12px;
    }

    .menu > li {
        margin-bottom: 0;
        border-bottom: none;
    }

    .menu-item {
        position: relative; /* Для позиционирования выпадающих подменю */
    }

    /* Заголовки пунктов меню на десктопе */
    .menu-item > .menu-header-toggle,
    .menu-item > a {
        padding: 0;
        font-size: 15px;
        font-weight: normal;
        text-transform: uppercase;
        color: var(--white);
    }

    .accordion-arrow {
        display: none;
    }

    /* Подменю на десктопе */
    .submenu, .nested-submenu {
        display: none; /* По умолчанию скрыто */
        position: absolute;
        background: var(--dark);
        padding: 0.5rem;
        border-radius: 6px;
        top: 100%;
        left: 0;
        min-width: 200px;
        z-index: 10;
        max-height: unset;
    }

    .menu-item:hover .submenu,
    .nested-menu-item:hover .nested-submenu {
        display: block;
    }

    .submenu li, .nested-submenu li {
        padding: 5px 0;
    }

    .submenu a, .nested-submenu a {
        padding: 5px 10px;
        font-size: 0.9em;
        white-space: nowrap;
    }

    .menu-footer {
        display: none;
    }

    body.no-scroll::before {
        display: none;
    }
}


/* Грид карточек */
.portfolio-grid {
    padding: 55px 0;
}

@media (min-width: 1024px) {
    .portfolio-grid {
        padding: 100px 0;
    }
}

.grid_mosaic {
    display: grid;
    gap: 40px;
    width: 100%;
    grid-template-columns: repeat(1, 1fr);
    grid-auto-rows: 50vw;
}

@media (min-width: 600px) {
    .grid_mosaic {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .grid_mosaic {
        grid-template-columns: repeat(10, 1fr);
        grid-auto-rows: 7vw; /* Автостроки приближаются к квадратам */
        grid-auto-flow: dense;
    }
}

/* Карточки */
.card {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    width: 100%;
    height: 100%;
    background-color: #ccc;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    transition: transform 0.3s ease;
}

/* Текстовая маска снизу */
.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent 60%);
    color: white;
    font-weight: 600;
    font-size: 1rem;
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
    border-radius: 0 0 12px 12px;
}

/* Размеры карточек на десктопе */
@media (min-width: 1024px) {
    .card:nth-child(1)  { grid-column: span 4; grid-row: span 3; }
    .card:nth-child(2)  { grid-column: span 3; grid-row: span 3; }
    .card:nth-child(3)  { grid-column: span 3; grid-row: span 2; }
    .card:nth-child(4)  { grid-column: span 4; grid-row: span 3; }
    .card:nth-child(5)  { grid-column: span 3; grid-row: span 4; }
    .card:nth-child(6)  { grid-column: span 3; grid-row: span 4; }
    .card:nth-child(7)  { grid-column: span 4; grid-row: span 3; }
    .card:nth-child(8)  { grid-column: span 3; grid-row: span 2; }
    .card:nth-child(9)  { grid-column: span 3; grid-row: span 2; }
    .card:nth-child(10) { grid-column: span 3; grid-row: span 2; }
    .card:nth-child(11) { grid-column: span 3; grid-row: span 3; }
    .card:nth-child(12) { grid-column: span 4; grid-row: span 3; }
    .card:nth-child(13) { grid-column: span 3; grid-row: span 2; }
}


/* Ховер для десктопа */
@media (hover: hover) and (pointer: fine) {
    .card:hover img {
        transform: scale(1.05);
    }
}