/* ============================================
   СТРАНИЦА "ОБУЧЕНИЕ"
   ============================================ */

/* --- ФИЛЬТРАЦИЯ --- */
.filter-section {
    background: #ffffff;
    border-radius: 16px;
    padding: 30px 40px;
    margin-bottom: 40px;
    box-shadow: 0 4px 30px rgba(0,0,0,0.06);
    box-sizing: border-box;
    width: 100%;
}

.filter-title {
    font-size: 24px;
    font-weight: 700;
    color: #1951A0;
    margin-bottom: 20px;
    font-family: 'Open Sans', 'Arial', 'Helvetica Neue', sans-serif;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.filter-count {
    font-size: 14px;
    font-family: 'Open Sans', 'Arial', 'Helvetica Neue', sans-serif;
    color: #888888;
}

.filter-count span {
    color: #E4003A;
    font-weight: 700;
}

/* --- СЕТКА КАРТОЧЕК (Flexbox) --- */
.programs-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    margin-bottom: 40px;
    width: 100%;
    box-sizing: border-box;
}

/* --- КАРТОЧКА ПРОГРАММЫ --- */
.program-card {
    flex: 0 0 calc(33.333% - 17px);
    min-width: 200px;
    background: #ffffff;
    border-radius: 12px;
    padding: 25px 20px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.program-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    border-color: #E4003A;
}

.program-card-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* --- ЗАГОЛОВОК С КАТЕГОРИЕЙ --- */
.program-title {
    font-size: 18px;
    font-weight: 700;
    color: #1951A0;
    font-family: 'Open Sans', 'Arial', 'Helvetica Neue', sans-serif;
    line-height: 1.3;
    margin: 0 0 8px 0;
}

.program-category {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    font-family: 'Open Sans', 'Arial', 'Helvetica Neue', sans-serif;
    border: 2px solid;
    white-space: nowrap;
    width: fit-content;
    margin-bottom: 12px;
}

/* --- ЦВЕТА КАТЕГОРИЙ --- */
.program-category-gochs {
    background: #e3f2fd;
    color: #0d47a1;
    border-color: #0d47a1;
}

.program-category-fire {
    background: #ffebee;
    color: #b71c1c;
    border-color: #b71c1c;
}

.program-category-firstaid {
    background: #e8f5e9;
    color: #1b5e20;
    border-color: #1b5e20;
}

.program-category-ohrana {
    background: #fff3e0;
    color: #e65100;
    border-color: #e65100;
}

.program-category-water {
    background: #e0f7fa;
    color: #00695c;
    border-color: #00695c;
}

/* --- МЕТА-ИНФОРМАЦИЯ --- */
.program-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 15px;
    font-family: 'Open Sans', 'Arial', 'Helvetica Neue', sans-serif;
}

.program-price {
    font-weight: 700;
    color: #E4003A;
}

.program-duration {
    color: #555555;
}

.program-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.program-tag {
    padding: 4px 12px;
    background: #f0f2f5;
    border-radius: 20px;
    font-size: 12px;
    font-family: 'Open Sans', 'Arial', 'Helvetica Neue', sans-serif;
    color: #555555;
}

.program-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

/* --- КНОПКИ В КАРТОЧКАХ --- */
.program-btn {
    flex: 1;
    padding: 10px 15px;
    text-align: center;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Open Sans', 'Arial', 'Helvetica Neue', sans-serif;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.program-btn-detail {
    background: #f0f2f5;
    color: #1951A0;
    border: 2px solid #1951A0;
}

.program-btn-detail:hover {
    background: #1951A0;
    color: #ffffff;
    transform: scale(1.04);
    box-shadow: 0 4px 15px rgba(25, 81, 160, 0.3);
}

.program-btn-enroll {
    background: #E4003A;
    color: #ffffff;
}

.program-btn-enroll:hover {
    background: #C0002E;
    transform: scale(1.03);
}

/* ============================================
   АДАПТИВНОСТЬ
   ============================================ */

@media (max-width: 1024px) {
    .filter-section {
        padding: 25px 30px;
    }
    
    .filter-title {
        font-size: 20px;
    }
    
    .program-card {
        flex: 0 0 calc(50% - 12px);
        min-width: 140px;
    }
}

@media (max-width: 768px) {
    .filter-section {
        padding: 20px;
    }
    
    .filter-title {
        font-size: 18px;
    }
    
    .filter-buttons {
        gap: 8px;
    }
    
    .programs-grid {
        gap: 15px;
    }
    
    .program-card {
        flex: 0 0 100%;
        min-width: 0;
    }
    
    .program-title {
        font-size: 16px;
    }
    
    .program-actions {
        flex-direction: column;
    }
    
    .program-btn {
        font-size: 13px;
        padding: 8px 12px;
    }
}

@media (max-width: 480px) {
    .filter-section {
        padding: 15px;
    }
    
    .filter-title {
        font-size: 16px;
    }
    
    .filter-buttons {
        gap: 6px;
    }
    
    .filter-count {
        font-size: 13px;
    }
    
    .program-card {
        padding: 18px 15px;
    }
    
    .program-title {
        font-size: 15px;
    }
    
    .program-meta {
        font-size: 13px;
        flex-direction: column;
        gap: 4px;
    }
    
    .program-btn {
        font-size: 12px;
        padding: 8px 10px;
    }
}