/* Общие стили */
body {
    background-color: #f8f9fa;
}

/* Стили для карточек */
.card {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid rgba(0,0,0,0.125);
}

/* Стили для аватаров */
.avatar {
    width: 50px;
    height: 50px;
    object-fit: cover;
}

/* Стили для бейджей */
.badge {
    font-weight: 500;
}

/* Стили для значка CC */
.cc-badge-container {
    position: absolute;
    bottom: 0;
    right: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 20px;
    padding: 1px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Специальные стили для значка CC в результатах поиска */
.search-cc-badge {
    bottom: 15px !important;
    right: 0 !important;
    transform: scale(0.8) !important;
}

.cc-badge {
    background: linear-gradient(45deg, #2962ff, #1565c0);
    color: white;
    padding: 2px 4px;
    font-size: 0.65rem;
    font-weight: 600;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Стили для кнопок */
.btn {
    font-weight: 500;
}

.btn-group {
    gap: 0.5rem;
}

/* Стили для уведомлений */
.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    font-size: 0.7em;
    padding: 0.25em 0.6em;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    font-weight: bold;
    z-index: 1000;
}

/* Мобильная версия - уведомления ближе к тексту */
@media (max-width: 991.98px) {
    .notification-badge {
        position: relative !important;
        top: auto !important;
        right: auto !important;
        margin-left: 8px !important;
        display: inline-flex !important;
        vertical-align: middle !important;
    }
    
    .nav-link {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
}

/* Специальные стили для счетчика сообщений */
#messages-count {
    background-color: #dc3545 !important;
    color: white !important;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Специальные стили для счетчика уведомлений */
#notifications-count {
    background-color: #dc3545 !important;
    color: white !important;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Позиционирование для элементов навигации */
.nav-item {
    position: relative;
}

.nav-link {
    position: relative;
}

/* Точное позиционирование для бейджей сообщений */
#messages-link {
    position: relative;
}

#messages-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #dc3545 !important;
    color: white !important;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    z-index: 1000;
}

/* Точное позиционирование для бейджей уведомлений */
#notifications-link {
    position: relative;
}

#notifications-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #dc3545 !important;
    color: white !important;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    z-index: 1000;
}

/* Мобильная версия - подписи видны */
@media (max-width: 991.98px) {
    .nav-link .mobile-label {
        display: inline !important;
    }
    
    /* Адаптация бейджей для мобильных */
    #messages-count,
    #notifications-count {
        top: -6px;
        right: -6px;
        font-size: 0.65em;
        min-width: 16px;
        height: 16px;
    }
}

/* Десктопная версия - подписи скрыты */
@media (min-width: 992px) {
    .nav-link .mobile-label {
        display: none !important;
    }
    
    /* Адаптация бейджей для десктопа */
    #messages-count,
    #notifications-count {
        top: -8px;
        right: -8px;
        font-size: 0.7em;
        min-width: 18px;
        height: 18px;
    }
}

/* Стили для митапов */
.meetup-status {
    font-size: 0.9em;
    padding: 0.5em 1em;
}

.meetup-participant {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.meetup-participant img {
    margin-right: 1rem;
}

/* Адаптивные стили */
@media (max-width: 768px) {
    .btn-group {
        flex-direction: column;
    }
    
    .btn-group .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

/* Стили для участников митапа */
.participant-info {
    padding: 15px;
    border-radius: 8px;
    background-color: #ffffff;
    border: 1px solid rgba(0,0,0,.125);
    transition: all 0.3s ease;
}

.participant-info:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.participant-info strong {
    color: #495057;
    min-width: 100px;
}

.participant-info .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.participant-info a {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.participant-info a:hover {
    color: #0056b3;
    text-decoration: none;
}

/* Общие стили для flex-элементов */
.d-flex {
    display: flex !important;
}

.align-items-center {
    align-items: center !important;
}

.me-2 {
    margin-right: 0.5rem !important;
}

.mt-3 {
    margin-top: 1rem !important;
}

.rounded-circle {
    border-radius: 50% !important;
}

/* Стили для футера */
footer {
    margin-top: 50px;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    transition: all 0.3s ease;
    text-decoration: none;
}

.footer-links a:hover {
    color: #6c757d !important;
    text-decoration: underline;
}

/* Информационные страницы */
.card-header h1 {
    font-weight: 600;
}

.placeholder-content h3 {
    margin-top: 25px;
    margin-bottom: 15px;
    color: #333;
}

.news-item {
    margin-bottom: 20px;
}

.glossary dt {
    font-weight: 600;
    margin-top: 15px;
}

.glossary dd {
    margin-bottom: 15px;
    padding-left: 15px;
}

/* Стили для новых информационных разделов */
.challenge {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    background-color: #f8f9fa;
    transition: all 0.3s ease;
}

.challenge:hover {
    background-color: #e9ecef;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.likbez-post {
    padding: 15px;
    margin-bottom: 20px;
}

.likbez-post h3 {
    color: #0d6efd;
}

.likbez-post a {
    color: #0d6efd;
    text-decoration: none;
}

.likbez-post a:hover {
    text-decoration: underline;
}

.dream-category {
    margin-bottom: 25px;
}

.dream-category h3 {
    color: #0d6efd;
    margin-bottom: 15px;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 5px;
}

.dream-item {
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 5px;
    margin-bottom: 10px;
}

.dream-item:hover {
    background-color: #e9ecef;
}

.progress {
    height: 10px;
    border-radius: 5px;
}

/* Стили для карточек пользователей в поиске */
.search-user-card .card-title {
    font-size: 1rem;
    line-height: 1.3;
    margin-bottom: 0.5rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.search-user-card .card-title a {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 2.6em;
    line-height: 1.3;
}

/* Ограничение длины имени пользователя */
.search-user-card .user-name {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 576px) {
    .search-user-card .card-title {
        font-size: 0.9rem;
    }
    
    .search-user-card .card-title a {
        -webkit-line-clamp: 1;
        max-height: 1.3em;
    }
    
    .search-user-card .card-body {
        padding: 0.75rem;
    }
    
    .search-user-card .position-relative[style*="width: 100px"] {
        width: 85px !important;
        height: 85px !important;
    }
    
    .search-cc-badge {
        transform: scale(0.7) !important;
        bottom: 10px !important;
        right: 0 !important;
    }
}

/* Мобильный чат: кнопка «назад», аватар и имя — слева (без flex-grow) */
@media (max-width: 767.98px) {
    .messages-chat-header,
    .messages-chat-header > div,
    .messages-chat-header-inner {
        justify-content: flex-start !important;
        flex: 0 0 auto !important;
    }
}

/* Навигация по блокам (РМК / Experience / Cyber View):
   единый размер плиток и равные отступы. Grid с равными колонками (1fr) гарантирует,
   что все блоки одинаковой ширины, а последний блок в ряду (пройденный/текущий) не «уезжает». */
.rmk-blocks-navigation,
.experience-blocks-navigation,
.cyber-view-blocks-navigation {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
    align-items: stretch;
}

.rmk-block-btn,
.experience-block-btn,
.cyber-view-block-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    min-height: 48px;
    margin: 0;
    white-space: nowrap;
}

@media (max-width: 575.98px) {
    .rmk-blocks-navigation,
    .experience-blocks-navigation,
    .cyber-view-blocks-navigation {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        gap: 0.5rem;
    }
    .rmk-block-btn,
    .experience-block-btn,
    .cyber-view-block-btn {
        min-height: 44px;
    }
} 