/* CSS стили для главной страницы index.php */

.main-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
}

.content-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 40px;
    align-items: start;
}

.left-section {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.section-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 8px 8px 0 0;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    margin: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.clubs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.club-card {
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    background: white;
    transition: all 0.3s ease;
    overflow: hidden;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.club-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.club-card:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.2);
}

.club-content {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.club-name {
    font-size: 14px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 8px;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.club-description {
    font-size: 12px;
    color: #7f8c8d;
    line-height: 1.4;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.club-stats {
    margin-top: 10px;
    font-size: 11px;
    color: #34495e;
}

.club-members {
    background: #ecf0f1;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
    font-weight: 500;
}

/* Стили для секции доступных курсов */
.courses-preview-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 15px;
    background: white;
    border: 2px solid #e1e5e9;
    border-top: none;
}

.course-preview-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    background: white;
    transition: all 0.3s ease;
    cursor: pointer;
}

.course-preview-card:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
    transform: translateY(-1px);
}

.course-preview-logo {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
}

.course-preview-logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.course-preview-logo-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    font-weight: bold;
}

.course-preview-info {
    flex-grow: 1;
    overflow: hidden;
}

.course-preview-name {
    font-size: 13px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.course-preview-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    font-size: 11px;
}

.course-preview-level,
.course-preview-price {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #7f8c8d;
}

.course-preview-price {
    font-weight: 600;
    color: #27ae60;
}

.right-section {
    background: white;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.personal-school-content {
    padding: 25px;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.feature-item {
    padding: 8px 0;
    border-bottom: 1px solid #ecf0f1;
    color: #2c3e50;
    font-size: 14px;
    line-height: 1.4;
}

.feature-item:last-child {
    border-bottom: none;
}

.feature-item:before {
    content: "✓";
    color: #27ae60;
    font-weight: bold;
    margin-right: 8px;
    font-size: 16px;
}

/* Разделитель между блоками */
.section-divider {
    margin: 40px 0;
    border-top: 3px solid #e1e5e9;
    position: relative;
    background: linear-gradient(90deg, transparent 0%, #f8f9fa 50%, transparent 100%);
    height: 20px;
}

.section-divider:after {
    content: '';
    position: absolute;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.cta-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    width: 100%;
    text-align: center;
    text-decoration: none;
    margin-top: 20px;
    box-shadow: 0 3px 6px rgba(102, 126, 234, 0.3);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    text-decoration: none;
    color: white;
}

.cta-button:active {
    transform: translateY(0);
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

.testimonials-section {
    margin-top: 0;
}

.right-section .testimonials-section {
    margin-top: 0;
}

.right-section .testimonials-section .section-header {
    margin: 0;
    border-radius: 8px 8px 0 0;
}

.testimonial-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
}

.testimonial-item:hover {
    background: #f1f3f4;
    transform: translateX(2px);
}

.testimonial-item:last-child {
    margin-bottom: 0;
}

.testimonial-text {
    font-style: italic;
    color: #2c3e50;
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 8px;
}

.testimonial-author {
    font-size: 11px;
    color: #7f8c8d;
    font-weight: bold;
}

.see-more-link {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    transition: color 0.3s ease;
}

.see-more-link:hover {
    color: #5a67d8;
    text-decoration: underline;
}

.stats-section {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.stats-grid {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
}

.stat-item {
    flex: 1;
    min-width: 120px;
}

.stat-number {
    font-size: 28px;
    font-weight: bold;
    color: #667eea;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.stat-label {
    color: #7f8c8d;
    font-size: 12px;
    margin-top: 4px;
}

/* Адаптивные стили */
@media (max-width: 1024px) {
    .main-container {
        padding: 15px;
    }

    .content-grid {
        gap: 30px;
    }

    .section-header {
        font-size: 16px;
        padding: 12px 18px;
    }
}

@media (max-width: 968px) {
    .content-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .clubs-grid {
        grid-template-columns: 1fr;
    }

    .club-card {
        min-height: 150px;
    }

    .club-name {
        white-space: normal;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        display: -webkit-box;
    }

    .courses-preview-grid {
        grid-template-columns: 1fr;
    }

    /* Отзывы остаются в правой секции на мобильных */
    .right-section .testimonials-section {
        margin-top: 25px;
    }
}

@media (max-width: 768px) {
    .main-container {
        padding: 10px;
    }

    .content-grid {
        gap: 20px;
    }

    .personal-school-content {
        padding: 20px;
    }

    .feature-item {
        font-size: 13px;
    }

    .stats-grid {
        gap: 15px;
    }

    .stat-number {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .section-header {
        font-size: 14px;
        padding: 10px 15px;
    }

    .club-content {
        padding: 12px;
    }

    .personal-school-content {
        padding: 15px;
    }

    .feature-item {
        font-size: 12px;
        padding: 6px 0;
    }

    .cta-button {
        font-size: 13px;
        padding: 10px 20px;
    }

    .testimonial-text {
        font-size: 12px;
    }

    .testimonial-author {
        font-size: 10px;
    }

    .stats-grid {
        flex-direction: column;
        gap: 10px;
    }

    .stat-item {
        min-width: auto;
    }

    .stat-number {
        font-size: 20px;
    }

    .stat-label {
        font-size: 11px;
    }

    .course-preview-name {
        font-size: 12px;
    }

    .course-preview-details {
        font-size: 10px;
    }

    /* Компактные отзывы на мобильных */
    .right-section .testimonials-section {
        margin-top: 0;
    }

    .section-divider {
        margin: 30px 0;
        height: 15px;
    }

    .section-divider:after {
        width: 60px;
    }

    .right-section .testimonials-section .section-header {
        font-size: 13px;
        padding: 8px 12px;
    }

    .testimonial-item {
        padding: 12px;
        margin-bottom: 10px;
    }
}

/* Анимации для улучшения UX */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.club-card {
    animation: fadeInUp 0.5s ease-out;
}

.club-card:nth-child(1) { animation-delay: 0.1s; }
.club-card:nth-child(2) { animation-delay: 0.2s; }
.club-card:nth-child(3) { animation-delay: 0.3s; }

.course-preview-card {
    animation: fadeInUp 0.5s ease-out;
}

.right-section {
    animation: fadeInUp 0.5s ease-out 0.2s both;
}

.right-section .testimonials-section {
    animation: fadeInUp 0.5s ease-out 0.6s both;
}

/* Фокус для доступности */
.club-card:focus,
.course-preview-card:focus {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

.cta-button:focus {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

/* Дополнительные стили для совместимости с существующей темой */
.u-body .main-container {
    font-family: inherit;
}

.main-container * {
    box-sizing: border-box;
}
