header .header-nav-menu{
    position: relative;
    display: flex;
    flex-direction: row;
    list-style: none;
    margin: 0;
    padding: 0;
}

header .header-nav-menu li{
    display: flex;
    flex-direction: row;
    align-items: center;
}

header .header-nav-menu li,
header .header-nav-menu li a {
    color: #0E4194;
    text-align: center;
    font-family: "Source Sans 3";
    font-size: 24px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
}

header .header-nav-menu li.current-menu-item,
header .header-nav-menu li.current-menu-item > a{
    color: #0E4194;
    text-align: center;
    font-family: "Source Sans 3";
    font-size: 24px;
    font-style: normal;
    font-weight: 700;
    line-height: normal;
}

/* Пункт меню с детьми — точка отсчёта для подменю. */
header .header-nav-menu li.menu-item-has-children {
    position: relative;
}

/* Стрелка */
header .header-nav-menu li.menu-item-has-children > a::after {
    content: "";
    display: inline-block;
    width: 15px;
    height: 8px;
    margin-left: 0.4rem;
    background-image: url("../../images/pfeil_unten.svg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    transition: transform 0.3s ease;
}

header .header-nav-menu li.menu-item-has-children:hover > a::after {
    transform: rotate(180deg);
}

/* Сам блок подменю. */
header .header-nav-menu .sub-menu {
    position: absolute;
    top: calc(100% + 27px);
    left: 0;
    display: flex;                 /* НЕ display: none — иначе не анимируется */
    flex-direction: column;
    min-width: 260px;
    list-style: none;
    margin: 0;
    padding: 8px 16px 14px 25px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    z-index: 50;
    font-family: "Source Sans 3";
    font-size: 24px;
    color: #0E4194;

    /* Плавное открытие */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition:
            opacity   0.25s ease,
            transform 0.25s ease,
            visibility 0s linear 0.25s;   /* скрытие — после затухания */
    pointer-events: none;
}

/* Невидимый «мост» между ссылкой и подменю.
   Перехватывает hover, пока мышь двигается по пустоте. */
header .header-nav-menu .sub-menu::before {
    content: "";
    position: absolute;
    top: -27px;        /* столько же, сколько визуальный отступ */
    left: 0;
    right: 0;
    height: 27px;
    background: transparent;
}

/* Показ при наведении (и при фокусе с клавиатуры). */
header .header-nav-menu li:hover > .sub-menu,
header .header-nav-menu li:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
    transition:
            opacity   0.25s ease,
            transform 0.25s ease,
            visibility 0s linear 0s;      /* показ — сразу */
}

/* Пункты подменю. */
header .header-nav-menu .sub-menu li {
    display: block;
}

header .header-nav-menu .sub-menu a {
    display: block;
    padding: 0.5rem 0;
    color: #0E4194;
    text-decoration: none;
    transition: color 0.2s ease;
}

header .header-nav-menu .sub-menu a:hover {
    color: #1d1d1b;
}





header .site-header__meta{
    display: flex;
    flex-direction: row;
}

header .site-socials {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

header .site-socials a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    transition: opacity 0.2s ease;
}

header .site-socials a:hover {
    opacity: 0.7;
}

header .site-socials img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}