/* Estilos para la página de cursos */

.course-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.course-card:hover {
    transform: translateY(-5px);
}

.course-img {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.course-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.course-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--vs-secondary-color);
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
}

.course-content {
    padding: 20px;
}

.course-title {
    font-size: 18px;
    margin-bottom: 10px;
}

.course-title a {
    color: #333;
    text-decoration: none;
}

.course-meta {
    display: flex;
    gap: 15px;
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.course-author {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

.course-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.course-price {
    font-size: 20px;
    font-weight: bold;
    color: var(--vs-secondary-color);
}

.widgett {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.widget-title {
    font-size: 18px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--vs-secondary-color);
}

.widget-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 400px;
    overflow-y: auto;
}

.widget-list li a {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
}

.widget-list li a:hover {
    color: var(--vs-fourth-color);
    padding-left: 5px;
}

/* Estilos para la categoría de cursos gratuitos */
.widget-list li:nth-child(2) a {
    background: transparent;
    color: #666;
    padding: 8px 12px;
    border-radius: 6px;
    display: block;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    font-weight: 600;
}

.widget-list li:nth-child(2) a:hover {
    background-color: #f8f9fa;
    color: var(--vs-secondary-color);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.widget-list li:nth-child(2) a.active {
    background: linear-gradient(135deg, var(--vs-secondary-color), var(--vs-fourth-color));
    color: white !important;
    box-shadow: 0 2px 8px rgba(80, 147, 154, 0.3);
    transform: translateY(-1px);
}

.widget-list li:nth-child(2) a i {
    margin-right: 8px;
    font-size: 14px;
}

/* Estilos para "Todos los cursos" cuando está inactivo */
#show-all-courses:not(.active) {
    background: transparent !important;
    color: #666 !important;
    box-shadow: none !important;
    transform: none !important;
}

#show-all-courses:not(.active):hover {
    background-color: #f8f9fa !important;
    color: var(--vs-secondary-color) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
}

/* Estilos para el título dinámico */
.section-header {
    text-align: center;
    margin-bottom: 30px;
}

.section-title {
    color: #333;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
}

.section-title i {
    margin-right: 10px;
    font-size: 24px;
}

.section-subtitle {
    color: #666;
    font-size: 16px;
    margin: 0;
}

/* Estilos para el buscador */
.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-container .form-control {
    border: 2px solid #e9ecef;
    border-radius: 25px;
    padding: 12px 45px 12px 15px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #fff;
}

.search-container .form-control:focus {
    border-color: var(--vs-secondary-color);
    box-shadow: 0 0 0 0.2rem rgba(80, 147, 154, 0.25);
    outline: none;
}

.search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--vs-secondary-color);
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background: var(--vs-fourth-color);
    transform: translateY(-50%) scale(1.1);
}

.search-btn i {
    font-size: 14px;
}

/* Estilos para filtros de categoría */
.category-filter,
.free-courses-filter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #666;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    margin-bottom: 5px;
    padding: 10px 15px !important;
}

.category-filter:hover,
.free-courses-filter:hover {
    background-color: #f8f9fa;
    color: var(--vs-secondary-color);
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.category-filter.active,
.free-courses-filter.active {
    background: linear-gradient(135deg, var(--vs-secondary-color), var(--vs-fourth-color)) !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(80, 147, 154, 0.3) !important;
    transform: translateY(-1px) !important;
}

/* Estilos específicos para "Todos los cursos" */
#show-all-courses {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #666;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    margin-bottom: 5px;
    padding: 10px 15px !important;
}

#show-all-courses:hover {
    background-color: #f8f9fa;
    color: var(--vs-secondary-color);
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#show-all-courses.active {
    background: linear-gradient(135deg, var(--vs-secondary-color), var(--vs-fourth-color)) !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(80, 147, 154, 0.3) !important;
    transform: translateY(-1px) !important;
}

/* Estilos para estados de carga y mensajes */
.loading-spinner {
    padding: 60px 20px;
    text-align: center;
}

.loading-spinner i {
    color: var(--vs-secondary-color);
    margin-bottom: 15px;
}

.no-courses-message,
.error-message {
    padding: 60px 20px;
    text-align: center;
}

.no-courses-message i,
.error-message i {
    margin-bottom: 20px;
    opacity: 0.7;
}

.no-courses-message h4,
.error-message h4 {
    color: #333;
    margin-bottom: 10px;
    font-weight: 600;
}

.no-courses-message p,
.error-message p {
    color: #666;
    margin-bottom: 20px;
}

/* Animaciones suaves */
#cursos-grid {
    transition: opacity 0.3s ease;
}

/* Scrollbar personalizado para la lista de categorías */
.widget-list::-webkit-scrollbar {
    width: 6px;
}

.widget-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.widget-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.widget-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
