/* Шапка EUROSPACE: геометрия по исходному 1С-Битрикс шаблону. */

.header_top-panel {
    background: #ede9e8;
    color: #52291c;
    padding: .5em 0;
}

.header_top-panel .row {
    align-items: center;
}

.header_top-menu {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 -.3em;
    padding-right: 5%;
    font-size: .75rem;
}

.header_top-menu li {
    padding: 0 .3em;
}

.header_top-menu a {
    color: #52291c;
    border-bottom-color: transparent;
    transition: color .3s, border-bottom-color .3s;
    white-space: nowrap;
}

.header_top-menu a:hover {
    color: #52291c;
    border-bottom-color: #52291c;
}

.header_right-column {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-left: 6.2%;
}

.head_phone-number {
    margin-left: 8%;
    color: #52291c;
    font-size: .875rem;
    font-weight: 500;
    white-space: nowrap;
}

.head_phone-number:first-of-type {
    margin-left: 0;
}

.es-top-actions {
    display: flex;
    align-items: center;
    margin-left: auto;
}

.es-top-actions li {
    padding: 0 .58em;
}

.es-top-actions li:last-child {
    padding-right: .2em;
}

.es-top-actions a {
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: none;
    color: inherit;
    transition: filter .3s;
}

.es-top-actions a:hover {
    filter: brightness(0) saturate(100%) invert(80%) sepia(10%) saturate(7389%) hue-rotate(326deg) brightness(100%) contrast(90%);
}

.es-top-actions img {
    display: block;
    width: 20px;
    height: 20px;
    object-fit: contain;
}

/* Вторая строка: логотип | рейтинги | основное меню. */
.eurospace-site-header .main-head .es-main-header-row {
    display: grid !important;
    grid-template-columns: clamp(260px, 17vw, 340px) minmax(250px, auto) minmax(360px, 1fr) !important;
    align-items: center !important;
    gap: clamp(18px, 2.5vw, 42px) !important;
    min-height: 122px !important;
}

.es-main-header-logo {
    width: clamp(260px, 17vw, 340px);
    min-width: clamp(260px, 17vw, 340px);
    max-width: 340px;
    justify-self: start;
    align-self: center;
}

.es-main-header-logo .head-logo,
.es-main-header-logo .logo,
.es-main-header-logo .logo img {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
}

.es-main-header-ratings:not([hidden]) {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    align-items: stretch;
    gap: 10px;
    width: auto !important;
    min-width: 250px;
    margin: 0;
    padding: 0;
    justify-self: start;
}

.eurospace-site-header .eurospace-rating-widget {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 2px 8px;
    min-width: 118px;
    min-height: 46px;
    padding: 7px 10px;
    border: 1px solid #dfd1c9;
    border-radius: 10px;
    color: #52291c !important;
    background: #fff;
    text-decoration: none !important;
    box-shadow: none;
}

.eurospace-site-header .eurospace-rating-widget__platform {
    font-size: 11px;
    font-weight: 700;
    line-height: 1.05;
    white-space: nowrap;
}

.eurospace-site-header .eurospace-rating-widget__score {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.eurospace-site-header .eurospace-rating-widget__star {
    color: #d29b26;
    font-size: 13px;
    line-height: 1;
}

.eurospace-site-header .eurospace-rating-widget__count {
    grid-column: 1 / -1;
    color: #856d63;
    font-size: 10px;
    line-height: 1.1;
    white-space: nowrap;
}

.eurospace-site-header .eurospace-rating-widget.is-2gis .eurospace-rating-widget__platform {
    color: #168f4e;
}

.eurospace-site-header .eurospace-rating-widget.is-yandex .eurospace-rating-widget__platform {
    color: #d9342b;
}

.es-main-nav {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    align-items: center;
    gap: clamp(22px, 2.2vw, 38px);
    min-width: 0;
    justify-self: start;
}

.es-main-nav__item {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.es-main-nav__link,
.es-main-nav__arrow-button {
    display: inline-flex;
    align-items: center;
    padding: 0;
    border: 0;
    color: #52291c;
    background: transparent;
    font-family: inherit;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none !important;
    white-space: nowrap;
}

.es-main-nav__arrow-button {
    margin-left: 8px;
    cursor: pointer;
}

.es-main-nav__arrow-button span {
    display: block;
    font-size: 15px;
    line-height: 1;
    transition: transform .2s ease;
}

.es-main-nav__item--parent.is-open .es-main-nav__arrow-button span {
    transform: rotate(180deg);
}

.es-main-nav__dropdown {
    position: absolute;
    top: calc(100% + 14px);
    left: 0;
    z-index: 60;
    display: none;
    min-width: 250px;
    padding: 14px 0;
    border: 1px solid #dfd1c9;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 14px 40px rgba(82, 41, 28, .12);
}

.es-main-nav__item--parent.is-open .es-main-nav__dropdown {
    display: block;
}

.es-main-nav__dropdown ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.es-main-nav__dropdown li + li {
    margin-top: 4px;
}

.es-main-nav__dropdown a {
    display: block;
    padding: 10px 18px;
    color: #52291c !important;
    font-size: 16px;
    line-height: 1.35;
    text-decoration: none !important;
}

.es-main-nav__dropdown a:hover {
    background: #f7f0ec;
}

.es-main-header-mobile-actions {
    display: none;
}

@media (min-width: 992px) {
    .es-main-nav__item--parent:hover .es-main-nav__dropdown {
        display: block;
    }
}

@media (min-width: 992px) and (max-width: 1300px) {
    .eurospace-site-header .main-head .es-main-header-row {
        grid-template-columns: 250px minmax(215px, auto) minmax(320px, 1fr) !important;
        gap: 16px !important;
        min-height: 112px !important;
    }

    .es-main-header-logo {
        width: 250px;
        min-width: 250px;
        max-width: 250px;
    }

    .es-main-header-ratings:not([hidden]) {
        min-width: 220px;
        gap: 6px;
    }

    .eurospace-site-header .eurospace-rating-widget {
        min-width: 105px;
        padding-right: 8px;
        padding-left: 8px;
    }

    .es-main-nav {
        gap: 20px;
    }

    .es-main-nav__link,
    .es-main-nav__arrow-button {
        font-size: 17px;
    }
}

@media (max-width: 991px) {
    .header_top-panel {
        display: none !important;
    }

    .eurospace-site-header .main-head .es-main-header-row {
        display: flex !important;
        min-height: 88px !important;
        gap: 14px !important;
    }

    .es-main-header-logo {
        width: min(260px, 64vw);
        min-width: 0;
        max-width: 260px;
        margin-right: auto;
    }

    .es-main-header-ratings,
    .es-main-nav {
        display: none !important;
    }

    .es-main-header-mobile-actions {
        display: flex;
        align-items: center;
        gap: 10px;
    }
}
