/* ============================================================================
   СТИЛІ РОЗКРИВНИХ КАРТОК - card.css
   ============================================================================ */

/* ============================================================================
   КОНТЕЙНЕР КАРТКИ
   ============================================================================ */

.card-detail {
    background: #ffffe8;
    border-top: 2px solid #4285f4;
    padding: 20px;
    animation: expandCard 0.3s ease-out;
    display: none;
}

.card-detail.show {
    display: block;
}

@keyframes expandCard {
    from {
        opacity: 0;
        max-height: 0;
        padding-top: 0;
        padding-bottom: 0;
    }
    to {
        opacity: 1;
        max-height: 2000px;
        padding-top: 20px;
        padding-bottom: 20px;
    }
}

/* ============================================================================
   GRID - 3 КАРТКИ В РЯД
   ============================================================================ */

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

/* ============================================================================
   ОКРЕМА КАРТКА - КОМПАКТНІША
   ============================================================================ */

.group-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
}

.group-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

/* ============================================================================
   ЗАГОЛОВОК КАРТКИ - НОВИЙ ДИЗАЙН
   ============================================================================ */

.group-card-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    padding: 12px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.group-card-number {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.group-card-level {
    color: white;
    font-size: 14px;
    font-weight: 700;
    text-align: right;
    flex: 1;
    letter-spacing: 0.5px;
}

/* ============================================================================
   ТІЛО КАРТКИ - КОМПАКТНІШЕ
   ============================================================================ */

.group-card-body {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Компактна інфо секція */
.card-info-compact {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}

.card-info-item {
    font-size: 13px;
    color: #555;
    line-height: 1.4;
}

/* ============================================================================
   РОЗКЛАД - КОМПАКТНІШИЙ
   ============================================================================ */

.card-schedule {
    margin-top: 0;
}

.schedule-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.schedule-item {
    padding: 8px 10px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #1967d2;
    font-size: 12px;
    line-height: 1.5;
}

.schedule-day {
    color: #1967d2;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.3px;
}

.schedule-time {
    color: #333;
    font-weight: 500;
    font-size: 12px;
}

.schedule-location {
    color: #7f8c8d;
    margin-top: 3px;
    font-size: 11px;
    line-height: 1.4;
}

/* ============================================================================
   ТЕГИ - ПРОСТИЙ ТЕКСТ З #
   ============================================================================ */

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 6px;
    border-top: 1px solid #f0f0f0;
}

.tag-item {
    color: #1967d2;
    font-size: 11px;
    font-weight: 600;
}

/* ============================================================================
   КНОПКИ ДІЙ - КОМПАКТНІШІ
   ============================================================================ */

.group-card-actions {
    padding: 10px 14px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 8px;
}

.group-card-actions .btn {
    flex: 1;
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.group-card-actions .btn-primary {
    background: #1967d2;
    color: white;
}

.group-card-actions .btn-primary:hover {
    background: #1557b0;
    transform: translateY(-1px);
}

.group-card-actions .btn-success {
    background: #0f9d58;
    color: white;
}

.group-card-actions .btn-success:hover {
    background: #0d8548;
    transform: translateY(-1px);
}

/* ============================================================================
   АДАПТИВНІСТЬ
   ============================================================================ */

/* Tablet - 2 картки в ряд */
@media (max-width: 991px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
    
    .card-detail {
        padding: 16px;
    }
}

/* Mobile - 1 картка в ряд */
@media (max-width: 767px) {
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .card-detail {
        padding: 14px;
    }
    
    .group-card-actions {
        flex-direction: column;
    }
}

/* Small Mobile */
@media (max-width: 575px) {
    .card-detail {
        padding: 12px;
    }
    
    .group-card-body {
        padding: 10px 12px;
    }
}