@import url('header.css');

.cursos-container {
    display: flex;
    overflow-x: auto; 
    scroll-behavior: smooth; 
    white-space: nowrap; 
    padding: 7px;
    -webkit-overflow-scrolling: touch;
    cursor: pointer;
    background-color: #4e7bac5f;
    border-radius: 78px;
    align-items: center;
    width: 82%;
    margin-left: 9%;
}

.curso-item {
    flex: 0 0 auto; 
    width: 200px; 
    margin-right: 15px;
    text-align: center;
    transition: all 0.3s ease; 
}

.curso-item:hover .icono-curso {
    color: var(--secondary); 
    transform: scale(1.3); 
}

.curso-item:hover .curso-nombre {
    color: var(--secondary); 
    font-weight: bold; 
}

.cursos-container::-webkit-scrollbar {
    display: none; 
}

.icono-curso {
    font-size: 47px;
    color: var(--secondary);
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.curso-nombre {
    font-size: 15px;
    color: #333;
    margin-top: 10px;
    white-space: normal; 
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.scroll-btn {
    background-color: var(--gray); 
    color: var(--secondary); 
    border: none;
    border-radius: 50%; 
    width: 40px;
    height: 40px; 
    cursor: pointer; 
    position: absolute; 
    top: 50%; 
    transform: translateY(-50%); 
    z-index: 10;
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 20px; 
    transition: background-color 0.3s ease, box-shadow 0.3s ease; 
    outline: none;
    margin-left: 8%;
    margin-right: 8%;
}
.scroll-btn:focus {
    outline: none; 
    border: none; 
}

.scroll-btn:hover {
    background-color: var(--primary);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2); 
}

/* Botón de desplazamiento anterior */
.scroll-btn.prev-btn {
    left: 10px; 
}

/* Botón de desplazamiento siguiente */
.scroll-btn.next-btn {
    right: 10px; 
}

/* Estilos para pantallas medianas (tablets) */
@media (max-width: 768px) {
    .curso-item {
        width: 150px; /* Reducir el tamaño de los ítems */
        margin-right: 10px; /* Reducir el espacio entre ellos */
    }

    .icono-curso {
        font-size: 40px; /* Reducir el tamaño del icono */
    }

    .curso-nombre {
        font-size: 14px; /* Reducir el tamaño del texto */
    }
}

/* Estilos para pantallas pequeñas (móviles) */
@media (max-width: 480px) {
    .cursos-container {
        padding: 5px; /* Reducir el padding general */
    }

    .curso-item {
        width: 120px; /* Hacer los ítems más pequeños */
        margin-right: 8px; /* Reducir más el espacio entre ellos */
    }

    .icono-curso {
        font-size: 35px; /* Ajustar el tamaño del icono */
    }

    .curso-nombre {
        font-size: 12px; /* Reducir el tamaño de la fuente del nombre */
    }

    .scroll-btn {
        width: 30px; /* Hacer los botones más pequeños */
        height: 30px; 
        font-size: 16px; 
    }
}


