/* ================================================
   ANIMACE KURZŮ - Hezké vysouvání při filtrování
   ================================================ */

/* Grid kurzů */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    position: relative;
}

/* Základní karta kurzu */
.course-card-new {
    position: relative;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    /* ANIMACE: Začíná neviditelná */
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    animation: slideInUp 0.5s ease forwards;
}

/* Animace pro vysouvání karet */
@keyframes slideInUp {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Postupné zpoždění pro každou kartu (efekt vlny) */
.course-card-new:nth-child(1) { animation-delay: 0.05s; }
.course-card-new:nth-child(2) { animation-delay: 0.1s; }
.course-card-new:nth-child(3) { animation-delay: 0.15s; }
.course-card-new:nth-child(4) { animation-delay: 0.2s; }
.course-card-new:nth-child(5) { animation-delay: 0.25s; }
.course-card-new:nth-child(6) { animation-delay: 0.3s; }
.course-card-new:nth-child(7) { animation-delay: 0.35s; }
.course-card-new:nth-child(8) { animation-delay: 0.4s; }
.course-card-new:nth-child(9) { animation-delay: 0.45s; }
.course-card-new:nth-child(10) { animation-delay: 0.5s; }
.course-card-new:nth-child(11) { animation-delay: 0.55s; }
.course-card-new:nth-child(12) { animation-delay: 0.6s; }

/* Hover efekt */
.course-card-new:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 61, 130, 0.15);
}

/* ================================================
   ANIMACE FILTRU - Smooth transition
   ================================================ */

.filter-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-btn.active {
    transform: scale(1.05);
}

.filter-btn:active {
    transform: scale(0.95);
}

/* ================================================
   LOADING STATE - Když se mění filtry
   ================================================ */

.courses-grid.loading {
    pointer-events: none;
    opacity: 0.5;
}

.courses-grid.loading .course-card-new {
    animation: none;
    opacity: 0;
}

/* ================================================
   ALTERNATIVNÍ ANIMACE - Fade from sides
   ================================================ */

/* Pokud chceš animaci z levé/pravé strany místo zdola: */
/*
@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.course-card-new:nth-child(odd) {
    animation: slideInFromLeft 0.5s ease forwards;
}

.course-card-new:nth-child(even) {
    animation: slideInFromRight 0.5s ease forwards;
}
*/

/* ================================================
   POČÍTADLO KURZŮ - Animace změny čísla
   ================================================ */

.courses-count {
    transition: all 0.3s ease;
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
}

/* ================================================
   RESPONSIVE - Menší zpoždění na mobilu
   ================================================ */

@media (max-width: 768px) {
    .course-card-new {
        animation-duration: 0.4s;
    }
    
    .course-card-new:nth-child(n) {
        animation-delay: 0.05s;
    }
    
    .course-card-new:nth-child(2n) {
        animation-delay: 0.1s;
    }
    
    .course-card-new:nth-child(3n) {
        animation-delay: 0.15s;
    }
}

/* ================================================
   REDUCE MOTION - Pro uživatele s vypnutými animacemi
   ================================================ */

@media (prefers-reduced-motion: reduce) {
    .course-card-new {
        animation: none;
        opacity: 1;
        transform: none;
    }
    
    .course-card-new:hover {
        transform: none;
    }
}