/* CSS для страницы clubs.php */

.clubs-wrapper {
    max-width: 1100px;
    margin: 0 auto;
}

/* Панель со списком клубов */
.clubs-panel {
    background: #ffffff;
    border-radius: 10px;
    border: 2px solid #e1e5e9;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

/* Внутренние отступы */
.clubs-panel-inner {
    padding: 20px 22px 24px 22px;
}

/* Заголовочный блок над списком */
.clubs-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.clubs-header-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.clubs-title-main {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.clubs-title-meta {
    font-size: 12px;
    color: #7f8c8d;
}

/* Сообщение, когда клубов нет */
.clubs-empty {
    padding: 18px;
    text-align: center;
    font-size: 14px;
    color: #7f8c8d;
}

/* Список клубов */
.clubs-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

/* Одна строка клуба */
.club-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid #ecf0f1;
    background: #fdfdff;
    transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
    animation: clubsFadeInUp 0.25s ease-out;
}

.club-row:hover {
    border-color: #667eea;
    box-shadow: 0 4px 14px rgba(102, 126, 234, 0.18);
    transform: translateY(-1px);
}

/* Логотип клуба */
.club-logo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #e1e5e9;
    background: #f4f6fb;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.club-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Плейсхолдер логотипа */
.club-logo-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.club-logo-placeholder span {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
}

/* Информация о клубе */
.club-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.club-name-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.club-name {
    font-size: 15px;
    font-weight: 600;
    color: #2c3e50;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.club-description {
    font-size: 13px;
    color: #7f8c8d;
    line-height: 1.45;
    max-height: 3.5em;
    overflow: hidden;
}

/* Метаданные */
.club-meta {
    margin-top: 4px;
}

.club-members {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #34495e;
    background: #ecf0f1;
    padding: 3px 8px;
    border-radius: 999px;
    font-weight: 500;
}

/* Блок с кнопкой справа */
.club-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.club-join-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 16px;
    border-radius: 999px;
    border: 1px solid #667eea;
    background: #ffffff;
    font-size: 13px;
    font-weight: 600;
    color: #667eea;
    text-decoration: none;
    transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease, transform 0.08s ease;
    white-space: nowrap;
}

.club-join-btn:hover {
    background: #667eea;
    color: #ffffff;
    box-shadow: 0 6px 18px rgba(102, 126, 234, 0.35);
    transform: translateY(-1px);
}

.club-join-btn:active {
    transform: translateY(0);
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

.club-join-btn:focus {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

/* Пагинация */
.clubs-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.page-link {
    font-size: 12px;
    color: #667eea;
    text-decoration: none;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid transparent;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.page-link:hover {
    border-color: #667eea;
    background: #f0f1ff;
}

.page-numbers {
    display: flex;
    align-items: center;
    gap: 6px;
}

.page-number {
    min-width: 28px;
    text-align: center;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 6px;
    color: #34495e;
    text-decoration: none;
    border: 1px solid transparent;
}

.page-number:hover {
    border-color: #d1d5db;
    background: #f7f7fb;
}

.page-number--active {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    font-weight: 600;
}

/* Адаптивность */
@media (max-width: 900px) {
    .clubs-panel-inner {
        padding: 18px 16px 20px 16px;
    }

    .club-row {
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
        align-items: flex-start;
    }

    .club-actions {
        grid-column: 1 / -1;
        justify-content: flex-end;
        margin-top: 6px;
    }

    .club-name {
        white-space: normal;
    }
}

@media (max-width: 600px) {
    .clubs-panel-inner {
        padding: 14px 12px 16px 12px;
    }

    .club-row {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
    }

    .club-logo {
        margin-bottom: 4px;
    }

    .club-actions {
        justify-content: flex-start;
    }

    .club-join-btn {
        width: 100%;
        justify-content: center;
    }

    .clubs-header-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

/* Лёгкая анимация появления */
@keyframes clubsFadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
