.site-header,
.mobile-menu {
    --header-pink: #ec4c87;
    --header-pink-dark: #d92f70;
    --header-pink-light: #fc90b8;
    --header-content-width: 1200px;
}

.site-header {
    height: 73px;
    border-top: 8px solid var(--header-pink);
    background: #fff;
}

.site-header,
.site-header *,
.site-header *::before,
.site-header *::after,
.mobile-menu,
.mobile-menu *,
.mobile-menu *::before,
.mobile-menu *::after,
.mobile-menu-overlay {
    box-sizing: border-box;
}

.site-header a,
.mobile-menu a {
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.site-header button,
.mobile-menu button {
    font: inherit;
    -webkit-tap-highlight-color: transparent;
}

.site-header__inner {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    width: min(calc(100% - 32px), var(--header-content-width));
    height: 63px;
    margin: 0 auto;
    padding: 7px 8px 8px;
}

.site-header__brand {
    display: flex;
    flex-direction: column;
    align-self: stretch;
    justify-content: space-between;
}

.site-header__description {
    margin: 0;
    color: #4d484a;
    font-size: 0.98rem;
    line-height: 1.25;
}

.site-header__logo {
    display: block;
    width: fit-content;
    color: var(--header-pink);
    font-size: 2.8rem;
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: 0.02em;
}

.site-header__links {
    display: flex;
    align-items: center;
    gap: 18px;
}

.favorite-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--header-pink);
    font-size: 1rem;
    line-height: 1.2;
    transition: color 0.2s ease, transform 0.2s ease;
}

.favorite-link__count {
    position: absolute;
    top: 54%;
    left: 50%;
    width: 100%;
    color: #fff;
    font-size: 1rem;
    font-family: Arial, sans-serif;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    transform: translate(-50%, -50%) translate(2px, 0);
    pointer-events: none;
    text-shadow: 0 1px 1px rgba(100, 36, 61, 0.25);
}

.favorite-link__count[hidden] {
    display: none;
}
/*
.favorite-link__icon {
    display: grid;
    position: relative;
    width: 32px;
    height: 32px;
    margin-bottom: 1px;
    border-radius: 50%;
    color: #fff;
    background: var(--header-pink);
    place-items: center;
    font-family: Arial, sans-serif;
    font-size: 2.1rem;
    font-weight: 700;
    line-height: 1;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
*/
.favorite-link__icon {
    display: grid;
    position: relative;
    width: 33px;
    height: 33px;
    margin-bottom: 1px;
    border-radius: 0;
    color: var(--header-pink);
    background: transparent;
    place-items: center;
    font-size: 3rem;
    font-weight: 400;
    line-height: 1;
}
.favorite-link:focus-visible {
    border-radius: 4px;
    outline: 2px solid var(--header-pink);
    outline-offset: 4px;
}

@media (hover: hover) {

    .favorite-link:hover .favorite-link__icon {
				color: var(--header-pink-light);
        background: transparent;
        transform: scale(1.08);
    }
}

.menu-button {
    display: none;
}

.mobile-menu,
.mobile-menu-overlay {
    display: none;
}

@media (max-width: 767px) {
    .site-header {
        height: 49px;
        border-top-width: 5px;
    }

    .site-header__inner {
        align-items: center;
        width: 100%;
        height: 44px;
        padding: 3px 8px 4px 10px;
    }

    .site-header__brand {
        display: block;
				padding-top: 3px;
    }

    .site-header__description {
        display: none;
    }

    .site-header__logo {
        font-size: 2.1rem;
        line-height: 1.6;
    }

    .site-header__links {
        align-self: stretch;
        gap: 10px;
    }

    .favorite-link {
        justify-content: center;
        font-size: 1.2rem;
    }

    .favorite-link__icon {
        width: 27px;
        height: 27px;
        font-size: 2.7rem;
    }

    .favorite-link__count {
        font-size: 0.9rem;
		    transform: translate(-50%, -50%) translate(3px, 0);

    }

    .menu-button {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 27px;
        height: 24px;
        margin: auto 0;
        padding: 0;
        border: 0;
        background: transparent;
        cursor: pointer;
    }

    .menu-button span {
        display: block;
        width: 100%;
        height: 4px;
        border-radius: 999px;
        background: var(--header-pink);
        transition: transform 0.25s ease, opacity 0.2s ease;
    }

    body.is-mobile-menu-open {
        overflow: hidden;
    }

    .mobile-menu-overlay {
        position: fixed;
        z-index: 1000;
        inset: 0;
        display: block;
        visibility: hidden;
        opacity: 0;
        background: rgba(37, 31, 33, 0.48);
        cursor: pointer;
        transition:
            opacity 0.42s ease-in-out,
            visibility 0s linear 0.42s;
    }

    .mobile-menu {
        position: fixed;
        z-index: 1001;
        top: 0;
        right: 0;
        display: flex;
        visibility: hidden;
        width: min(84vw, 340px);
        height: 100vh;
        height: 100dvh;
        overflow-y: auto;
        flex-direction: column;
        color: #3f373a;
        background: #fff;
        box-shadow: -8px 0 24px rgba(54, 36, 43, 0.18);
        opacity: 0;
        transform: translate3d(100%, 0, 0);
        transition:
            transform 0.52s cubic-bezier(0.65, 0, 0.35, 1),
            opacity 0.4s ease-in-out,
            visibility 0s linear 0.52s;
        overscroll-behavior: contain;
        will-change: transform, opacity;
    }

    body.is-mobile-menu-open .mobile-menu-overlay {
        visibility: visible;
        opacity: 1;
        transition:
            opacity 0.42s ease-in-out,
            visibility 0s linear 0s;
    }

    body.is-mobile-menu-open .mobile-menu {
        visibility: visible;
        opacity: 1;
        transform: translate3d(0, 0, 0);
        transition:
            transform 0.52s cubic-bezier(0.65, 0, 0.35, 1),
            opacity 0.4s ease-in-out,
            visibility 0s linear 0s;
    }

    .mobile-menu__header {
        display: flex;
        min-height: 66px;
        align-items: center;
        justify-content: space-between;
        padding: 10px 17px 10px 21px;
        border-top: 5px solid var(--header-pink);
        border-bottom: 1px solid #f0dfe5;
        background: #fff9fb;
    }

    .mobile-menu__title {
        margin: 0;
        color: var(--header-pink);
        font-size: 1.6rem;
        font-weight: 700;
        letter-spacing: 0.04em;
    }

    .mobile-menu__close {
        position: relative;
        width: 38px;
        height: 38px;
        padding: 0;
        border: 0;
        border-radius: 50%;
        background: #fff;
        cursor: pointer;
    }

    .mobile-menu__close span {
        position: absolute;
        top: 18px;
        left: 9px;
        display: block;
        width: 20px;
        height: 2px;
        border-radius: 999px;
        background: var(--header-pink);
    }

    .mobile-menu__close span:first-child {
        transform: rotate(45deg);
    }

    .mobile-menu__close span:last-child {
        transform: rotate(-45deg);
    }

    .mobile-menu__close:focus-visible,
    .mobile-menu__nav a:focus-visible {
        outline: 2px solid var(--header-pink);
        outline-offset: -2px;
    }

    .mobile-menu__nav {
        display: flex;
        min-height: 0;
        flex: 1 1 auto;
        flex-direction: column;
        padding: 8px 18px 24px;
    }

    .mobile-menu__list {
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .mobile-menu__list li {
        border-bottom: 1px solid #eee4e7;
    }

    .mobile-menu__list a {
        display: flex;
        min-height: 58px;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        padding: 10px 8px 10px 5px;
        color: #51474b;
        font-size: 1.4rem;
        font-weight: 600;
    }

    .mobile-menu__arrow {
        display: block;
        flex: 0 0 auto;
        width: 8px;
        height: 8px;
        margin-right: 4px;
        border-top: 1px solid var(--header-pink);
        border-right: 1px solid var(--header-pink);
        transform: rotate(45deg);
    }

    .mobile-menu__main-site {
        display: flex;
        min-height: 52px;
        align-items: center;
        justify-content: center;
        gap: 9px;
        margin-top: auto;
        padding: 12px 16px;
        border: 1px solid var(--header-pink);
        border-radius: 6px;
        color: var(--header-pink-dark);
        background: #fff7fa;
        font-size: 1.35rem;
        font-weight: 700;
    }

    .mobile-menu__external {
        font-size: 1.6rem;
        line-height: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .favorite-link,
    .favorite-link__icon,
    .menu-button span,
    .mobile-menu,
    .mobile-menu-overlay {
        transition: none;
    }
}
