/* Landing Header Styles */

.landing-header {
    position: relative;
    z-index: 1000;
    width: 100%;
}

/* Hero вариант (для главной страницы) */
.landing-header--hero {
    padding: 1.5rem 0;
    background: transparent;
}

.landing-header--hero .landing-navbar__brand .landing-navbar__logo {
    filter: brightness(0) invert(1);
}

.landing-header--hero .landing-navbar__link {
    color: rgba(255, 255, 255, 0.9);
}

.landing-header--hero .landing-navbar__link:hover {
    color: #1e40af;
    background: rgba(255, 255, 255, 0.9);
}

.landing-header--hero .landing-navbar__toggle {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.landing-header--hero .landing-navbar__toggle .landing-navbar__toggle-icon {
    background: white;
}

/* Sticky вариант (для прокрутки) */
.landing-header--sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
    transition: all 0.3s ease;
    animation: slideDown 0.3s ease-out;
}

.landing-header--sticky .landing-navbar__brand .landing-navbar__logo {
    filter: none;
}

.landing-header--sticky .landing-navbar__link {
    color: #374151;
}

.landing-header--sticky .landing-navbar__link:hover {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}

.landing-header--sticky .btn-light {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.landing-header--sticky .btn-light:hover {
    background: #2563eb;
    border-color: #2563eb;
}

/* Transparent вариант (для страниц) */
.landing-header--transparent {
    padding: 1.5rem 0;
    background: transparent;
}

.landing-header--transparent .landing-navbar__brand .landing-navbar__logo {
    filter: brightness(0) invert(1);
}

.landing-header--transparent .landing-navbar__link {
    color: rgba(255, 255, 255, 0.9);
}

.landing-header--transparent .landing-navbar__link:hover {
    color: #1e40af;
    background: rgba(255, 255, 255, 0.9);
}

/* Navbar */
.landing-navbar {
    width: 100%;
}

.landing-navbar__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.landing-navbar__brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.landing-navbar__brand:hover {
    transform: scale(1.05);
}

.landing-navbar__logo {
    height: 32px;
    width: auto;
    transition: all 0.3s ease;
}

.landing-navbar__menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: flex-end;
}

.landing-navbar__link {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    color: #374151;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.landing-navbar__link:hover {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

.landing-navbar__link:active {
    transform: translateY(0);
}

.landing-navbar__btn {
    padding: 0.5rem 1.25rem;
    font-weight: 500;
    font-size: 0.95rem;
    white-space: nowrap;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.landing-navbar__actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.landing-navbar__toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 32px;
    height: 32px;
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 0.375rem;
    cursor: pointer;
    padding: 0.25rem;
    transition: all 0.3s ease;
}

.landing-navbar__toggle:hover {
    background: rgba(0, 0, 0, 0.05);
}

.landing-navbar__toggle:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.landing-navbar__toggle-icon {
    width: 100%;
    height: 2px;
    background: #374151;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.landing-navbar__mobile {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.landing-navbar__mobile-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.landing-navbar__mobile-link {
    display: block;
    padding: 0.75rem 1rem;
    color: #374151;
    text-decoration: none;
    font-weight: 500;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.landing-navbar__mobile-link:hover {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}

.landing-navbar__mobile-btn {
    margin-top: 0.5rem;
}

.landing-navbar__mobile-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Hero вариант - белые ссылки */
.landing-header--hero .landing-navbar__link,
.landing-header--transparent .landing-navbar__link {
    color: rgba(255, 255, 255, 0.9);
}

.landing-header--hero .landing-navbar__link:hover,
.landing-header--transparent .landing-navbar__link:hover {
    color: #1e40af;
    background: rgba(255, 255, 255, 0.9);
}

.landing-header--hero .landing-navbar__btn,
.landing-header--transparent .landing-navbar__btn {
    color: #3b82f6;
    border-color: white;
}

.landing-header--hero .landing-navbar__btn:hover,
.landing-header--transparent .landing-navbar__btn:hover {
    color: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.landing-header--hero .landing-navbar__mobile-link,
.landing-header--transparent .landing-navbar__mobile-link {
    color: rgba(255, 255, 255, 0.9);
}

.landing-header--hero .landing-navbar__mobile-link:hover,
.landing-header--transparent .landing-navbar__mobile-link:hover {
    color: #1e40af;
    background: rgba(255, 255, 255, 0.1);
}

.landing-header--hero .landing-navbar__toggle,
.landing-header--transparent .landing-navbar__toggle {
    border-color: rgba(255, 255, 255, 0.3);
}

.landing-header--hero .landing-navbar__toggle .landing-navbar__toggle-icon,
.landing-header--transparent .landing-navbar__toggle .landing-navbar__toggle-icon {
    background: white;
}

.landing-header--hero .landing-navbar__toggle:hover,
.landing-header--transparent .landing-navbar__toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.landing-header--hero .landing-navbar__mobile,
.landing-header--transparent .landing-navbar__mobile {
    border-top-color: rgba(255, 255, 255, 0.2);
}

/* Анимация для sticky header при прокрутке */
@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Выпадающее меню пользователя */
.landing-navbar__dropdown {
    position: relative;
}

.landing-navbar__user-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: transparent;
    border: none;
    color: inherit;
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
    white-space: nowrap;
}

.landing-navbar__user-btn--no-arrow::after {
    display: none !important;
}

.landing-header--hero .landing-navbar__user-btn,
.landing-header--transparent .landing-navbar__user-btn {
    color: rgba(255, 255, 255, 0.9);
}

.landing-header--sticky .landing-navbar__user-btn {
    color: #374151;
}

.landing-navbar__user-btn:hover {
    opacity: 0.8;
}

.landing-header--hero .landing-navbar__user-btn:hover,
.landing-header--transparent .landing-navbar__user-btn:hover {
    opacity: 0.8;
}

.landing-navbar__user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.125rem;
    flex: 1;
    min-width: 0;
}

.landing-navbar__user-name {
    font-weight: 500;
    font-size: 0.95rem;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 150px;
}

.landing-navbar__user-email {
    font-size: 0.75rem;
    opacity: 0.7;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 150px;
}

.landing-header--hero .landing-navbar__user-email,
.landing-header--transparent .landing-navbar__user-email {
    opacity: 0.8;
}

/* Аватарка */
.landing-navbar__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
}

.landing-header--hero .landing-navbar__avatar,
.landing-header--transparent .landing-navbar__avatar {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.landing-navbar__avatar-initials {
    line-height: 1;
    user-select: none;
}

.landing-navbar__avatar--small {
    width: 32px;
    height: 32px;
    font-size: 0.75rem;
}

.landing-navbar__avatar--mobile {
    width: 48px;
    height: 48px;
    font-size: 1rem;
}

.landing-navbar__user-info-item {
    padding: 0.75rem 1rem;
}

.landing-navbar__user-info-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.landing-navbar__user-info-header .landing-navbar__user-name {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    max-width: none;
}

.landing-navbar__user-email-small {
    font-size: 0.8rem;
    color: #6b7280;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.landing-navbar__dropdown-icon {
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.landing-navbar__user-btn[aria-expanded="true"] .landing-navbar__dropdown-icon {
    transform: rotate(180deg);
}

.landing-navbar__dropdown-menu {
    min-width: 200px;
    max-width: 300px;
    margin-top: 0.5rem;
    padding: 0.5rem 0;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.landing-navbar__dropdown-item {
    padding: 0.5rem 1rem;
    color: #374151;
    text-decoration: none;
    display: block;
    transition: all 0.2s ease;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    font-size: 0.9rem;
}

.landing-navbar__dropdown-item:hover {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.landing-navbar__company-name {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.landing-navbar__logout-btn {
    color: #dc2626;
    padding: 0.5rem 1rem;
    cursor: pointer;
}

.landing-navbar__logout-btn:hover {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
}

.dropdown-header {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Мобильная версия пользователя */
.landing-navbar__mobile-user {
    padding: 0.5rem 0;
}

.landing-navbar__mobile-user-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0 1rem;
    margin-bottom: 1rem;
}

.landing-navbar__mobile-user-name {
    font-weight: 600;
    color: inherit;
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.landing-navbar__mobile-user-email {
    font-size: 0.85rem;
    color: #6b7280;
    opacity: 0.8;
}

.landing-navbar__mobile-companies {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .landing-navbar__container {
        gap: 1rem;
    }

    .landing-navbar__menu {
        display: none;
    }

    .landing-navbar__actions {
        display: none;
    }
}

@media (max-width: 575.98px) {
    .landing-header--hero,
    .landing-header--transparent {
        padding: 1rem 0;
    }

    .landing-header--sticky {
        padding: 0.75rem 0;
    }

    .landing-navbar__logo {
        height: 28px;
    }

    .landing-navbar__toggle {
        width: 28px;
        height: 28px;
    }
}

