/* Глобальні змінні */
:root {
    --top-stripe-primary: #2A6F97;
    --top-stripe-secondary: #61A5C2;
    --top-stripe-accent: #FFD700;
    --top-stripe-dark: #012A4A;
    --top-stripe-light: #F0F4F8;
    --top-stripe-transitions: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Головний контейнер */
.top-stripe {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 24px;
    background: linear-gradient(225deg, rgba(34, 137, 199, 0.85), rgba(16, 110, 178, 0.93));
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    color: #ffffff;
    font-family: 'Roboto', sans-serif;
    position: relative;
    z-index: 1002;
}

/* Лого та заголовок - центр */
.top-stripe__header {
    grid-column: 2;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    max-width: 400px;
    margin: 0 10px;
}

.top-stripe__logo {
    height: 80px;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.5));
    transition: transform 0.3s ease,
    filter 0.3s ease;
    animation: glow 2s infinite alternate; /* Анімація світіння */
}

@keyframes glow {
    from {
        filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.5));
    }
    to {
        filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.8));
    }
}

.top-stripe__logo:hover {
    transform: scale(1.05) rotate(-5deg);
    animation: none; /* Зупиняємо анімацію при наведенні */
    filter: drop-shadow(0 0 16px rgba(255, 255, 255, 1)); /* Максимальне світіння */
}

.top-stripe__title {
    text-align: center;
    font-family: 'Hoefler Text', Georgia, 'Times New Roman', serif;
    font-size: 0.9rem;
    line-height: 1.2;
    opacity: 0.9;
}

.top-stripe__title-line {
    display: block;
}

/* Навігаційні кнопки - ліва секція */
.top-stripe__nav {
    grid-column: 1;
    justify-self: start;
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap; /* Додає адаптивність */
}

.top-stripe__nav-link {
    display: flex;
    font-size: 1.4rem;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.8rem;
    padding: 0.5rem 1.5rem;
    background: linear-gradient(145deg, rgba(31, 135, 185, 0.9), rgba(60, 149, 222, 0.71));
    border-radius: 10px;
    color: #ffffff;
    text-decoration: none;
    position: relative;
    transition: background 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1),
    inset 0 1px 2px rgba(255, 255, 255, 0.2);
    overflow: hidden;
    min-width: 150px; /* Мінімальна ширина для всіх */
    min-height: 20px; /* Фіксована висота */
    flex-shrink: 0; /* Запобігає зменшенню */
}


/* Активний стан (натискання) */
.top-stripe__nav-link:active {
    background: linear-gradient(145deg, rgba(32, 78, 121, 0.9), rgba(25, 95, 150, 0.85));
    box-shadow: inset 0 4px 6px rgba(0, 0, 0, 0.2), /* Внутрішня тінь для ефекту "заглиблення" */
    inset 0 2px 4px rgba(255, 255, 255, 0.2), /* Світлий блиск зверху */
    0 2px 4px rgba(0, 0, 0, 0.1); /* Зовнішня тінь для легкого зменшення */
    transform: scale(0.98); /* Легке зменшення розміру */
    transition: background 0.1s ease-in-out,
    box-shadow 0.1s ease-in-out,
    transform 0.1s ease-in-out;
}


/* Ефект блиску при ховері */
.top-stripe__nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
            90deg,
            transparent,
            rgba(255, 255, 255, 0.2),
            transparent
    );
    transition: 0.6s;
}

.top-stripe__nav-link:hover::before {
    left: 100%;
}

/* Випадаюче меню */
/* Додаємо позицію для батьківського елемента */
.dropdown {
    position: relative;
}

/* Стрілочка для індикації випадаючого меню */
.dropdown-arrow {
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 8px;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid rgba(255, 255, 255, 0.8);
    transition: transform 0.3s ease;
}

.dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

/* Покращена анімація випадаючого меню */
.dropdown-menu {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transform-origin: top center;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    width: 240px;
    padding: 8px 0;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.dropdown-menu i {
    padding-right: 7px;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Покращені посилання в меню */
.dropdown-link {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    color: #1E4D72;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
    white-space: nowrap;
    font-size: 18px;
}

.dropdown-link:hover {
    background: rgba(31, 135, 185, 0.08);
    padding-left: 20px;
    color: #1A3650;
}

/* Ефект підкреслення при ховері */
.dropdown-link::after {
    content: '';
    position: absolute;
    left: 16px;
    right: 100%;
    bottom: 8px;
    height: 1px;
    background: rgba(30, 77, 114, 0.3);
    transition: right 0.3s ease;
}

.dropdown-link:hover::after {
    right: 16px;
}

/* Плавніший перехід для основної кнопки */
.top-stripe__nav-link {
    transition: all 0.3s ease, box-shadow 0.3s ease;
}

/* Мінімальні зміни при наведенні на кнопку */
.dropdown:hover .top-stripe__nav-link {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Фокус-стан для доступності */
.top-stripe__nav-link:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
    box-shadow: 0 0 12px rgba(31, 135, 185, 0.5);
}


/* Ховер-ефекти */
.top-stripe__auth-button:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* Авторизація - ліва секція */
.top-stripe__auth {
    grid-column: 3;
    justify-self: end;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.top-stripe__auth-button {
    padding: 0.7rem 1.5rem;
    border-radius: 10px;
    font-size: 1.3rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    gap: 6px;
    transition: var(--top-stripe-transitions);
    min-width: 70px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1),
    0 1px 3px rgba(0, 0, 0, 0.08); /* Базова тінь */
}

.top-stripe__auth-button i {
    margin: 0;
    padding: 0;
    font-size: 1.1em;
}


.top-stripe__auth-button--login {
    background: var(--top-stripe-accent);
    color: var(--top-stripe-dark);
    box-shadow: 0 4px 6px rgba(255, 215, 0, 0.2),
    0 1px 3px rgba(255, 215, 0, 0.15); /* Тінь з акцентним кольором */
}

.top-stripe__auth-button--logout {
    background: #FF6B6B;
    color: white;
    box-shadow: 0 4px 6px rgba(255, 107, 107, 0.2),
    0 1px 3px rgba(255, 107, 107, 0.15); /* Тінь з кольором кнопки */
}

/* Ховер-ефекти з тінню */
.top-stripe__auth-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 14px rgba(0, 0, 0, 0.15),
    0 3px 6px rgba(0, 0, 0, 0.12); /* Тінь при наведенні */
}

.top-stripe__auth-button:active {
    transform: translateY(1px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1),
    0 1px 2px rgba(0, 0, 0, 0.08); /* Тінь при натисканні */
}



/* Адаптація */
/* 1366px і менше */
@media (max-width: 1566px) {
    .top-stripe {
        padding: 8px 16px;
    }

    .top-stripe__logo {
        height: 60px;
    }

    .top-stripe__nav {
        gap: 0.6rem;
    }

    .top-stripe__nav-link {
        font-size: 1.2rem;
        padding: 0.5rem 1.2rem;
        min-width: 130px;
        min-height: 20px;
    }

    .dropdown-menu {
        width: 230px;
    }

    .dropdown-link {
        font-size: 16px;
        padding: 8px 12px;
    }

    .top-stripe__auth-button {
        padding: 0.6rem 1.2rem;
        font-size: 1.1rem;
        min-width: 60px;
    }

}

/* 1200px і менше */
@media (max-width: 1200px) {
    .top-stripe__title {
        font-size: 0.8rem;
    }

    .top-stripe__nav-link {
        font-size: 1.1rem;
        padding: 0.5rem 1rem;
        min-width: 125px;
        gap: 0.5rem;
    }

    .dropdown-arrow {
        margin-left: 5px;
        border-width: 4px;
    }

    .dropdown-menu {
        width: 200px;
        padding: 6px 0;
    }

    .dropdown-link {
        font-size: 14px;
    }

}

@media (min-width: 993px) {
    .navi-trigger,
    .navi-mobile-header,
    #naviOverlay,
    .navi-mobile-close,
    .only-mobile {
        display: none !important;
    }
}


@media (max-width: 992px) {
    .top-stripe {
        height: auto !important;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 18px 10px;
        gap: 1rem;
    }

    .navi-trigger {
        display: flex;
        margin-left: 6px;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 40px;
        height: 40px;
        background: transparent;
        border: none;
        gap: 5px;
        cursor: pointer;
    }

    .navi-trigger .line {
        width: 24px;
        height: 3px;
        background-color: #fff;
        border-radius: 2px;
        transition: all 0.3s ease;
    }

    .top-stripe__nav,
    .top-stripe__header {
        display: none !important;
    }

    .top-stripe__auth {
        display: flex;
        align-items: center;
        gap: 0.8rem;
        margin-left: auto;
        flex-shrink: 0;
    }

    .top-stripe__auth-profile {
        white-space: nowrap;
        font-size: 1rem;
    }

    .top-stripe__auth-button {
        font-size: 1rem;
        padding: 0.5rem 1rem;
    }
}



