/* Estilos adicionales para el sistema de cursos */

/* Discount badge */
.course-card {
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.discount-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--tierra-light);
    color: var(--tierra-text);
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 16px;
    font-weight: bold;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

/* Course description */
.course-description {
    font-size: 14px;
    color: #666;
    margin: 10px 0;
    line-height: 1.4;
}

/* Course meta information */
.course-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0;
    font-size: 13px;
    color: #888;
}

.level {
    background: #f8f9fa;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 500;
}

.level:contains("Beginner") {
    background: #d4edda;
    color: #155724;
}

.level:contains("Intermediate") {
    background: #fff3cd;
    color: #856404;
}

.level:contains("Advanced") {
    background: #f8d7da;
    color: #721c24;
}

/* Instructor information */
.instructor {
    font-size: 12px;
    color: #666;
    font-style: italic;
    margin-top: 8px;
}

/* Category buttons with course count */
.course-count {
    font-size: 11px;
    opacity: 0.7;
    margin-left: 5px;
}

/* Loading states */
.loading-spinner {
    text-align: center;
    padding: 40px;
    color: #666;
}

.loading-spinner:before {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* No courses message */
.no-courses-message {
    text-align: center;
    padding: 40px;
    color: #666;
}

.no-courses-message p {
    font-size: 16px;
    margin: 0;
}

/* Error message */
.error-message {
    text-align: center;
    padding: 40px;
    color: #dc3545;
}

.error-message p {
    font-size: 16px;
    margin: 0;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .course-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .discount-badge {
        font-size: 10px;
        padding: 3px 6px;
    }
    
    .course-description {
        font-size: 13px;
    }
}

/* Hover effects for course cards */
.course-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.course-card:hover .course-image {
    transform: scale(1.05);
}

.course-image {
    transition: transform 0.3s ease;
}

/* Price container improvements */
.price-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 15px 0;
}

.current-price {
    font-size: 18px;
    font-weight: bold;
    color: #28a745;
}

.old-price {
    font-size: 14px;
    color: #6c757d;
    text-decoration: line-through;
}

/* Category button active state */


/* Course card animation on load */
.course-card {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Course Type Badges */
.course-type-container {
    margin-bottom: 10px;
}

.course-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.course-type-online {
    background: var(--tierra-lightest);
    color: var(--tierra-dark);
    box-shadow: 0 2px 8px rgba(23, 162, 184, 0.3);
}

.course-type-virtual {
    background: var(--tierra-dark);
    color: var(--tierra-lightest);
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.course-date-info {
    display: block;
    margin-top: 3px;
    font-size: 15px;
    font-weight: normal;
    opacity: 0.9;
    text-transform: none;
    letter-spacing: normal;
}

.course-date-info i {
    margin-right: 3px;
}

/* Responsive adjustments for course type badges */
@media (max-width: 768px) {
    .course-type-badge {
        font-size: 10px;
        padding: 3px 6px;
    }
    
    .course-date-info {
        font-size: 9px;
    }
}

/* Estilos para botones de compra en cards de curso */
.course-actions {
    margin-top: auto;
    padding-top: 1rem;
}

.buy-btn {
    background: linear-gradient(135deg, #bc6c25 0%, #a55a1f 100%);
    border: none;
    color: white;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(188, 108, 37, 0.3);
}

.buy-btn:hover {
    background: linear-gradient(135deg, #a55a1f 0%, #8b4513 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(188, 108, 37, 0.4);
    color: white;
}

.buy-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(188, 108, 37, 0.3);
}

.buy-btn:active {
    transform: translateY(0);
}

.buy-btn i {
    font-size: 0.9rem;
}

/* Ajustes responsive para botones de compra */
@media (max-width: 768px) {
    .buy-btn {
        font-size: 0.8rem;
        padding: 0.6rem 1.2rem;
    }
}
