/* === Сброс и базовые стили === */
body {
    margin: 0;
    font-family: Arial, sans-serif;
}
@font-face {
    font-family: 'MerryChristmasStar';
    src: url('../fonts/MerryChristmasStar.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}
.hashtag {
    font-family: 'MerryChristmasStar', sans-serif;
    color:white;
    font_size:32px;
    text-decoration: none;
}
.hashtag a{
    color:#ffffff;
    font_size:32px;
    text-decoration: none;
}
.header {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: black;
    z-index: 100;
}
.container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    padding: 0 20px;
    box-sizing: border-box;
}

/* === Логотип и название === */
.branding {
    display: flex;
    align-items: self-end;
    gap: 10px;
}
.logo {
    display: flex;
    align-items: self-end;
    gap:5px;
}

.logo svg {
    height: 36px;
    width: 36px;
}

.title {
    font-size: 24px;
    color: white;
    text-decoration: none;
    cursor: pointer;
    line-height: 1;
    margin: 0;
}

.menu {
    position: absolute;
    right: 0px;
    display: flex;
    align-items: self-end;
    list-style: none;
    gap: 10px;
    margin: 0;
    padding: 0;
    height: 100%;
}

.menu li {
    display: flex;
    align-items: self-end;
}

/* === Ссылки меню === */
.menu li a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

.menu li a:hover {
    color: gray;
}

.submenu {
    display: none;
    position: absolute;
    top: 100%;
    max-width: 240px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 10px;
    padding: 10px 0;
    min-width: 160px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
    z-index: 50;
}
.menu li:hover {
    display: block;
}

.submenu li a {
    display: block;
    padding: 10px 20px;
    color: white;
}

/* === Меню с стрелками === */
.menu-item {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    position: relative;
}

.arrow {
    display: none; /* показываем только на мобилках */
    width: 10px;
    height: 10px;
    border-right: 2px solid white;
    border-bottom: 2px solid white;
    rotate: 45deg;
    transition: transform 0.3s ease;
    margin-left: 5px;
}

.rotated {
    transform: rotate(180deg);
}

/* === Бургер-меню === */
.menu-toggle {
    display: none;
    cursor: pointer;
    color: white;
    font-size: 2rem;
}
@media (max-width: 720px) {
    .hashtag {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    /* Основное меню */
    .menu {
        display: none;
        flex-direction: column;
        position: fixed;
        top: 70px;
        right: 0;
        width: 90%;
        height: calc(100vh - 70px);
        background-color: black;
        padding: 20px 0;  /* отступ сверху и снизу */
        z-index: 99;
        overflow-y: auto;
        gap: 0; /* убираем лишние промежутки между пунктами */
    }

    .menu.active {
        display: flex;
    }

    /* Пункты меню */
    .menu li {
        width: 100%;
        display: flex;
        flex-direction: column; /* чтобы подменю шло под пунктом */
        align-items: flex-start; /* выравниваем все элементы по левому краю */
        margin: 0;
        padding: 0;
    }

    .menu li a {
        display: block;
        width: 100%;
        padding: 12px 20px;
        text-align: left;
    }

    /* Подменю */
    .submenu {
        display: none;
        position: inherit;
        flex-direction: column;
        width: 100%;
        padding-left: 30px; /* немного отступ для подменю */
        margin: 0;
        background: none;
    }

    .submenu.active {
        display: flex;
    }

    /* Меню с стрелками */
    .menu-item {
        display: flex;
        justify-content: space-between; /* текст слева, стрелка справа */
        align-items: center;
        width: 90%;
        cursor: pointer;
    }

    /* Стрелки */
    .arrow {
        display: inline-block;
        transition: transform 0.3s ease;
    }

    .arrow.rotated {
        transform: rotate(180deg);
    }

    /* Заголовок */
    .title {
        font-size: 1.6em;
        margin-left: 0.75em;
    }
}

/* === Десктоп === */
@media (min-width: 721px) {
    .menu-toggle {
        display: none;
    }

    .menu {
        display: flex;
        position: absolute;
        right: 20px;
        align-items: self-end; /* исправлено */
    }

    .menu li {
        display: flex;
        position: relative;
        align-items: center; /* исправлено */
    }

    .submenu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        background: rgba(0, 0, 0, 0.7);
        border-radius: 10px;
        padding: 10px 0;
        min-width: 160px;
        max-width: 240px;
        box-shadow: 0 8px 16px rgba(0,0,0,0.3);
        z-index: 50;
        flex-direction: column;
    }

    /* Появление подменю при наведении мыши */
    .menu li:hover > .submenu {
        display: flex;
    }

    .submenu li a {
        padding: 10px 20px;
        color: white;
        display: block;
    }

    .arrow {
        display: none; /* стрелки скрыты на десктопе */
    }
}
