/* Переопределение стилей для grid_8 в разделе обучения */
.education-page {
    max-width: none !important;
    width: 100% !important;
}

/* Если есть контейнер с ограничением ширины */
.container_12 .grid_8.alpha {
    width: 100% !important;
    max-width: 100% !important;
}

/* Или более специфично */
div[class*="grid_8"] .education-page {
    width: 100% !important;
    max-width: 100% !important;
}

/* Основные стили для страницы обучения */
.education-page {
    padding: 30px 0 !important; /* Убираем горизонтальные отступы */
    margin: 0 !important;
}

.education-title {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 40px;
    text-align: center;
    color: #333;
    padding: 0 20px;
}

.education-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 40px;
    padding: 0 20px;
}

.education-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    height: 497px;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.education-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.card-image {
    position: relative;
    height: 240px;
    overflow: hidden;
}

.video-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.education-card:hover .video-thumbnail {
    transform: scale(1.05);
}

.video-link {
    display: block;
    position: relative;
    height: 100%;
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    transition: transform 0.3s ease;
}

.video-link:hover .play-icon {
    transform: translate(-50%, -50%) scale(1.1);
}

.card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.video-date {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.video-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 12px 0;
    color: #333;
    line-height: 1.3;
    padding-left: 0 !important;
}

.video-description {
    font-size: 14px;
    color: #555;
    line-height: 1.5;
    margin-bottom: 20px;
    flex-grow: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    margin-left: 0 !important;
}

.detail-button {
    display: inline-block;
    padding: 0;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    text-align: left;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
}

.detail-button:hover {
    color: white;
    text-decoration: none;
}

/* Сброс стандартных ограничений ширины */
.grid_8 .education-page,
.alpha .education-page {
    max-width: 100% !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Исправление для контейнера */
.grid_8 {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
}

/* Адаптивность */
@media (max-width: 1024px) {
    .education-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .education-page,
    .education-cards,
    .education-title {
        padding: 0 15px !important;
    }
}

@media (max-width: 768px) {
    .education-cards {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .education-card {
        height: auto;
        min-height: 497px;
    }
    
    .education-title {
        font-size: 28px;
        margin-bottom: 30px;
    }
    
    .grid_8 {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
}

@media (max-width: 480px) {
    .education-page,
    .education-cards {
        padding: 0 10px !important;
    }
    
    .card-content {
        padding: 15px;
    }
    
    .video-title {
        font-size: 16px;
    }
    
    .detail-button {
        width: 100%;
        padding: 10px 20px;
    }
    
    .grid_8 {
        width: 100% !important;
    }
}