/* Стили для страницы каталога */

/* Заголовок каталога */
.catalog-header {
    background-color: #212a34;
    color: #fff;
    padding: 60px 0;
    text-align: center;
}

.catalog-header h1 {
    font-size: 36px;
    margin-bottom: 15px;
}

.catalog-header p {
    font-size: 18px;
    opacity: 0.8;
}

/* Фильтры */
.catalog-filters {
    background-color: #f5f5f5;
    padding: 20px 0;
    margin-bottom: 40px;
}

.filters-form {
    width: 100%;
}

.filters-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 200px;
    max-width: 300px;
}

.search-box input {
    width: 100%;
    padding: 12px 15px;
    padding-right: 45px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    height: 45px;
}

.search-box button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    font-size: 18px;
}

.filter-group {
    flex: 1;
    max-width: 250px;
    margin-bottom: 0;
}

.filter-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    font-size: 14px;
}

.filter-group select,
.filter-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    height: 45px; /* Фиксированная высота для выравнивания с другими элементами */
}

.filter-buttons {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.filter-apply-btn {
    background-color: #ffcc32;
    color: #212a34;
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 45px; /* Фиксированная высота для выравнивания с другими элементами */
    white-space: nowrap;
}

.filter-apply-btn:hover {
    background-color: #ffe283;
}

.filter-reset-btn {
    background-color: #f1f1f1;
    color: #666;
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    height: 45px; /* Фиксированная высота для выравнивания с другими элементами */
    white-space: nowrap;
}

.filter-reset-btn:hover {
    background-color: #e0e0e0;
}

/* Сетка курсов */
.catalog-courses {
    padding: 40px 0 60px;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

/* Стили для карточки курса */
.course-card {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.course-image {
    height: 150px;
    position: relative;
    overflow: hidden;
}

.course-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    position: relative;
    z-index: 1;
}

.course-card:hover .course-image img {
    transform: scale(1.1);
}

.course-image-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.85;
    z-index: 2;
    mix-blend-mode: multiply;
}

.course-category {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: rgba(0,0,0,0.7);
    color: #fff;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 12px;
    z-index: 3;
}

.course-format {
    position: absolute;
    bottom: 10px;
    left: 10px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    z-index: 3;
}

.course-info {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.course-title {
    font-size: 16px;
    margin-bottom: 10px;
    color: #212a34;
    line-height: 1.3;
}

.course-provider {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 14px;
    color: #666;
}

.course-rating {
    display: flex;
    align-items: center;
}

.course-rating i {
    color: #ffcc32;
    margin-right: 5px;
}

.course-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.4;
    flex: 1;
}

.course-details {
    display: flex;
    margin-bottom: 15px;
}

.course-duration, .course-lessons {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #666;
    margin-right: 20px;
}

.course-duration i, .course-lessons i {
    margin-right: 5px;
    color: #999;
}

.course-price {
    font-weight: 700;
    font-size: 16px;
    margin-top: auto;
}

.course-price.free {
    color: #27ae60;
}

.course-price.paid {
    color: #212a34;
}

.course-price.subscription {
    color: #2196f3;
}

/* Сообщение об отсутствии курсов */
.no-courses-message {
    text-align: center;
    padding: 60px 0;
    color: #666;
}

.no-courses-message i {
    font-size: 48px;
    color: #ddd;
    margin-bottom: 15px;
}

.no-courses-message p {
    font-size: 18px;
}

/* Пагинация */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 40px;
}

.pagination-prev,
.pagination-next {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background-color: #f5f5f5;
    color: #212a34;
    border-radius: 5px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.pagination-prev:hover,
.pagination-next:hover {
    background-color: #e0e0e0;
}

.pagination-prev i {
    margin-right: 5px;
}

.pagination-next i {
    margin-left: 5px;
}

.pagination-numbers {
    display: flex;
    margin: 0 15px;
}

.pagination-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: #f5f5f5;
    color: #212a34;
    border-radius: 5px;
    margin: 0 5px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.pagination-number:hover {
    background-color: #e0e0e0;
}

.pagination-number.active {
    background-color: #ffcc32;
    color: #212a34;
    font-weight: 700;
}

/* Адаптивность */
@media (max-width: 1200px) {
    .courses-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .courses-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .filters-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box,
    .filter-group {
        max-width: 100%;
        width: 100%;
    }
    
    .filter-buttons {
        display: flex;
        justify-content: space-between;
    }
    
    .filter-apply-btn,
    .filter-reset-btn {
        flex: 1;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .courses-grid {
        grid-template-columns: 1fr;
    }
    
    .pagination {
        flex-direction: column;
        gap: 10px;
    }
}
