/* ===== 3D COURSES GRID ===== */

.courses-container-3d {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* 3D Scroll Grid */
.courses-grid-3d {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    perspective: 1000px;
    padding: 20px 0;
}

/* 3D Course Card */
.course-card-3d {
    position: relative;
    height: 450px;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.course-card-3d:hover {
    transform: rotateX(-15deg) rotateY(15deg) translateZ(30px) scale(1.05);
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.4);
}

/* Card Front */
.course-card-3d-front {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    background: linear-gradient(135deg, rgba(20, 20, 50, 0.95), rgba(40, 40, 80, 0.95));
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 20px;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    transform-style: preserve-3d;
    overflow: hidden;
}

.course-card-3d-front::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2, #f093fb);
    animation: slideRight 2s infinite;
}

@keyframes slideRight {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Course Image Container */
.course-image-3d {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(240, 147, 251, 0.1));
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    transform: translateZ(20px);
}

.course-image-3d::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Course Content */
.course-content-3d {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

.course-category-3d {
    display: inline-block;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3), rgba(240, 147, 251, 0.2));
    color: rgba(255, 255, 255, 0.9);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: fit-content;
    margin-bottom: 10px;
    border: 1px solid rgba(102, 126, 234, 0.4);
}

.course-title-3d {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    margin: 10px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.course-description-3d {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 15px;
}

/* Course Stats */
.course-stats-3d {
    display: flex;
    gap: 15px;
    padding: 12px 0;
    border-top: 1px solid rgba(102, 126, 234, 0.2);
    padding-top: 12px;
}

.course-stat-3d {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.course-stat-3d i {
    color: rgba(102, 126, 234, 0.8);
}

/* Course Footer */
.course-footer-3d {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

.course-price-3d {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.course-button-3d {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(102, 126, 234, 0.4);
    transform: translateZ(30px);
}

.course-button-3d:hover {
    transform: translateY(-2px) translateZ(35px);
    box-shadow: 0 0 25px rgba(102, 126, 234, 0.6);
}

/* Special Course Tag */
.course-badge-3d {
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 10;
    box-shadow: 0 0 20px rgba(240, 147, 251, 0.6);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Filter Buttons */
.course-filters-3d {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    perspective: 1000px;
}

.filter-btn-3d {
    padding: 10px 20px;
    background: rgba(102, 126, 234, 0.15);
    border: 2px solid rgba(102, 126, 234, 0.3);
    color: rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-style: preserve-3d;
}

.filter-btn-3d:hover {
    background: rgba(102, 126, 234, 0.3);
    border-color: rgba(102, 126, 234, 0.6);
    color: #ffffff;
    transform: translateY(-3px) translateZ(10px);
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
}

.filter-btn-3d.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    box-shadow: 0 0 30px rgba(102, 126, 234, 0.6);
    transform: translateY(-5px) translateZ(15px);
}

/* 3D Section Title */
.section-title-3d {
    font-size: 3rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 50px;
    background: linear-gradient(135deg, #667eea, #764ba2, #f093fb, #4facfe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 10px rgba(102, 126, 234, 0.2);
}

.section-title-3d {
    text-shadow: 
        3px 3px 0px rgba(102, 126, 234, 0.2),
        6px 6px 0px rgba(102, 126, 234, 0.1);
    letter-spacing: 1px;
}

/* Loading Skeleton */
.course-skeleton-3d {
    animation: skeleton-loading 1s linear infinite alternate;
}

@keyframes skeleton-loading {
    0% { background-color: rgba(102, 126, 234, 0.1); }
    100% { background-color: rgba(102, 126, 234, 0.2); }
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .courses-grid-3d {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 25px;
    }

    .course-card-3d:hover {
        transform: rotateX(-8deg) rotateY(8deg) translateZ(20px) scale(1.03);
    }

    .section-title-3d {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .courses-grid-3d {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 20px;
    }

    .course-card-3d {
        height: 400px;
    }

    .course-card-3d:hover {
        transform: rotateX(-5deg) rotateY(5deg) translateZ(10px) scale(1.02);
    }

    .course-image-3d {
        height: 150px;
        font-size: 40px;
        margin-bottom: 15px;
    }

    .course-title-3d {
        font-size: 16px;
    }

    .course-description-3d {
        font-size: 12px;
    }

    .section-title-3d {
        font-size: 2rem;
        margin-bottom: 30px;
    }

    .courses-container-3d {
        padding: 30px 15px;
    }

    .course-stats-3d {
        flex-wrap: wrap;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .courses-grid-3d {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .course-card-3d {
        height: 380px;
    }

    .course-card-3d:hover {
        transform: scale(1.01);
    }

    .course-card-3d-front {
        padding: 20px 15px;
    }

    .course-image-3d {
        height: 120px;
        font-size: 35px;
        margin-bottom: 12px;
    }

    .course-title-3d {
        font-size: 15px;
        margin: 8px 0;
    }

    .course-description-3d {
        font-size: 11px;
        margin-bottom: 10px;
    }

    .section-title-3d {
        font-size: 1.8rem;
        margin-bottom: 25px;
    }

    .course-filters-3d {
        margin-bottom: 20px;
    }

    .filter-btn-3d {
        padding: 8px 15px;
        font-size: 12px;
    }

    .course-badge-3d {
        padding: 4px 10px;
        font-size: 10px;
        top: 15px;
        right: 15px;
    }

    .course-footer-3d {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .course-button-3d {
        width: 100%;
        text-align: center;
    }
}

/* Landscape Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .course-card-3d {
        height: 350px;
    }

    .course-image-3d {
        height: 120px;
    }

    .section-title-3d {
        font-size: 1.8rem;
        margin-bottom: 25px;
    }
}
