/* Course Showcase Block Styles */

.course-showcase-container {
    padding: 20px;
    max-width: 1320px;
    margin: 0 auto;
}

.course-showcase-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 20px;
}

.course-showcase-item {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 0;
    transition: all 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.course-showcase-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

/* Course Image */
.course-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}

.course-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.course-image:hover img {
    transform: scale(1.05);
}

.course-image a {
    display: block;
    width: 100%;
    height: 100%;
}

/* Course Title */
.course-title {
    padding: 15px 15px 10px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    min-height: 60px;
}

.course-title a {
    color: #333;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.course-title a:hover {
    color: #007bff;
}

/* Pricing Form */
.course-pricing-form {
    padding: 0 15px 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.pricing-options {
    margin-bottom: 12px;
    flex: 1;
}

.pricing-option {
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.pricing-option:hover {
    border-color: #007bff;
    background: #f8f9fa;
}

.pricing-option.selected {
    border-color: #28a745;
    background: #e7f4e9;
}

.pricing-option input[type="radio"] {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #28a745;
}

.pricing-option label {
    cursor: pointer;
    margin: 0;
    padding-right: 30px;
    display: block;
}

.package-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    font-size: 14px;
}

.package-price {
    font-size: 18px;
    color: #dc3545;
    font-weight: bold;
}

/* Course Actions */
.course-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: auto;
}

.course-actions .btn {
    padding: 10px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
    text-decoration: none;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-details {
    background: #6c757d;
    color: #fff;
}

.btn-details:hover {
    background: #5a6268;
    color: #fff;
}

.btn-register {
    background: #ffc107;
    color: #000;
}

.btn-register:hover:not(:disabled) {
    background: #ffb300;
    transform: translateY(-1px);
}

.btn-register:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-cart {
    background: #28a745;
    color: #fff;
    padding: 10px 15px;
}

.btn-cart:hover:not(:disabled) {
    background: #218838;
}

.btn-cart:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Sticky Bottom Bar */
.sticky-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.15);
    z-index: 1000;
    padding: 12px 20px;
    border-top: 2px solid #007bff;
}

.sticky-bar-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 15px;
    align-items: center;
}

.btn-register-sticky {
    background: #ffc107;
    color: #000;
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-register-sticky:hover {
    background: #ffb300;
    transform: scale(1.05);
}

.btn-cart-sticky {
    background: #28a745;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-cart-sticky:hover {
    background: #218838;
    color: #fff;
    transform: scale(1.05);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .course-showcase-grid[data-columns="6"],
    .course-showcase-grid[data-columns="5"] {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

@media (max-width: 992px) {
    .course-showcase-grid[data-columns="6"],
    .course-showcase-grid[data-columns="5"],
    .course-showcase-grid[data-columns="4"] {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    .course-image {
        height: 180px;
    }
}

@media (max-width: 768px) {
    .course-showcase-container {
        padding: 15px;
    }

    .course-showcase-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px;
    }

    .course-image {
        height: 150px;
    }

    .course-title {
        padding: 12px 12px 8px;
        font-size: 14px;
        min-height: 50px;
    }

    .course-pricing-form {
        padding: 0 12px 12px;
    }

    .pricing-option {
        padding: 8px;
    }

    .package-name {
        font-size: 13px;
    }

    .package-price {
        font-size: 16px;
    }

    /* Mobile: Ẩn nút xem chi tiết, chỉ giữ đăng ký */
    .course-actions {
        grid-template-columns: 1fr;
    }

    .btn-details {
        display: none;
    }

    .course-actions .btn {
        padding: 8px 10px;
        font-size: 13px;
    }

    /* Sticky bar mobile */
    .sticky-bottom-bar {
        padding: 10px 15px;
    }

    .sticky-bar-content {
        grid-template-columns: 1fr auto;
        gap: 10px;
    }

    .btn-register-sticky,
    .btn-cart-sticky {
        padding: 10px 20px;
        font-size: 14px;
    }

    /* Mobile: Chỉ hiển thị text ngắn gọn */
    .btn-cart-sticky span {
        display: none;
    }
}

@media (max-width: 480px) {
    .course-showcase-grid {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }

    .course-image {
        height: 200px;
    }

    .pricing-option {
        padding: 10px;
    }
}

/* Animation */
@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.sticky-bottom-bar {
    animation: slideUp 0.3s ease-out;
}
