/* Оптимизированные глобальные стили */
:root {
    --primary-color: #6259c3;
    --primary-hover: #7068d4;
    --primary-shadow: rgba(98, 89, 195, 0.3);
    --text-color: #333;
    --text-light: #555;
    --background-color: #f9f9f9;
    --card-bg: #fff;
    --border-color: #eee;
    --animation-speed: 0.25s;
    --transition-standard: all var(--animation-speed) ease;
    --border-radius: 4px;
}

/* Базовые стили для всей страницы */
body {
    font-family: 'Montserrat', 'Arial', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.5;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    text-rendering: optimizeSpeed; /* Оптимизация для быстрого рендеринга текста */
}

/* Улучшение для фокуса элементов при навигации с клавиатуры */
:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* Скрытый фокус при использовании мыши */
:focus:not(:focus-visible) {
    outline: none;
}

.main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 20px 20px; /* Увеличиваем верхний отступ для хедера */
}

.section-title {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 25px;
    color: var(--text-color);
    text-align: center;
    scroll-margin-top: 20px;
}

.new-offers .section-title, 
.all-services .section-title {
    color: #918ef4;
}

.popular-services {
    text-align: center;
    margin-bottom: 40px;
}

.popular-services__list {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px;
}

.popular-service {
    position: relative;
    border-radius: 50%;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 10px;
    overflow: hidden;
    text-align: center;
    border: none; /* Убираем стандартный бордер */
}

/* Добавляем псевдоэлемент для создания круглой градиентной обводки */
.popular-service::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(to right, #918ef4, #98b9f2, #6f9ceb);
    border-radius: 50%;
    z-index: -2;
    opacity: 0; /* Скрываем границу по умолчанию */
    transition: opacity 0.3s ease;
}

/* Добавляем еще один псевдоэлемент для создания белого фона внутри градиентной обводки */
.popular-service::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    background: #fff;
    border-radius: 50%;
    z-index: -1;
}

.popular-service:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(110, 142, 251, 0.35);
}

.popular-service:hover::before {
    opacity: 1; /* Показываем границу при наведении */
}

.popular-service:hover .popular-service__name {
    color: #6e8efb;
}

.popular-service:hover .popular-service__count {
    color: #6e8efb;
}

.popular-service__name {
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    margin-bottom: 5px;
    color: #333;
    transition: color 0.2s;
}

.popular-service__count {
    font-size: 13px;
    color: #777;
    font-weight: 400;
    text-align: center;
    position: static;
    background-color: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    transition: color 0.2s;
}

/* Размеры кружков */
.popular-service--large {
    width: 150px;
    height: 150px;
}

.popular-service--medium {
    width: 120px;
    height: 120px;
}

.popular-service--small {
    width: 100px;
    height: 100px;
}

.popular-service--tiny {
    width: 80px;
    height: 80px;
}

/* Адаптация текста для разных размеров кружков */
.popular-service--large .popular-service__name {
    font-size: 18px;
}

.popular-service--medium .popular-service__name {
    font-size: 16px;
}

.popular-service--small .popular-service__name {
    font-size: 14px;
}

.popular-service--tiny .popular-service__name {
    font-size: 12px;
}

.popular-service--large .popular-service__count {
    font-size: 14px;
}

.popular-service--medium .popular-service__count {
    font-size: 13px;
}

.popular-service--small .popular-service__count {
    font-size: 12px;
}

.popular-service--tiny .popular-service__count {
    font-size: 11px;
}

/* Новые предложения */
.new-offers {
    margin-bottom: 40px;
}

.new-offers__list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px;
}

.offer {
    background-color: white;
    padding: 16px;
    border-radius: 12px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    max-height: 360px;
}
 

.offer:hover {
    transform: translateY(-5px);
    border-color: #6e8efb;
    box-shadow: 0 8px 20px rgba(110, 142, 251, 0.15);
}

.offer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #6e8efb, #a777e3);
}

.offer__title, .offer__description, .offer__price {
    position: relative;
    z-index: 2;
}

.offer__title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #333;
    line-height: 1.3;
}

.offer__description {
    font-size: 14px;
    color: #555;
    margin-bottom: 12px;
    line-height: 1.3;
}

.offer__price {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
}

.offer__user {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    position: relative;
    z-index: 2;
}

/* Стили для аватара предложений */
.offer__avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #e0e0e0;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 20px;
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease;
}

/* Убираем hover-эффект на аватаре */
.avatar-link:hover .offer__avatar {
    /* Никаких изменений при наведении */
    transform: none;
}

/* Стили для имени пользователя */
.username-link {
    color: #333;
    text-decoration: none;
    position: relative;
    z-index: 3;
    transition: color 0.3s ease;
    -webkit-tap-highlight-color: transparent; /* Убирает подсветку при нажатии на мобильных */
}

.offer__user-info {
    flex: 1;
}

.offer__username {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.offer__rating {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #666;
    position: relative;
    z-index: 2;
}

.offer__rating-value {
    color: #ffa500;
    font-weight: 600;
    margin-right: 4px;
}

.offer__rating-star {
    color: #ffa500;
    margin-right: 8px;
}

.offer__reviews {
    font-size: 12px;
    color: #888;
}

/* Добавляем стили для кликабельных отзывов */
.reviews-link {
    text-decoration: none;
    color: #888;
    cursor: pointer;
    transition: color 0.2s, text-decoration 0.2s;
}

.reviews-link:hover {
    color: #6e8efb;
    text-decoration: underline;
}

.reviews-link:focus {
    outline: none;
}

.reviews-link:active {
    transform: translateY(1px);
}

.no-services,
.error-message {
    text-align: center;
    padding: 20px;
    color: #666;
    font-size: 16px;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin: 20px 0;
}

.error-message {
    color: #dc3545;
    background-color: #fff5f5;
    border: 1px solid #ffcdd2;
}

.popular-services__list.loading {
    position: relative;
    min-height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(249, 249, 249, 0.7);
    border-radius: 8px;
}

/* Удаляем псевдоэлемент, так как теперь используем элемент spinner */
.popular-services__list.loading::after {
    content: none;
}

/* Добавляем стиль для спиннера загрузки */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #6e8efb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Стили для раздела "Все сервисы" */
.all-services {
    margin-top: 40px;
    padding-left: 20px;
  padding-top: 20px;
    padding-bottom: 20px;
    position: relative;
}

.all-services__container {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    position: relative;
}

/* Стили для алфавитной навигации */
.alphabet-nav {
    flex: 0 0 auto;
    position: sticky;
    top: 80px; /* Начальное значение с учетом хедера, JavaScript скорректирует если нужно */
    align-self: flex-start;
    padding-right: 10px;
    scrollbar-width: none; /* Firefox */
    max-height: calc(100vh - 80px); /* Учитываем высоту хедера */
    overflow-y: auto;
    width: auto;
    z-index: 10;
    display: flex;
    flex-direction: row; /* Горизонтальное расположение на десктопах */
    gap: 15px;
}

.alphabet-nav::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Edge */
}

.alphabet-nav__letters {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 0; /* Убираем нижний отступ */
    min-width: 30px;  /* Минимальная ширина для алфавита */
    align-items: center;
}

/* Меняем порядок отображения алфавитов на десктопах */
#russianLetters {
    order: 2; /* Русский алфавит будет вторым */
}

#englishLetters {
    order: 1; /* Английский алфавит будет первым */
}

.alphabet-letter {
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: normal;
    color: #666;
    border: 1px solid transparent;
    text-align: center;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.alphabet-letter:hover {
    color: #6e8efb;
    background-color: rgba(110, 142, 251, 0.1);
    border-color: #6e8efb;
}

.alphabet-letter--active {
    color: #6e8efb;
    font-weight: 500;
    border-color: #6e8efb;
    background-color: rgba(110, 142, 251, 0.1);
    box-shadow: 0 2px 5px rgba(110, 142, 251, 0.2);
}

/* Стили для списка сервисов */
.services-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 30px;
    overflow-y: auto;
    scrollbar-width: none; /* Firefox */
    margin-left: 15px; /* Добавляем отступ слева */
}

.services-list::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Edge */
}

.services-group {
    margin-bottom: 20px;
}

.services-group__title {
    font-size: 24px;
    font-weight: bold;
    padding-bottom: 5px;
    margin-bottom: 10px;
    scroll-margin-top: 20px;
    background: linear-gradient(90deg, #6e8efb, #a777e3);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.services-group__items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

/* Стили для карточки сервиса */
.service-card {
    display: flex;
    flex-direction: column;
    padding: 20px;
    border-radius: 12px;
    background-color: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 2px solid #e0e0e0;
    cursor: pointer;
    position: relative;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    border-color: #6e8efb;
}

.service-card__title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 12px;
    color: #222;
    transition: color 0.3s ease;
    display: inline-block; /* Ограничиваем область текста */
}

.service-card__title-link {
    text-decoration: none;
    color: inherit;
    display: inline-block;
    position: relative;
    z-index: 2;
    width: fit-content; /* Ограничиваем область ссылки только текстом */
}

.service-card__title-link:hover .service-card__title {
    color: #a777e3;
}

.service-card__categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.service-card__category {
    color: #6e8efb;
    padding: 5px 12px;
    border-radius: 16px;
    font-size: 14px;
    background: rgba(110, 142, 251, 0.1);
    transition: all 0.3s ease;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    position: relative;
    z-index: 3;
}

.service-card__category:hover {
    color: #a777e3;
    background: rgba(167, 119, 227, 0.2);
    box-shadow: 0 2px 8px rgba(167, 119, 227, 0.3);
    transform: translateY(-2px);
}

.service-card__count {
    margin-left: auto;
    background-color: #6e8efb;
    color: white;
    font-size: 14px;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 12px;
    box-shadow: 0 2px 5px rgba(110, 142, 251, 0.3);
    position: relative;
    z-index: 2;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.service-card__count:hover {
    background-color: #a777e3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(167, 119, 227, 0.4);
}

/* Стиль для невидимой ссылки, которая делает всю карточку кликабельной */
.service-card__link {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

/* Стили для ссылки на имя пользователя */
.username-link {
    color: #333;
    text-decoration: none;
    position: relative;
    z-index: 3;
    transition: color 0.3s ease;
}

.username-link:hover {
    color: #a777e3;
}

/* Стили для активного состояния */
.offer:active {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(110, 142, 251, 0.1);
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

/* Стили для ссылки на аватар */
.avatar-link {
    display: block;
    position: relative;
    z-index: 3;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent; /* Убирает подсветку при нажатии на мобильных */
}

/* Убираем рамку при фокусе на ссылках */
.avatar-link:focus, .username-link:focus {
    outline: none;
}

/* Стили для аватара пользователя */
.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 3px 8px var(--primary-shadow);
    cursor: pointer;
    transition: var(--transition-standard);
    position: relative;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.user-avatar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom right, rgba(255, 255, 255, 0.2), transparent);
    border-radius: 50%;
}

.user-avatar:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 5px 12px rgba(98, 89, 195, 0.6);
    background-color: var(--primary-hover);
}

.user-avatar:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 1px 3px var(--primary-shadow);
}

.nav__avatar {
    display: flex;
    align-items: center;
    min-height: 40px; /* Используем min-height для соответствия */
    margin-left: 15px;
}

/* Обновление стилей для мобильной версии аватара, чтобы было похоже на другие пункты меню */
.mobile-menu__avatar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    font-size: 14px;
}

.mobile-menu__avatar-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.mobile-avatar {
    width: 32px;
    height: 32px;
    font-size: 18px;
}

@media (max-width: 768px) {
    .nav__avatar {
        margin-left: 8px;
    }
    
    .user-avatar {
        width: 32px;
        height: 32px;
        font-size: 18px;
    }
}

/* Медиа-запросы для адаптивности */
@media (max-width: 768px) {
    body {
        overflow-x: hidden;
        max-width: 100vw;
    }
    
    .section-title {
        font-size: 24px;
        margin-bottom: 20px;
    }
    
    .popular-services__list {
        gap: 15px;
        padding: 10px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .popular-service--large {
        width: 120px;
        height: 120px;
    }
    
    .popular-service--medium {
        width: 100px;
        height: 100px;
    }
    
    .popular-service--small {
        width: 80px;
        height: 80px;
    }
    
    .popular-service--tiny {
        width: 70px;
        height: 70px;
    }
    
    .popular-service__name {
        font-size: 14px;
        margin-bottom: 3px;
    }
    
    .popular-service__count {
        font-size: 11px;
    }
    
    /* Адаптация текста для разных размеров кружков в мобильной версии */
    .popular-service--large .popular-service__name {
        font-size: 16px;
    }
    
    .popular-service--medium .popular-service__name {
        font-size: 14px;
    }
    
    .popular-service--small .popular-service__name {
        font-size: 12px;
    }
    
    .popular-service--tiny .popular-service__name {
        font-size: 11px;
    }
    
    .popular-service--large .popular-service__count {
        font-size: 12px;
    }
    
    .popular-service--medium .popular-service__count {
        font-size: 11px;
    }
    
    .popular-service--small .popular-service__count {
        font-size: 10px;
    }
    
    .popular-service--tiny .popular-service__count {
        font-size: 9px;
    }
    
    .offer {
        padding: 20px;
    }
    
    .offer__title {
        font-size: 20px;
    }
    
    .offer__description {
        font-size: 14px;
    }
    
    .offer__price {
        font-size: 18px;
    }
    
    .all-services__container {
        flex-direction: row;
        position: relative;
    }
    
    .alphabet-nav {
        position: sticky;
        order: 2;
        top: 80px; /* Начальное значение с учетом хедера, JavaScript скорректирует если нужно */
        margin-bottom: 0;
        margin-left: 10px;
        padding-right: 0;
        right: 0;
        width: 30px;
        max-height: calc(100vh - 80px); /* Учитываем высоту хедера */
        flex-direction: column; /* Возвращаем вертикальное расположение на мобильных */
        gap: 0;
    }
    
    /* Возвращаем порядок алфавитов для мобильных */
    #russianLetters {
        order: 1; /* На мобильных русский алфавит сверху */
    }
    
    #englishLetters {
        order: 2; /* На мобильных английский алфавит снизу */
    }
    
    .services-list {
        order: 1;
        flex: 1;
        margin-left: 0; /* Убираем отступ слева на мобильных */
    }
    
    .alphabet-nav__letters {
        flex-direction: column;
        gap: 5px;
        margin-bottom: 10px; /* Добавляем нижний отступ на мобильных */
        min-width: auto;     /* Сбрасываем минимальную ширину */
    }
    
    .alphabet-letter {
        font-size: 12px;
        padding: 3px 5px;
        width: 25px;
        height: 25px;
    }
    
    .services-group__items {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .service-card {
        padding: 15px;
    }
    
    .service-card__title {
        font-size: 18px;
        margin-bottom: 10px;
    }
    
    .service-card__category {
        font-size: 13px;
        padding: 4px 10px;
    }
    
    .service-card__category:hover {
        transform: translateY(-1px);
        box-shadow: 0 1px 5px rgba(167, 119, 227, 0.3);
    }
    
    .service-card__count {
        font-size: 13px;
        padding: 4px 8px;
    }
    
    .service-card__count:hover {
        transform: none;
        background-color: #6e8efb; /* Отключаем эффект наведения на мобильных */
    }
    
    /* Убираем выделение и подсветку при нажатии на мобильных */
    .avatar-link, .username-link {
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Убираем возможную анимацию на мобильных для более четкого отклика */
    .avatar-link:active, .username-link:active {
        transform: none;
    }
    
    /* Убираем декоративную обводку и подсветку при нажатии */
    * {
        -webkit-tap-highlight-color: rgba(0,0,0,0);
        -webkit-tap-highlight-color: transparent;
        outline: none !important;
    }
    
    /* Отключаем эффекты наведения на мобильных, чтобы избежать проблем с двойным тапом */
    .service-card__title-link:hover .service-card__title {
        color: #222; /* Возвращаем оригинальный цвет */
    }
    
    /* Предотвращаем мерцание и нежелательные подсветки на мобильных */
    .service-card__title-link, .service-card__category {
        -webkit-tap-highlight-color: rgba(0,0,0,0);
    }
    
    /* Исправления для мобильной версии */
    .service-card, .service-card__title-link, .service-card__category {
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Предотвращаем нежелательную анимацию для улучшения отклика */
    .service-card:active {
        transform: translateY(-2px);
        transition: transform 0.1s ease;
    }
    
    /* Отключаем некоторые анимации на мобильных для лучшего отклика */
    .service-card, .service-card__title-link, .service-card__category, .service-card__count {
        -webkit-tap-highlight-color: transparent;
    }
}


@media (max-width: 350px) {
    .offer {
        margin-right: 50px; 
    }

    .offer__title { 
    font-size: 10px;
    }
}

/* Стили для футера с юридической информацией */
.footer {
    background-color: #f9f9f9;
    padding: 20px 0;
    border-top: 1px solid #e0e0e0;
    margin-top: 40px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.footer__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer__legal {
    text-align: center;
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

.footer__legal p {
    margin: 5px 0;
}

.footer__legal p:first-child {
    font-weight: 500;
    color: #555;
}

/* Адаптация стилей футера для десктопной версии */
@media (min-width: 769px) {
    .footer__container {
        padding: 0 200px;
    }
}

/* Медиа-запросы для футера на мобильных устройствах */
@media (max-width: 768px) {
    .footer {
        padding: 15px 0;
        margin-top: 30px;
    }
    
    .footer__legal {
        font-size: 12px;
    }
    
    .footer__container {
        padding: 0 10px;
    }
}

/* Стиль для невидимой ссылки на карточке предложения */
.offer__link {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

/* Стили для индикатора загрузки новых предложений */
.new-offers__list.loading {
    min-height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #6e8efb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.no-offers {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 16px;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin: 20px 0;
}

/* Стили для навигационных ссылок в шапке */
.nav a {
    display: inline-flex;
    align-items: center;
    min-height: 40px; /* Используем min-height вместо height */
}

/* Обновление стилей для аватара, чтобы он соответствовал ссылкам */
.nav__avatar {
    display: flex;
    align-items: center;
    min-height: 40px; /* Используем min-height для соответствия */
    margin-left: 15px;
}

/* Стили для ссылки на профиль */
.nav__avatar, .mobile-menu__avatar-link {
    text-decoration: none;
    outline: none;
}

.nav__avatar:focus, .mobile-menu__avatar-link:focus {
    text-decoration: none;
}

.nav__avatar:active, .mobile-menu__avatar-link:active {
    text-decoration: none;
}

/* Оптимизация производительности для анимаций */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Скрытие элементов для скринридеров */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}
 
.online-status {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    z-index: 2;
}
.online-status--online {
    background-color: #4CAF50;
}
.last-active-info {
    color: #888;
    font-size: 12px;
    font-weight: 500;
    margin-top: 2px;
}
main.main {
    min-height: calc(100vh - 168px); /* 100px = высота футера */
}